In the Linux kernel, the following vulnerability has been resolved:
drivers:md:fix a potential use-after-free bug
In line 2884, "raid5releasestripe(sh);" drops the reference to sh and may cause sh to be released. However, sh is subsequently used in lines 2886 "if (sh->batchhead && sh != sh->batchhead)". This may result in an use-after-free bug.
It can be fixed by moving "raid5releasestripe(sh);" to the bottom of the function.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eb3a4f73f43f839df981dda5859e8e075067a360",
"target": {
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"107771739525588154669689540833460243729",
"110241381138869754549066323072504686620",
"327032090001792365522562607853002629191",
"262733081291687523856217211990796638342",
"59721577621769121137040482668105664849",
"207277639295029117442280901870397978835"
],
"threshold": 0.9
},
"signature_type": "Line",
"id": "CVE-2022-50022-07f0edee"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09cf99bace7789d91caa8d10fbcfc8b2fb35857f",
"target": {
"function": "raid5_end_write_request",
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "190608996816003408881143942242179758452",
"length": 1961.0
},
"signature_type": "Function",
"id": "CVE-2022-50022-0a9cc3c3"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d9b94c3ace549433de8a93eeb27b0391fc8ac406",
"target": {
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"107771739525588154669689540833460243729",
"110241381138869754549066323072504686620",
"327032090001792365522562607853002629191",
"262733081291687523856217211990796638342",
"59721577621769121137040482668105664849",
"207277639295029117442280901870397978835"
],
"threshold": 0.9
},
"signature_type": "Line",
"id": "CVE-2022-50022-0c5c3125"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eb3a4f73f43f839df981dda5859e8e075067a360",
"target": {
"function": "raid5_end_write_request",
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "304896426773014753769791592276122690537",
"length": 1961.0
},
"signature_type": "Function",
"id": "CVE-2022-50022-11438f2c"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13",
"target": {
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"107771739525588154669689540833460243729",
"110241381138869754549066323072504686620",
"327032090001792365522562607853002629191",
"262733081291687523856217211990796638342",
"59721577621769121137040482668105664849",
"207277639295029117442280901870397978835"
],
"threshold": 0.9
},
"signature_type": "Line",
"id": "CVE-2022-50022-1501ac9d"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7470a4314b239e9a9580f248fdf4c9a92805490e",
"target": {
"function": "raid5_end_write_request",
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "265607871409495576276402425294013103164",
"length": 1957.0
},
"signature_type": "Function",
"id": "CVE-2022-50022-399a0f5f"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13",
"target": {
"function": "raid5_end_write_request",
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "190608996816003408881143942242179758452",
"length": 1961.0
},
"signature_type": "Function",
"id": "CVE-2022-50022-3aaca409"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@104212471b1c1817b311771d817fb692af983173",
"target": {
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"107771739525588154669689540833460243729",
"110241381138869754549066323072504686620",
"327032090001792365522562607853002629191",
"262733081291687523856217211990796638342",
"59721577621769121137040482668105664849",
"207277639295029117442280901870397978835"
],
"threshold": 0.9
},
"signature_type": "Line",
"id": "CVE-2022-50022-705f89f5"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d9b94c3ace549433de8a93eeb27b0391fc8ac406",
"target": {
"function": "raid5_end_write_request",
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "180067058665650470376527205054416002979",
"length": 1943.0
},
"signature_type": "Function",
"id": "CVE-2022-50022-7cac6e3e"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7470a4314b239e9a9580f248fdf4c9a92805490e",
"target": {
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"107771739525588154669689540833460243729",
"110241381138869754549066323072504686620",
"327032090001792365522562607853002629191",
"262733081291687523856217211990796638342",
"156894472412456501844214095053537220781",
"149302156134985897700003782557887242571"
],
"threshold": 0.9
},
"signature_type": "Line",
"id": "CVE-2022-50022-7e9791c8"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f5d46f1b47f65da1faf468277b261eb78c8e25b5",
"target": {
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"107771739525588154669689540833460243729",
"110241381138869754549066323072504686620",
"327032090001792365522562607853002629191",
"262733081291687523856217211990796638342",
"59721577621769121137040482668105664849",
"207277639295029117442280901870397978835"
],
"threshold": 0.9
},
"signature_type": "Line",
"id": "CVE-2022-50022-8196cde3"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5d8325fd15892c8ab1146edc1d7ed8463de39636",
"target": {
"function": "raid5_end_write_request",
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "180067058665650470376527205054416002979",
"length": 1943.0
},
"signature_type": "Function",
"id": "CVE-2022-50022-9eba54f8"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f5d46f1b47f65da1faf468277b261eb78c8e25b5",
"target": {
"function": "raid5_end_write_request",
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "190608996816003408881143942242179758452",
"length": 1961.0
},
"signature_type": "Function",
"id": "CVE-2022-50022-a7b1d1a8"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5d8325fd15892c8ab1146edc1d7ed8463de39636",
"target": {
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"107771739525588154669689540833460243729",
"110241381138869754549066323072504686620",
"327032090001792365522562607853002629191",
"262733081291687523856217211990796638342",
"59721577621769121137040482668105664849",
"207277639295029117442280901870397978835"
],
"threshold": 0.9
},
"signature_type": "Line",
"id": "CVE-2022-50022-c2210e2a"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@104212471b1c1817b311771d817fb692af983173",
"target": {
"function": "raid5_end_write_request",
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "304896426773014753769791592276122690537",
"length": 1961.0
},
"signature_type": "Function",
"id": "CVE-2022-50022-e299bfa1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09cf99bace7789d91caa8d10fbcfc8b2fb35857f",
"target": {
"file": "drivers/md/raid5.c"
},
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"107771739525588154669689540833460243729",
"110241381138869754549066323072504686620",
"327032090001792365522562607853002629191",
"262733081291687523856217211990796638342",
"59721577621769121137040482668105664849",
"207277639295029117442280901870397978835"
],
"threshold": 0.9
},
"signature_type": "Line",
"id": "CVE-2022-50022-f3eb3359"
}
]