# CVE-2022-50456: btrfs: fix resolving backrefs for inline extent followed by prealloc

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.22% (percentile 7, 2026-11-26)
- **Published:** 2025-10-01T11:45:29.587Z
- **Modified:** 2026-06-17T05:23:35.477Z

## Who should check

- Anyone running Linux \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< c59ee1528b3432ec9dca220567f7eb507820917a; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 0061ab5153fb8bc574b44fbb773680d0ede48c9c; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 99590f29b2b7567fda2b503aa3d81a0d3e09dce5; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 645e2dac6e97f756f28a2f82b2e7bf7f29a68827; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< a94b90ac1f251d1007c0c43ee289a61b50f2505f; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 560840afc3e63bbe5d9c5ef6b2ecf8f3589adff6
- Anyone running Linux 3.3

## Description

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

btrfs: fix resolving backrefs for inline extent followed by prealloc

If a file consists of an inline extent followed by a regular or prealloc
extent, then a legitimate attempt to resolve a logical address in the
non-inline region will result in add\_all\_parents reading the invalid
offset field of the inline extent. If the inline extent item is placed
in the leaf eb s.t. it is the first item, attempting to access the
offset field will not only be meaningless, it will go past the end of
the eb and cause this panic:

  \[17.626048\] BTRFS warning (device dm-2): bad eb member end: ptr 0x3fd4 start 30834688 member offset 16377 size 8
  \[17.631693\] general protection fault, probably for non-canonical address 0x5088000000000: 0000 \[\#1\] SMP PTI
  \[17.635041\] CPU: 2 PID: 1267 Comm: btrfs Not tainted 5.12.0-07246-g75175d5adc74-dirty \#199
  \[17.637969\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
  \[17.641995\] RIP: 0010:btrfs\_get\_64+0xe7/0x110
  \[17.649890\] RSP: 0018:ffffc90001f73a08 EFLAGS: 00010202
  \[17.651652\] RAX: 0000000000000001 RBX: ffff88810c42d000 RCX: 0000000000000000
  \[17.653921\] RDX: 0005088000000000 RSI: ffffc90001f73a0f RDI: 0000000000000001
  \[17.656174\] RBP: 0000000000000ff9 R08: 0000000000000007 R09: c0000000fffeffff
  \[17.658441\] R10: ffffc90001f73790 R11: ffffc90001f73788 R12: ffff888106afe918
  \[17.661070\] R13: 0000000000003fd4 R14: 0000000000003f6f R15: cdcdcdcdcdcdcdcd
  \[17.663617\] FS:  00007f64e7627d80(0000) GS:ffff888237c80000(0000) knlGS:0000000000000000
  \[17.666525\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  \[17.668664\] CR2: 000055d4a39152e8 CR3: 000000010c596002 CR4: 0000000000770ee0
  \[17.671253\] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  \[17.673634\] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
  \[17.676034\] PKRU: 55555554
  \[17.677004\] Call Trace:
  \[17.677877\]  add\_all\_parents+0x276/0x480
  \[17.679325\]  find\_parent\_nodes+0xfae/0x1590
  \[17.680771\]  btrfs\_find\_all\_leafs+0x5e/0xa0
  \[17.682217\]  iterate\_extent\_inodes+0xce/0x260
  \[17.683809\]  ? btrfs\_inode\_flags\_to\_xflags+0x50/0x50
  \[17.685597\]  ? iterate\_inodes\_from\_logical+0xa1/0xd0
  \[17.687404\]  iterate\_inodes\_from\_logical+0xa1/0xd0
  \[17.689121\]  ? btrfs\_inode\_flags\_to\_xflags+0x50/0x50
  \[17.691010\]  btrfs\_ioctl\_logical\_to\_ino+0x131/0x190
  \[17.692946\]  btrfs\_ioctl+0x104a/0x2f60
  \[17.694384\]  ? selinux\_file\_ioctl+0x182/0x220
  \[17.695995\]  ? \_\_x64\_sys\_ioctl+0x84/0xc0
  \[17.697394\]  \_\_x64\_sys\_ioctl+0x84/0xc0
  \[17.698697\]  do\_syscall\_64+0x33/0x40
  \[17.700017\]  entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae
  \[17.701753\] RIP: 0033:0x7f64e72761b7
  \[17.709355\] RSP: 002b:00007ffefb067f58 EFLAGS: 00000246 ORIG\_RAX: 0000000000000010
  \[17.712088\] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f64e72761b7
  \[17.714667\] RDX: 00007ffefb067fb0 RSI: 00000000c0389424 RDI: 0000000000000003
  \[17.717386\] RBP: 00007ffefb06d188 R08: 000055d4a390d2b0 R09: 00007f64e7340a60
  \[17.719938\] R10: 0000000000000231 R11: 0000000000000246 R12: 0000000000000001
  \[17.722383\] R13: 0000000000000000 R14: 00000000c0389424 R15: 000055d4a38fd2a0
  \[17.724839\] Modules linked in:

Fix the bug by detecting the inline extent item in add\_all\_parents and
skipping to the next extent item.

## Affected and fixed versions

- Linux: \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< c59ee1528b3432ec9dca220567f7eb507820917a; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 0061ab5153fb8bc574b44fbb773680d0ede48c9c; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 99590f29b2b7567fda2b503aa3d81a0d3e09dce5; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 645e2dac6e97f756f28a2f82b2e7bf7f29a68827; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< a94b90ac1f251d1007c0c43ee289a61b50f2505f; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 560840afc3e63bbe5d9c5ef6b2ecf8f3589adff6 (cvelist)
- Linux: 3.3 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2022-50456.md
Affected: Linux >= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, < c59ee1528b3432ec9dca220567f7eb507820917a; >= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, < 0061ab5153fb8bc574b44fbb773680d0ede48c9c; >= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, < 99590f29b2b7567fda2b503aa3d81a0d3e09dce5; >= 8da6d5815c592b713ecaf4f…
Fixed in: Linux 0061ab5153fb8bc574b44fbb773680d0ede48c9c, Linux 99590f29b2b7567fda2b503aa3d81a0d3e09dce5, Linux 645e2dac6e97f756f28a2f82b2e7bf7f29a68827, Linux 560840afc3e63bbe5d9c5ef6b2ecf8f3589adff6

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

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< c59ee1528b3432ec9dca220567f7eb507820917a; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 0061ab5153fb8bc574b44fbb773680d0ede48c9c; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 99590f29b2b7567fda2b503aa3d81a0d3e09dce5; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 645e2dac6e97f756f28a2f82b2e7bf7f29a68827; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< a94b90ac1f251d1007c0c43ee289a61b50f2505f; \>= 8da6d5815c592b713ecaf4f4f8b631f8359c96c4, \< 560840afc3e63bbe5d9c5ef6b2ecf8f3589adff6; Linux 3.3.

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

Yes. Fixed in Linux 0061ab5153fb8bc574b44fbb773680d0ede48c9c, Linux 99590f29b2b7567fda2b503aa3d81a0d3e09dce5, Linux 645e2dac6e97f756f28a2f82b2e7bf7f29a68827, Linux 560840afc3e63bbe5d9c5ef6b2ecf8f3589adff6. Upgrade Linux to 560840afc3e63bbe5d9c5ef6b2ecf8f3589adff6 or later.

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

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/c59ee1528b3432ec9dca220567f7eb507820917a>
- patch: <https://git.kernel.org/stable/c/0061ab5153fb8bc574b44fbb773680d0ede48c9c>
- patch: <https://git.kernel.org/stable/c/99590f29b2b7567fda2b503aa3d81a0d3e09dce5>
- patch: <https://git.kernel.org/stable/c/645e2dac6e97f756f28a2f82b2e7bf7f29a68827>
- patch: <https://git.kernel.org/stable/c/a94b90ac1f251d1007c0c43ee289a61b50f2505f>
- patch: <https://git.kernel.org/stable/c/560840afc3e63bbe5d9c5ef6b2ecf8f3589adff6>

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

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