# CVE-2024-49932: btrfs: don't readahead the relocation inode on RST

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

- **Severity:** HIGH 7.0
- **CVSS:** 7.0 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; 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.27% (percentile 12, 2026-11-26)
- **CWE:** CWE-617
- **Published:** 2024-10-21T18:01:54.410Z
- **Modified:** 2026-08-05T11:40:31.087Z

## Who should check

- Anyone running Linux \>= 10e27980f2ff66ba0c6da55f33b4814d5bc86573, \< f7a1218a983ab98aba140dc20b25f60b39ee4033; \>= 10e27980f2ff66ba0c6da55f33b4814d5bc86573, \< 04915240e2c3a018e4c7f23418478d27226c8957
- Anyone running Linux 6.7

## Description

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

btrfs: don't readahead the relocation inode on RST

On relocation we're doing readahead on the relocation inode, but if the
filesystem is backed by a RAID stripe tree we can get ENOENT (e.g. due to
preallocated extents not being mapped in the RST) from the lookup.

But readahead doesn't handle the error and submits invalid reads to the
device, causing an assertion in the scatter-gather list code:

  BTRFS info (device nvme1n1): balance: start -d -m -s
  BTRFS info (device nvme1n1): relocating block group 6480920576 flags data\|raid0
  BTRFS error (device nvme1n1): cannot find raid-stripe for logical \[6481928192, 6481969152\] devid 2, profile raid0
  ------------\[ cut here \]------------
  kernel BUG at include/linux/scatterlist.h:115!
  Oops: invalid opcode: 0000 \[\#1\] PREEMPT SMP PTI
  CPU: 0 PID: 1012 Comm: btrfs Not tainted 6.10.0-rc7+ \#567
  RIP: 0010:\_\_blk\_rq\_map\_sg+0x339/0x4a0
  RSP: 0018:ffffc90001a43820 EFLAGS: 00010202
  RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffea00045d4802
  RDX: 0000000117520000 RSI: 0000000000000000 RDI: ffff8881027d1000
  RBP: 0000000000003000 R08: ffffea00045d4902 R09: 0000000000000000
  R10: 0000000000000000 R11: 0000000000001000 R12: ffff8881003d10b8
  R13: ffffc90001a438f0 R14: 0000000000000000 R15: 0000000000003000
  FS:  00007fcc048a6900(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 000000002cd11000 CR3: 00000001109ea001 CR4: 0000000000370eb0
  Call Trace:
   \<TASK\>
   ? \_\_die\_body.cold+0x14/0x25
   ? die+0x2e/0x50
   ? do\_trap+0xca/0x110
   ? do\_error\_trap+0x65/0x80
   ? \_\_blk\_rq\_map\_sg+0x339/0x4a0
   ? exc\_invalid\_op+0x50/0x70
   ? \_\_blk\_rq\_map\_sg+0x339/0x4a0
   ? asm\_exc\_invalid\_op+0x1a/0x20
   ? \_\_blk\_rq\_map\_sg+0x339/0x4a0
   nvme\_prep\_rq.part.0+0x9d/0x770
   nvme\_queue\_rq+0x7d/0x1e0
   \_\_blk\_mq\_issue\_directly+0x2a/0x90
   ? blk\_mq\_get\_budget\_and\_tag+0x61/0x90
   blk\_mq\_try\_issue\_list\_directly+0x56/0xf0
   blk\_mq\_flush\_plug\_list.part.0+0x52b/0x5d0
   \_\_blk\_flush\_plug+0xc6/0x110
   blk\_finish\_plug+0x28/0x40
   read\_pages+0x160/0x1c0
   page\_cache\_ra\_unbounded+0x109/0x180
   relocate\_file\_extent\_cluster+0x611/0x6a0
   ? btrfs\_search\_slot+0xba4/0xd20
   ? balance\_dirty\_pages\_ratelimited\_flags+0x26/0xb00
   relocate\_data\_extent.constprop.0+0x134/0x160
   relocate\_block\_group+0x3f2/0x500
   btrfs\_relocate\_block\_group+0x250/0x430
   btrfs\_relocate\_chunk+0x3f/0x130
   btrfs\_balance+0x71b/0xef0
   ? kmalloc\_trace\_noprof+0x13b/0x280
   btrfs\_ioctl+0x2c2e/0x3030
   ? kvfree\_call\_rcu+0x1e6/0x340
   ? list\_lru\_add\_obj+0x66/0x80
   ? mntput\_no\_expire+0x3a/0x220
   \_\_x64\_sys\_ioctl+0x96/0xc0
   do\_syscall\_64+0x54/0x110
   entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
  RIP: 0033:0x7fcc04514f9b
  Code: Unable to access opcode bytes at 0x7fcc04514f71.
  RSP: 002b:00007ffeba923370 EFLAGS: 00000246 ORIG\_RAX: 0000000000000010
  RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fcc04514f9b
  RDX: 00007ffeba923460 RSI: 00000000c4009420 RDI: 0000000000000003
  RBP: 0000000000000000 R08: 0000000000000013 R09: 0000000000000001
  R10: 00007fcc043fbba8 R11: 0000000000000246 R12: 00007ffeba924fc5
  R13: 00007ffeba923460 R14: 0000000000000002 R15: 00000000004d4bb0
   \</TASK\>
  Modules linked in:
  ---\[ end trace 0000000000000000 \]---
  RIP: 0010:\_\_blk\_rq\_map\_sg+0x339/0x4a0
  RSP: 0018:ffffc90001a43820 EFLAGS: 00010202
  RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffea00045d4802
  RDX: 0000000117520000 RSI: 0000000000000000 RDI: ffff8881027d1000
  RBP: 0000000000003000 R08: ffffea00045d4902 R09: 0000000000000000
  R10: 0000000000000000 R11: 0000000000001000 R12: ffff8881003d10b8
  R13: ffffc90001a438f0 R14: 0000000000000000 R15: 0000000000003000
  FS:  00007fcc048a6900(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 00007fcc04514f71 CR3: 00000001109ea001 CR4: 0000000000370eb0
  Kernel p
---truncated---

## Affected and fixed versions

- Linux: \>= 10e27980f2ff66ba0c6da55f33b4814d5bc86573, \< f7a1218a983ab98aba140dc20b25f60b39ee4033; \>= 10e27980f2ff66ba0c6da55f33b4814d5bc86573, \< 04915240e2c3a018e4c7f23418478d27226c8957 (cvelist)
- Linux: 6.7 (cvelist)

## Mitigation

- Upgrade Linux to 04915240e2c3a018e4c7f23418478d27226c8957 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-49932. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-49932.md
Affected: Linux >= 10e27980f2ff66ba0c6da55f33b4814d5bc86573, < f7a1218a983ab98aba140dc20b25f60b39ee4033; >= 10e27980f2ff66ba0c6da55f33b4814d5bc86573, < 04915240e2c3a018e4c7f23418478d27226c8957; Linux 6.7
Fixed in: Linux 04915240e2c3a018e4c7f23418478d27226c8957

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-49932 being exploited?

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

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

High: CVSS 7.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

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

Linux \>= 10e27980f2ff66ba0c6da55f33b4814d5bc86573, \< f7a1218a983ab98aba140dc20b25f60b39ee4033; \>= 10e27980f2ff66ba0c6da55f33b4814d5bc86573, \< 04915240e2c3a018e4c7f23418478d27226c8957; Linux 6.7.

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

Yes. Fixed in Linux 04915240e2c3a018e4c7f23418478d27226c8957. Upgrade Linux to 04915240e2c3a018e4c7f23418478d27226c8957 or later.

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

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/f7a1218a983ab98aba140dc20b25f60b39ee4033>
- patch: <https://git.kernel.org/stable/c/04915240e2c3a018e4c7f23418478d27226c8957>

## 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-49932>

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