{"id":"CVE-2022-50022","aliases":["CVE-2022-50022"],"related":[],"kind":"vulnerability","state":"published","title":"drivers:md:fix a potential use-after-free bug","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrivers:md:fix a potential use-after-free bug\n\nIn line 2884, \"raid5_release_stripe(sh);\" drops the reference to sh and\nmay cause sh to be released. However, sh is subsequently used in lines\n2886 \"if (sh->batch_head && sh != sh->batch_head)\". This may result in an\nuse-after-free bug.\n\nIt can be fixed by moving \"raid5_release_stripe(sh);\" to the bottom of\nthe function.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrivers:md:fix a potential use-after-free bug\n\nIn line 2884, \"raid5_release_stripe(sh);\" drops the reference to sh and\nmay cause sh to be released. However, sh is subsequently used in lines\n2886 \"if (sh->batch_head && sh != sh->batch_head)\". This may result in an\nuse-after-free bug.\n\nIt can be fixed by moving \"raid5_release_stripe(sh);\" to the bottom of\nthe function.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drivers:md:fix, un posible error de use-after-free. En la línea 2884, \"raid5_release_stripe(sh);\" omite la referencia a sh y puede provocar su liberación. Sin embargo, sh se utiliza posteriormente en la línea 2886 \"if (sh-&gt;batch_head &amp;&amp; sh != sh-&gt;batch_head)\". Esto puede provocar un error de use-after-free. Se puede corregir moviendo \"raid5_release_stripe(sh);\" al final de la función.","source":"nvd"}],"published":"2025-06-18T11:01:25.965Z","modified":"2026-08-05T08:57:10.904Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"59fc630b8b5f9f21c8ce3ba153341c107dce1b0c","fixed":"7470a4314b239e9a9580f248fdf4c9a92805490e","status":"affected"},{"type":"git","introduced":"59fc630b8b5f9f21c8ce3ba153341c107dce1b0c","fixed":"09cf99bace7789d91caa8d10fbcfc8b2fb35857f","status":"affected"},{"type":"git","introduced":"59fc630b8b5f9f21c8ce3ba153341c107dce1b0c","fixed":"e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13","status":"affected"},{"type":"git","introduced":"59fc630b8b5f9f21c8ce3ba153341c107dce1b0c","fixed":"f5d46f1b47f65da1faf468277b261eb78c8e25b5","status":"affected"},{"type":"git","introduced":"59fc630b8b5f9f21c8ce3ba153341c107dce1b0c","fixed":"5d8325fd15892c8ab1146edc1d7ed8463de39636","status":"affected"},{"type":"git","introduced":"59fc630b8b5f9f21c8ce3ba153341c107dce1b0c","fixed":"d9b94c3ace549433de8a93eeb27b0391fc8ac406","status":"affected"},{"type":"git","introduced":"59fc630b8b5f9f21c8ce3ba153341c107dce1b0c","fixed":"eb3a4f73f43f839df981dda5859e8e075067a360","status":"affected"},{"type":"git","introduced":"59fc630b8b5f9f21c8ce3ba153341c107dce1b0c","fixed":"104212471b1c1817b311771d817fb692af983173","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.1","status":"unaffected"},{"type":"semver","introduced":"4.9.326","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.291","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.256","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.211","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.138","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.63","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.19.4","lastAffected":"5.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.1","fixed":"4.9.326"},{"status":"affected","introduced":"4.10","fixed":"4.14.291"},{"status":"affected","introduced":"4.15","fixed":"4.19.256"},{"status":"affected","introduced":"4.20","fixed":"5.4.211"},{"status":"affected","introduced":"5.5","fixed":"5.10.138"},{"status":"affected","introduced":"5.11","fixed":"5.15.63"},{"status":"affected","introduced":"5.16","fixed":"5.19.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/7470a4314b239e9a9580f248fdf4c9a92805490e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/09cf99bace7789d91caa8d10fbcfc8b2fb35857f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f5d46f1b47f65da1faf468277b261eb78c8e25b5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5d8325fd15892c8ab1146edc1d7ed8463de39636","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d9b94c3ace549433de8a93eeb27b0391fc8ac406","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/eb3a4f73f43f839df981dda5859e8e075067a360","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/104212471b1c1817b311771d817fb692af983173","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50022","url":"https://www.cve.org/CVERecord?id=CVE-2022-50022","licence":"CVE Terms of Use","modified":"2026-08-05T08:57:10.904Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50022","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50022","licence":"Public domain","modified":"2026-08-04T10:18:03.270Z"}],"updatedAt":"2026-11-25T22:58:21.015Z","epss":{"score":0.00271,"percentile":0.2072,"date":"2026-12-01T12:00:22.000Z"}}