CVE-2022-50022

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

State
Published
Severity
7.8 High
Published
Jun 18, 2025
Updated
Aug 5, 2026
Reserved
Jun 18, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c to before 7470a4314b239e9a9580f248fdf4c9a92805490eAffected
  • 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c to before 09cf99bace7789d91caa8d10fbcfc8b2fb35857fAffected
  • 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c to before e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13Affected
  • 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c to before f5d46f1b47f65da1faf468277b261eb78c8e25b5Affected
  • 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c to before 5d8325fd15892c8ab1146edc1d7ed8463de39636Affected
  • 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c to before d9b94c3ace549433de8a93eeb27b0391fc8ac406Affected
  • 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c to before eb3a4f73f43f839df981dda5859e8e075067a360Affected
  • 59fc630b8b5f9f21c8ce3ba153341c107dce1b0c to before 104212471b1c1817b311771d817fb692af983173Affected
LinuxLinux
  • 4.1Affected
  • before 4.1Not affected
  • 4.9.326 through 4.9.*Not affected
  • 4.14.291 through 4.14.*Not affected
  • 4.19.256 through 4.19.*Not affected
  • 5.4.211 through 5.4.*Not affected
  • 5.10.138 through 5.10.*Not affected
  • 5.15.63 through 5.15.*Not affected
  • 5.19.4 through 5.19.*Not affected
  • 6.0 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.