# CVE-2022-48913: blktrace: fix use after free for struct blk\_trace

> 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.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-08-22T01:31:34.860Z
- **Modified:** 2026-08-05T08:52:53.708Z

## Who should check

- Anyone running Linux \>= c0ea57608b691d6cde8aff23e11f9858a86b5918, \< 78acc7dbd84a8c173a08584750845c31611160f2; \>= c0ea57608b691d6cde8aff23e11f9858a86b5918, \< 6418634238ade86f2b08192928787f39d8afb58c; \>= c0ea57608b691d6cde8aff23e11f9858a86b5918, \< 30939293262eb433c960c4532a0d59c4073b2b84
- Anyone running Linux 5.12

## Description

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

blktrace: fix use after free for struct blk\_trace

When tracing the whole disk, 'dropped' and 'msg' will be created
under 'q-\>debugfs\_dir' and 'bt-\>dir' is NULL, thus blk\_trace\_free()
won't remove those files. What's worse, the following UAF can be
triggered because of accessing stale 'dropped' and 'msg':

==================================================================
BUG: KASAN: use-after-free in blk\_dropped\_read+0x89/0x100
Read of size 4 at addr ffff88816912f3d8 by task blktrace/1188

CPU: 27 PID: 1188 Comm: blktrace Not tainted 5.17.0-rc4-next-20220217+ \#469
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727\_073836-4
Call Trace:
 \<TASK\>
 dump\_stack\_lvl+0x34/0x44
 print\_address\_description.constprop.0.cold+0xab/0x381
 ? blk\_dropped\_read+0x89/0x100
 ? blk\_dropped\_read+0x89/0x100
 kasan\_report.cold+0x83/0xdf
 ? blk\_dropped\_read+0x89/0x100
 kasan\_check\_range+0x140/0x1b0
 blk\_dropped\_read+0x89/0x100
 ? blk\_create\_buf\_file\_callback+0x20/0x20
 ? kmem\_cache\_free+0xa1/0x500
 ? do\_sys\_openat2+0x258/0x460
 full\_proxy\_read+0x8f/0xc0
 vfs\_read+0xc6/0x260
 ksys\_read+0xb9/0x150
 ? vfs\_write+0x3d0/0x3d0
 ? fpregs\_assert\_state\_consistent+0x55/0x60
 ? exit\_to\_user\_mode\_prepare+0x39/0x1e0
 do\_syscall\_64+0x35/0x80
 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae
RIP: 0033:0x7fbc080d92fd
Code: ce 20 00 00 75 10 b8 00 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 1
RSP: 002b:00007fbb95ff9cb0 EFLAGS: 00000293 ORIG\_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007fbb95ff9dc0 RCX: 00007fbc080d92fd
RDX: 0000000000000100 RSI: 00007fbb95ff9cc0 RDI: 0000000000000045
RBP: 0000000000000045 R08: 0000000000406299 R09: 00000000fffffffd
R10: 000000000153afa0 R11: 0000000000000293 R12: 00007fbb780008c0
R13: 00007fbb78000938 R14: 0000000000608b30 R15: 00007fbb780029c8
 \</TASK\>

Allocated by task 1050:
 kasan\_save\_stack+0x1e/0x40
 \_\_kasan\_kmalloc+0x81/0xa0
 do\_blk\_trace\_setup+0xcb/0x410
 \_\_blk\_trace\_setup+0xac/0x130
 blk\_trace\_ioctl+0xe9/0x1c0
 blkdev\_ioctl+0xf1/0x390
 \_\_x64\_sys\_ioctl+0xa5/0xe0
 do\_syscall\_64+0x35/0x80
 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

Freed by task 1050:
 kasan\_save\_stack+0x1e/0x40
 kasan\_set\_track+0x21/0x30
 kasan\_set\_free\_info+0x20/0x30
 \_\_kasan\_slab\_free+0x103/0x180
 kfree+0x9a/0x4c0
 \_\_blk\_trace\_remove+0x53/0x70
 blk\_trace\_ioctl+0x199/0x1c0
 blkdev\_common\_ioctl+0x5e9/0xb30
 blkdev\_ioctl+0x1a5/0x390
 \_\_x64\_sys\_ioctl+0xa5/0xe0
 do\_syscall\_64+0x35/0x80
 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

The buggy address belongs to the object at ffff88816912f380
 which belongs to the cache kmalloc-96 of size 96
The buggy address is located 88 bytes inside of
 96-byte region \[ffff88816912f380, ffff88816912f3e0)
The buggy address belongs to the page:
page:000000009a1b4e7c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0f
flags: 0x17ffffc0000200(slab\|node=0\|zone=2\|lastcpupid=0x1fffff)
raw: 0017ffffc0000200 ffffea00044f1100 dead000000000002 ffff88810004c780
raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88816912f280: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
 ffff88816912f300: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
\>ffff88816912f380: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
                                                    ^
 ffff88816912f400: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
 ffff88816912f480: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
==================================================================

## Affected and fixed versions

- Linux: \>= c0ea57608b691d6cde8aff23e11f9858a86b5918, \< 78acc7dbd84a8c173a08584750845c31611160f2; \>= c0ea57608b691d6cde8aff23e11f9858a86b5918, \< 6418634238ade86f2b08192928787f39d8afb58c; \>= c0ea57608b691d6cde8aff23e11f9858a86b5918, \< 30939293262eb433c960c4532a0d59c4073b2b84 (cvelist)
- Linux: 5.12 (cvelist)

## Mitigation

- Upgrade Linux to 30939293262eb433c960c4532a0d59c4073b2b84 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-48913.md
Affected: Linux >= c0ea57608b691d6cde8aff23e11f9858a86b5918, < 78acc7dbd84a8c173a08584750845c31611160f2; >= c0ea57608b691d6cde8aff23e11f9858a86b5918, < 6418634238ade86f2b08192928787f39d8afb58c; >= c0ea57608b691d6cde8aff23e11f9858a86b5918, < 30939293262eb433c960c4532a0d59c4073b2b84; Linux 5.12
Fixed in: Linux 78acc7dbd84a8c173a08584750845c31611160f2, Linux 6418634238ade86f2b08192928787f39d8afb58c, Linux 30939293262eb433c960c4532a0d59c4073b2b84

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-2022-48913 being exploited?

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

### How serious is CVE-2022-48913?

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

### Which versions are affected by CVE-2022-48913?

Linux \>= c0ea57608b691d6cde8aff23e11f9858a86b5918, \< 78acc7dbd84a8c173a08584750845c31611160f2; \>= c0ea57608b691d6cde8aff23e11f9858a86b5918, \< 6418634238ade86f2b08192928787f39d8afb58c; \>= c0ea57608b691d6cde8aff23e11f9858a86b5918, \< 30939293262eb433c960c4532a0d59c4073b2b84; Linux 5.12.

### Is there a fix for CVE-2022-48913?

Yes. Fixed in Linux 78acc7dbd84a8c173a08584750845c31611160f2, Linux 6418634238ade86f2b08192928787f39d8afb58c, Linux 30939293262eb433c960c4532a0d59c4073b2b84. Upgrade Linux to 30939293262eb433c960c4532a0d59c4073b2b84 or later.

### How do I check if I'm affected by CVE-2022-48913?

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/78acc7dbd84a8c173a08584750845c31611160f2>
- patch: <https://git.kernel.org/stable/c/6418634238ade86f2b08192928787f39d8afb58c>
- patch: <https://git.kernel.org/stable/c/30939293262eb433c960c4532a0d59c4073b2b84>

## 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-2022-48913>

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