# CVE-2022-50022: drivers:md:fix a potential use-after-free bug

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Published: 2025-06-18T11:01:25.965Z
- Modified: 2026-08-05T08:57:10.904Z
- Weaknesses: CWE-416
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

drivers:md:fix a potential use-after-free bug

In line 2884, "raid5_release_stripe(sh);" drops the reference to sh and
may cause sh to be released. However, sh is subsequently used in lines
2886 "if (sh->batch_head && sh != sh->batch_head)". This may result in an
use-after-free bug.

It can be fixed by moving "raid5_release_stripe(sh);" to the bottom of
the function.

(As written by CVE List.)

## Affected

- Linux Linux: from 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c before 7470a4314b239e9a9580f248fdf4c9a92805490e; from 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c before 09cf99bace7789d91caa8d10fbcfc8b2fb35857f; from 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c before e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13; from 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c before f5d46f1b47f65da1faf468277b261eb78c8e25b5; from 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c before 5d8325fd15892c8ab1146edc1d7ed8463de39636; from 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c before d9b94c3ace549433de8a93eeb27b0391fc8ac406; from 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c before eb3a4f73f43f839df981dda5859e8e075067a360; from 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c before 104212471b1c1817b311771d817fb692af983173; 4.1 (not affected: before 4.1; from 4.9.326 up to 4.9.*; from 4.14.291 up to 4.14.*; from 4.19.256 up to 4.19.*; from 5.4.211 up to 5.4.*; from 5.10.138 up to 5.10.*; from 5.15.63 up to 5.15.*; from 5.19.4 up to 5.19.*; from 6.0 up to *)
- linux linux_kernel: from 4.1 before 4.9.326; from 4.10 before 4.14.291; from 4.15 before 4.19.256; from 4.20 before 5.4.211; from 5.5 before 5.10.138; from 5.11 before 5.15.63; from 5.16 before 5.19.4

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/7470a4314b239e9a9580f248fdf4c9a92805490e> (patch)
- <https://git.kernel.org/stable/c/09cf99bace7789d91caa8d10fbcfc8b2fb35857f> (patch)
- <https://git.kernel.org/stable/c/e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13> (patch)
- <https://git.kernel.org/stable/c/f5d46f1b47f65da1faf468277b261eb78c8e25b5> (patch)
- <https://git.kernel.org/stable/c/5d8325fd15892c8ab1146edc1d7ed8463de39636> (patch)
- <https://git.kernel.org/stable/c/d9b94c3ace549433de8a93eeb27b0391fc8ac406> (patch)
- <https://git.kernel.org/stable/c/eb3a4f73f43f839df981dda5859e8e075067a360> (patch)
- <https://git.kernel.org/stable/c/104212471b1c1817b311771d817fb692af983173> (patch)

## Sources

- CVE List: [CVE-2022-50022](https://www.cve.org/CVERecord?id=CVE-2022-50022), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2022-50022](https://nvd.nist.gov/vuln/detail/CVE-2022-50022), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2022-50022 · Whole record: https://cve.day/CVE-2022-50022.json · Rebuilt by cve.day 2026-11-25T22:58:21.015Z
