# CVE-2022-50406: iomap: iomap: fix memory corruption when recording errors during writeback

> 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.25% (percentile 10, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2025-09-18T16:03:51.155Z
- **Modified:** 2026-10-03T11:17:26.647Z

## Who should check

- Anyone running Linux \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 76a9234cb66479e9d02b15fd0f3e349cb2320279; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 169adb79cfd59250a5b1f68cdc69e7287fc5a0ce; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 82c66c46f73b88be74c869e2cbfef45281adf3c6; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 7308591d9c7787aec58f6a01a7823f14e90db7a2; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 3d5f3ba1ac28059bdf7000cae2403e4e984308d2
- Anyone running Linux 4.6

## Description

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

iomap: iomap: fix memory corruption when recording errors during writeback

Every now and then I see this crash on arm64:

Unable to handle kernel NULL pointer dereference at virtual address 00000000000000f8
Buffer I/O error on dev dm-0, logical block 8733687, async page read
Mem abort info:
  ESR = 0x0000000096000006
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x06: level 2 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000006
  CM = 0, WnR = 0
user pgtable: 64k pages, 42-bit VAs, pgdp=0000000139750000
\[00000000000000f8\] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000, pmd=0000000000000000
Internal error: Oops: 96000006 \[\#1\] PREEMPT SMP
Buffer I/O error on dev dm-0, logical block 8733688, async page read
Dumping ftrace buffer:
Buffer I/O error on dev dm-0, logical block 8733689, async page read
   (ftrace buffer empty)
XFS (dm-0): log I/O error -5
Modules linked in: dm\_thin\_pool dm\_persistent\_data
XFS (dm-0): Metadata I/O Error (0x1) detected at xfs\_trans\_read\_buf\_map+0x1ec/0x590 \[xfs\] (fs/xfs/xfs\_trans\_buf.c:296).
 dm\_bio\_prison
XFS (dm-0): Please unmount the filesystem and rectify the problem(s)
XFS (dm-0): xfs\_imap\_lookup: xfs\_ialloc\_read\_agi() returned error -5, agno 0
 dm\_bufio dm\_log\_writes xfs nft\_chain\_nat xt\_REDIRECT nf\_nat nf\_conntrack nf\_defrag\_ipv6 nf\_defrag\_ipv4 ip6t\_REJECT
potentially unexpected fatal signal 6.
 nf\_reject\_ipv6
potentially unexpected fatal signal 6.
 ipt\_REJECT nf\_reject\_ipv4
CPU: 1 PID: 122166 Comm: fsstress Tainted: G        W          6.0.0-rc5-djwa \#rc5 3004c9f1de887ebae86015f2677638ce51ee7
 rpcsec\_gss\_krb5 auth\_rpcgss xt\_tcpudp ip\_set\_hash\_ip ip\_set\_hash\_net xt\_set nft\_compat ip\_set\_hash\_mac ip\_set nf\_tables
Hardware name: QEMU KVM Virtual Machine, BIOS 1.5.1 06/16/2021
pstate: 60001000 (nZCv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--)
 ip\_tables
pc : 000003fd6d7df200
 x\_tables
lr : 000003fd6d7df1ec
 overlay nfsv4
CPU: 0 PID: 54031 Comm: u4:3 Tainted: G        W          6.0.0-rc5-djwa \#rc5 3004c9f1de887ebae86015f2677638ce51ee7405
Hardware name: QEMU KVM Virtual Machine, BIOS 1.5.1 06/16/2021
Workqueue: writeback wb\_workfn
sp : 000003ffd9522fd0
 (flush-253:0)
pstate: 60401005 (nZCv daif +PAN -UAO -TCO -DIT +SSBS BTYPE=--)
pc : errseq\_set+0x1c/0x100
x29: 000003ffd9522fd0 x28: 0000000000000023 x27: 000002acefeb6780
x26: 0000000000000005 x25: 0000000000000001 x24: 0000000000000000
x23: 00000000ffffffff x22: 0000000000000005
lr : \_\_filemap\_set\_wb\_err+0x24/0xe0
 x21: 0000000000000006
sp : fffffe000f80f760
x29: fffffe000f80f760 x28: 0000000000000003 x27: fffffe000f80f9f8
x26: 0000000002523000 x25: 00000000fffffffb x24: fffffe000f80f868
x23: fffffe000f80fbb0 x22: fffffc0180c26a78 x21: 0000000002530000
x20: 0000000000000000 x19: 0000000000000000 x18: 0000000000000000

x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000001 x13: 0000000000470af3 x12: fffffc0058f70000
x11: 0000000000000040 x10: 0000000000001b20 x9 : fffffe000836b288
x8 : fffffc00eb9fd480 x7 : 0000000000f83659 x6 : 0000000000000000
x5 : 0000000000000869 x4 : 0000000000000005 x3 : 00000000000000f8
x20: 000003fd6d740020 x19: 000000000001dd36 x18: 0000000000000001
x17: 000003fd6d78704c x16: 0000000000000001 x15: 000002acfac87668
x2 : 0000000000000ffa x1 : 00000000fffffffb x0 : 00000000000000f8
Call trace:
 errseq\_set+0x1c/0x100
 \_\_filemap\_set\_wb\_err+0x24/0xe0
 iomap\_do\_writepage+0x5e4/0xd5c
 write\_cache\_pages+0x208/0x674
 iomap\_writepages+0x34/0x60
 xfs\_vm\_writepages+0x8c/0xcc \[xfs 7a861f39c43631f15d3a5884246ba5035d4ca78b\]
x14: 0000000000000000 x13: 2064656e72757465 x12: 0000000000002180
x11: 000003fd6d8a82d0 x10: 0000000000000000 x9 : 000003fd6d8ae288
x8 : 0000000000000083 x7 : 00000000ffffffff x6 : 00000000ffffffee
x5 : 00000000fbad2887 x4 : 000003fd6d9abb58 x3 : 000003fd6d740020
x2 : 0000000000000006 x1 : 000000000001dd36 x0 : 0000000000000000
CPU: 
---truncated---

## Affected and fixed versions

- Linux: \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 76a9234cb66479e9d02b15fd0f3e349cb2320279; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 169adb79cfd59250a5b1f68cdc69e7287fc5a0ce; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 82c66c46f73b88be74c869e2cbfef45281adf3c6; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 7308591d9c7787aec58f6a01a7823f14e90db7a2; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 3d5f3ba1ac28059bdf7000cae2403e4e984308d2 (cvelist)
- Linux: 4.6 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2022-50406.md
Affected: Linux >= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, < 76a9234cb66479e9d02b15fd0f3e349cb2320279; >= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, < 169adb79cfd59250a5b1f68cdc69e7287fc5a0ce; >= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, < 82c66c46f73b88be74c869e2cbfef45281adf3c6; >= 150d5be09ce49a9bed6feb7…
Fixed in: Linux 76a9234cb66479e9d02b15fd0f3e349cb2320279, Linux 169adb79cfd59250a5b1f68cdc69e7287fc5a0ce, Linux 82c66c46f73b88be74c869e2cbfef45281adf3c6, Linux 7308591d9c7787aec58f6a01a7823f14e90db7a2, Linux 3d5f3ba1ac28059bdf7000cae2403e4e984308d2

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

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

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

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

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

Linux \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 76a9234cb66479e9d02b15fd0f3e349cb2320279; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 169adb79cfd59250a5b1f68cdc69e7287fc5a0ce; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 82c66c46f73b88be74c869e2cbfef45281adf3c6; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 7308591d9c7787aec58f6a01a7823f14e90db7a2; \>= 150d5be09ce49a9bed6feb7b7dc4e5ae188778ec, \< 3d5f3ba1ac28059bdf7000cae2403e4e984308d2; Linux 4.6.

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

Yes. Fixed in Linux 76a9234cb66479e9d02b15fd0f3e349cb2320279, Linux 169adb79cfd59250a5b1f68cdc69e7287fc5a0ce, Linux 82c66c46f73b88be74c869e2cbfef45281adf3c6, Linux 7308591d9c7787aec58f6a01a7823f14e90db7a2, Linux 3d5f3ba1ac28059bdf7000cae2403e4e984308d2. Upgrade Linux to 3d5f3ba1ac28059bdf7000cae2403e4e984308d2 or later.

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

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/82c66c46f73b88be74c869e2cbfef45281adf3c6>
- patch: <https://git.kernel.org/stable/c/7308591d9c7787aec58f6a01a7823f14e90db7a2>
- patch: <https://git.kernel.org/stable/c/3d5f3ba1ac28059bdf7000cae2403e4e984308d2>
- other: <https://git.kernel.org/stable/c/76a9234cb66479e9d02b15fd0f3e349cb2320279>
- other: <https://git.kernel.org/stable/c/169adb79cfd59250a5b1f68cdc69e7287fc5a0ce>

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

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