{"id":"CVE-2022-50022","summary":"drivers:md:fix a potential use-after-free bug","details":"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-\u003ebatch_head && sh != sh-\u003ebatch_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.","modified":"2026-04-03T13:14:45.672877Z","published":"2025-06-18T11:01:25.965Z","related":["SUSE-SU-2025:02264-1","SUSE-SU-2025:02308-1","SUSE-SU-2025:02320-1","SUSE-SU-2025:02321-1","SUSE-SU-2025:02322-1","SUSE-SU-2025:02334-1","SUSE-SU-2025:02537-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50022.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/09cf99bace7789d91caa8d10fbcfc8b2fb35857f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/104212471b1c1817b311771d817fb692af983173"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5d8325fd15892c8ab1146edc1d7ed8463de39636"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7470a4314b239e9a9580f248fdf4c9a92805490e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d9b94c3ace549433de8a93eeb27b0391fc8ac406"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13"},{"type":"WEB","url":"https://git.kernel.org/stable/c/eb3a4f73f43f839df981dda5859e8e075067a360"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f5d46f1b47f65da1faf468277b261eb78c8e25b5"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50022.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50022"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"59fc630b8b5f9f21c8ce3ba153341c107dce1b0c"},{"fixed":"7470a4314b239e9a9580f248fdf4c9a92805490e"},{"fixed":"09cf99bace7789d91caa8d10fbcfc8b2fb35857f"},{"fixed":"e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13"},{"fixed":"f5d46f1b47f65da1faf468277b261eb78c8e25b5"},{"fixed":"5d8325fd15892c8ab1146edc1d7ed8463de39636"},{"fixed":"d9b94c3ace549433de8a93eeb27b0391fc8ac406"},{"fixed":"eb3a4f73f43f839df981dda5859e8e075067a360"},{"fixed":"104212471b1c1817b311771d817fb692af983173"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50022.json"}}],"schema_version":"1.7.5"}