CVE-2022-49270

Source
https://cve.org/CVERecord?id=CVE-2022-49270
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49270.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49270
Downstream
Related
Published
2025-02-26T01:56:17.683Z
Modified
2026-03-20T12:22:18.339991Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
dm: fix use-after-free in dm_cleanup_zoned_dev()
Details

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

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49270.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / 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
bb37d77239af25cde59693dbe3fac04dd17d7b29
Fixed
0987f00a76a17aa7213da492c00ed9e5a6210c73
Fixed
fdfe414ca28ddfd562c233fb27385cf820de03e8
Fixed
43a043aed964659bc69ef81f266912b73c80d837
Fixed
588b7f5df0cb64f281290c7672470c006abe7160

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49270.json"