# CVE-2024-53170: block: fix uaf for flush rq while iterating tags

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 17, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-12-27T13:49:15.712Z
- **Modified:** 2026-11-10T13:17:26.130Z

## Who should check

- Anyone running Linux \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 1921fe7d2836f8be1d321cf430d17e0d4e05301b; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 1364a29b71c7837770f1902c49e7a6e234d72c92; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< a0e93b9fefafe97d596f9c98701ae6c3b04b3ff6; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 61092568f2a9acb0e6e186f03f2e0649a4e86d09; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 3802f73bd80766d70f319658f334754164075bc3
- Anyone running Linux 5.19

## Description

In the Linux kernel, the following vulnerability has been resolved:

block: fix uaf for flush rq while iterating tags

blk\_mq\_clear\_flush\_rq\_mapping() is not called during scsi probe, by
checking blk\_queue\_init\_done(). However, QUEUE\_FLAG\_INIT\_DONE is cleared
in del\_gendisk by commit aec89dc5d421 ("block: keep q\_usage\_counter in
atomic mode after del\_gendisk"), hence for disk like scsi, following
blk\_mq\_destroy\_queue() will not clear flush rq from tags-\>rqs\[\] as well,
cause following uaf that is found by our syzkaller for v6.6:

==================================================================
BUG: KASAN: slab-use-after-free in blk\_mq\_find\_and\_get\_req+0x16e/0x1a0 block/blk-mq-tag.c:261
Read of size 4 at addr ffff88811c969c20 by task kworker/1:2H/224909

CPU: 1 PID: 224909 Comm: kworker/1:2H Not tainted 6.6.0-ga836a5060850 \#32
Workqueue: kblockd blk\_mq\_timeout\_work
Call Trace:

\_\_dump\_stack lib/dump\_stack.c:88 \[inline\]
dump\_stack\_lvl+0x91/0xf0 lib/dump\_stack.c:106
print\_address\_description.constprop.0+0x66/0x300 mm/kasan/report.c:364
print\_report+0x3e/0x70 mm/kasan/report.c:475
kasan\_report+0xb8/0xf0 mm/kasan/report.c:588
blk\_mq\_find\_and\_get\_req+0x16e/0x1a0 block/blk-mq-tag.c:261
bt\_iter block/blk-mq-tag.c:288 \[inline\]
\_\_sbitmap\_for\_each\_set include/linux/sbitmap.h:295 \[inline\]
sbitmap\_for\_each\_set include/linux/sbitmap.h:316 \[inline\]
bt\_for\_each+0x455/0x790 block/blk-mq-tag.c:325
blk\_mq\_queue\_tag\_busy\_iter+0x320/0x740 block/blk-mq-tag.c:534
blk\_mq\_timeout\_work+0x1a3/0x7b0 block/blk-mq.c:1673
process\_one\_work+0x7c4/0x1450 kernel/workqueue.c:2631
process\_scheduled\_works kernel/workqueue.c:2704 \[inline\]
worker\_thread+0x804/0xe40 kernel/workqueue.c:2785
kthread+0x346/0x450 kernel/kthread.c:388
ret\_from\_fork+0x4d/0x80 arch/x86/kernel/process.c:147
ret\_from\_fork\_asm+0x1b/0x30 arch/x86/entry/entry\_64.S:293

Allocated by task 942:
kasan\_save\_stack+0x22/0x50 mm/kasan/common.c:45
kasan\_set\_track+0x25/0x30 mm/kasan/common.c:52
\_\_\_\_kasan\_kmalloc mm/kasan/common.c:374 \[inline\]
\_\_kasan\_kmalloc mm/kasan/common.c:383 \[inline\]
\_\_kasan\_kmalloc+0xaa/0xb0 mm/kasan/common.c:380
kasan\_kmalloc include/linux/kasan.h:198 \[inline\]
\_\_do\_kmalloc\_node mm/slab\_common.c:1007 \[inline\]
\_\_kmalloc\_node+0x69/0x170 mm/slab\_common.c:1014
kmalloc\_node include/linux/slab.h:620 \[inline\]
kzalloc\_node include/linux/slab.h:732 \[inline\]
blk\_alloc\_flush\_queue+0x144/0x2f0 block/blk-flush.c:499
blk\_mq\_alloc\_hctx+0x601/0x940 block/blk-mq.c:3788
blk\_mq\_alloc\_and\_init\_hctx+0x27f/0x330 block/blk-mq.c:4261
blk\_mq\_realloc\_hw\_ctxs+0x488/0x5e0 block/blk-mq.c:4294
blk\_mq\_init\_allocated\_queue+0x188/0x860 block/blk-mq.c:4350
blk\_mq\_init\_queue\_data block/blk-mq.c:4166 \[inline\]
blk\_mq\_init\_queue+0x8d/0x100 block/blk-mq.c:4176
scsi\_alloc\_sdev+0x843/0xd50 drivers/scsi/scsi\_scan.c:335
scsi\_probe\_and\_add\_lun+0x77c/0xde0 drivers/scsi/scsi\_scan.c:1189
\_\_scsi\_scan\_target+0x1fc/0x5a0 drivers/scsi/scsi\_scan.c:1727
scsi\_scan\_channel drivers/scsi/scsi\_scan.c:1815 \[inline\]
scsi\_scan\_channel+0x14b/0x1e0 drivers/scsi/scsi\_scan.c:1791
scsi\_scan\_host\_selected+0x2fe/0x400 drivers/scsi/scsi\_scan.c:1844
scsi\_scan+0x3a0/0x3f0 drivers/scsi/scsi\_sysfs.c:151
store\_scan+0x2a/0x60 drivers/scsi/scsi\_sysfs.c:191
dev\_attr\_store+0x5c/0x90 drivers/base/core.c:2388
sysfs\_kf\_write+0x11c/0x170 fs/sysfs/file.c:136
kernfs\_fop\_write\_iter+0x3fc/0x610 fs/kernfs/file.c:338
call\_write\_iter include/linux/fs.h:2083 \[inline\]
new\_sync\_write+0x1b4/0x2d0 fs/read\_write.c:493
vfs\_write+0x76c/0xb00 fs/read\_write.c:586
ksys\_write+0x127/0x250 fs/read\_write.c:639
do\_syscall\_x64 arch/x86/entry/common.c:51 \[inline\]
do\_syscall\_64+0x70/0x120 arch/x86/entry/common.c:81
entry\_SYSCALL\_64\_after\_hwframe+0x78/0xe2

Freed by task 244687:
kasan\_save\_stack+0x22/0x50 mm/kasan/common.c:45
kasan\_set\_track+0x25/0x30 mm/kasan/common.c:52
kasan\_save\_free\_info+0x2b/0x50 mm/kasan/generic.c:522
\_\_\_\_kasan\_slab\_free mm/kasan/common.c:236 \[inline\]
\_\_kasan\_slab\_free+0x12a/0x1b0 mm/kasan/common.c:244
kasan\_slab\_free include/linux/kasan.h:164 \[in
---truncated---

## Affected and fixed versions

- Linux: \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 1921fe7d2836f8be1d321cf430d17e0d4e05301b; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 1364a29b71c7837770f1902c49e7a6e234d72c92; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< a0e93b9fefafe97d596f9c98701ae6c3b04b3ff6; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 61092568f2a9acb0e6e186f03f2e0649a4e86d09; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 3802f73bd80766d70f319658f334754164075bc3 (cvelist)
- Linux: 5.19 (cvelist)

## Mitigation

- Upgrade Linux to 3802f73bd80766d70f319658f334754164075bc3 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-53170. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-53170.md
Affected: Linux >= 6cfeadbff3f8905f2854735ebb88e581402c16c4, < 1921fe7d2836f8be1d321cf430d17e0d4e05301b; >= 6cfeadbff3f8905f2854735ebb88e581402c16c4, < 1364a29b71c7837770f1902c49e7a6e234d72c92; >= 6cfeadbff3f8905f2854735ebb88e581402c16c4, < a0e93b9fefafe97d596f9c98701ae6c3b04b3ff6; >= 6cfeadbff3f8905f2854735…
Fixed in: Linux 1921fe7d2836f8be1d321cf430d17e0d4e05301b, Linux 1364a29b71c7837770f1902c49e7a6e234d72c92, Linux 61092568f2a9acb0e6e186f03f2e0649a4e86d09, Linux 3802f73bd80766d70f319658f334754164075bc3

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-53170 being exploited?

There is no confirmed exploitation: CVE-2024-53170 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-53170?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-53170?

Linux \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 1921fe7d2836f8be1d321cf430d17e0d4e05301b; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 1364a29b71c7837770f1902c49e7a6e234d72c92; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< a0e93b9fefafe97d596f9c98701ae6c3b04b3ff6; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 61092568f2a9acb0e6e186f03f2e0649a4e86d09; \>= 6cfeadbff3f8905f2854735ebb88e581402c16c4, \< 3802f73bd80766d70f319658f334754164075bc3; Linux 5.19.

### Is there a fix for CVE-2024-53170?

Yes. Fixed in Linux 1921fe7d2836f8be1d321cf430d17e0d4e05301b, Linux 1364a29b71c7837770f1902c49e7a6e234d72c92, Linux 61092568f2a9acb0e6e186f03f2e0649a4e86d09, Linux 3802f73bd80766d70f319658f334754164075bc3. Upgrade Linux to 3802f73bd80766d70f319658f334754164075bc3 or later.

### How do I check if I'm affected by CVE-2024-53170?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/a0e93b9fefafe97d596f9c98701ae6c3b04b3ff6>
- patch: <https://git.kernel.org/stable/c/61092568f2a9acb0e6e186f03f2e0649a4e86d09>
- patch: <https://git.kernel.org/stable/c/3802f73bd80766d70f319658f334754164075bc3>
- other: <https://git.kernel.org/stable/c/1921fe7d2836f8be1d321cf430d17e0d4e05301b>
- other: <https://git.kernel.org/stable/c/1364a29b71c7837770f1902c49e7a6e234d72c92>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-53170>

HTML: <https://flawdb.com/CVE-2024-53170> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-53170>
