In the Linux kernel, the following vulnerability has been resolved:
dm: fix use-after-free in dmcleanupzoned_dev()
dmcleanupzoneddev() uses queue, so it must be called before blkcleanup_disk() starts its killing:
blkcleanupdisk->blkcleanupqueue()->kobjectput()->blkreleasequeue()-> ->...RCU...->blkfreequeuercu()->kmemcachefree()
Otherwise, RCU callback may be executed first and dmcleanupzoned_dev() will touch free'd memory:
BUG: KASAN: use-after-free in dmcleanupzoned_dev+0x33/0xd0 Read of size 8 at addr ffff88805ac6e430 by task dmsetup/681
CPU: 4 PID: 681 Comm: dmsetup Not tainted 5.17.0-rc2+ #6 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 Call Trace: <TASK> dumpstacklvl+0x57/0x7d printaddressdescription.constprop.0+0x1f/0x150 ? dmcleanupzoneddev+0x33/0xd0 kasanreport.cold+0x7f/0x11b ? dmcleanupzoneddev+0x33/0xd0 dmcleanupzoneddev+0x33/0xd0 _dmdestroy+0x26a/0x400 ? dmblkioctl+0x230/0x230 ? upwrite+0xd8/0x270 devremove+0x156/0x1d0 ctlioctl+0x269/0x530 ? tableclear+0x140/0x140 ? lockrelease+0xb2/0x750 ? removeall+0x40/0x40 ? rcureadlockschedheld+0x12/0x70 ? lockdowngrade+0x3c0/0x3c0 ? rcureadlockschedheld+0x12/0x70 dmctlioctl+0xa/0x10 _x64sysioctl+0xb9/0xf0 dosyscall64+0x3b/0x90 entrySYSCALL64afterhwframe+0x44/0xae RIP: 0033:0x7fb6dfa95c27
{ "vanir_signatures": [ { "id": "CVE-2022-49270-01f4dc14", "deprecated": false, "digest": { "function_hash": "81366426606027698239026287965572939256", "length": 785.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fdfe414ca28ddfd562c233fb27385cf820de03e8", "target": { "file": "drivers/md/dm.c", "function": "cleanup_mapped_device" }, "signature_type": "Function", "signature_version": "v1" }, { "id": "CVE-2022-49270-3bbd4295", "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "256538427029333137851255072979133780673", "13817241541847778795473884006236546381", "282172158870113756668348867881738317120", "79558354655916324936995770778617082608", "67253472398455296585966915240653246454", "154955768871407162014361812966719815322", "250212884710974208667930581639527162819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0987f00a76a17aa7213da492c00ed9e5a6210c73", "target": { "file": "drivers/md/dm.c" }, "signature_type": "Line", "signature_version": "v1" }, { "id": "CVE-2022-49270-74901d2e", "deprecated": false, "digest": { "function_hash": "81366426606027698239026287965572939256", "length": 785.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0987f00a76a17aa7213da492c00ed9e5a6210c73", "target": { "file": "drivers/md/dm.c", "function": "cleanup_mapped_device" }, "signature_type": "Function", "signature_version": "v1" }, { "id": "CVE-2022-49270-91e2f02b", "deprecated": false, "digest": { "function_hash": "65022243914042807747895342230750590298", "length": 909.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@588b7f5df0cb64f281290c7672470c006abe7160", "target": { "file": "drivers/md/dm.c", "function": "cleanup_mapped_device" }, "signature_type": "Function", "signature_version": "v1" }, { "id": "CVE-2022-49270-bd9949c1", "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "256538427029333137851255072979133780673", "13817241541847778795473884006236546381", "282172158870113756668348867881738317120", "79558354655916324936995770778617082608", "67253472398455296585966915240653246454", "154955768871407162014361812966719815322", "250212884710974208667930581639527162819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@43a043aed964659bc69ef81f266912b73c80d837", "target": { "file": "drivers/md/dm.c" }, "signature_type": "Line", "signature_version": "v1" }, { "id": "CVE-2022-49270-be0645ea", "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "256538427029333137851255072979133780673", "13817241541847778795473884006236546381", "282172158870113756668348867881738317120", "79558354655916324936995770778617082608", "67253472398455296585966915240653246454", "154955768871407162014361812966719815322", "250212884710974208667930581639527162819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@588b7f5df0cb64f281290c7672470c006abe7160", "target": { "file": "drivers/md/dm.c" }, "signature_type": "Line", "signature_version": "v1" }, { "id": "CVE-2022-49270-c1f36989", "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "256538427029333137851255072979133780673", "13817241541847778795473884006236546381", "282172158870113756668348867881738317120", "79558354655916324936995770778617082608", "67253472398455296585966915240653246454", "154955768871407162014361812966719815322", "250212884710974208667930581639527162819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fdfe414ca28ddfd562c233fb27385cf820de03e8", "target": { "file": "drivers/md/dm.c" }, "signature_type": "Line", "signature_version": "v1" }, { "id": "CVE-2022-49270-c641f9b3", "deprecated": false, "digest": { "function_hash": "334098829510560124021196836905366526636", "length": 814.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@43a043aed964659bc69ef81f266912b73c80d837", "target": { "file": "drivers/md/dm.c", "function": "cleanup_mapped_device" }, "signature_type": "Function", "signature_version": "v1" } ] }