# CVE-2022-50673: ext4: fix use-after-free in ext4\_orphan\_cleanup

> 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:N/UI:R/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: None; User interaction: Required; 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)
- **Published:** 2025-12-09T01:29:25.220Z
- **Modified:** 2026-08-05T08:59:21.383Z

## Who should check

- Anyone running Linux \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 7f801a1593cb957f73659732836b2dafbdfc7709; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 026a4490b5381229a30f23d073b58e8e35ee6858; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 7223d5e75f26352354ea2c0ccf8b579821b52adf; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< cf0e0817b0f925b70d101d7014ea81b7094e1159; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< c2bdbd4c69308835d1b6f6ba74feeccbfe113478; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 7908b8a541b1578cc61b4da7f19b604a931441da; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< a71248b1accb2b42e4980afef4fa4a27fa0e36f5
- Anyone running Linux 4.10

## Description

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

ext4: fix use-after-free in ext4\_orphan\_cleanup

I caught a issue as follows:
==================================================================
 BUG: KASAN: use-after-free in \_\_list\_add\_valid+0x28/0x1a0
 Read of size 8 at addr ffff88814b13f378 by task mount/710

 CPU: 1 PID: 710 Comm: mount Not tainted 6.1.0-rc3-next \#370
 Call Trace:
  \<TASK\>
  dump\_stack\_lvl+0x73/0x9f
  print\_report+0x25d/0x759
  kasan\_report+0xc0/0x120
  \_\_asan\_load8+0x99/0x140
  \_\_list\_add\_valid+0x28/0x1a0
  ext4\_orphan\_cleanup+0x564/0x9d0 \[ext4\]
  \_\_ext4\_fill\_super+0x48e2/0x5300 \[ext4\]
  ext4\_fill\_super+0x19f/0x3a0 \[ext4\]
  get\_tree\_bdev+0x27b/0x450
  ext4\_get\_tree+0x19/0x30 \[ext4\]
  vfs\_get\_tree+0x49/0x150
  path\_mount+0xaae/0x1350
  do\_mount+0xe2/0x110
  \_\_x64\_sys\_mount+0xf0/0x190
  do\_syscall\_64+0x35/0x80
  entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd
  \</TASK\>
 \[...\]
==================================================================

Above issue may happen as follows:
-------------------------------------
ext4\_fill\_super
  ext4\_orphan\_cleanup
   --- loop1: assume last\_orphan is 12 ---
    list\_add(&EXT4\_I(inode)-\>i\_orphan, &EXT4\_SB(sb)-\>s\_orphan)
    ext4\_truncate --\> return 0
      ext4\_inode\_attach\_jinode --\> return -ENOMEM
    iput(inode) --\> free inode\<12\>
   --- loop2: last\_orphan is still 12 ---
    list\_add(&EXT4\_I(inode)-\>i\_orphan, &EXT4\_SB(sb)-\>s\_orphan);
    // use inode\<12\> and trigger UAF

To solve this issue, we need to propagate the return value of
ext4\_inode\_attach\_jinode() appropriately.

## Affected and fixed versions

- Linux: \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 7f801a1593cb957f73659732836b2dafbdfc7709; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 026a4490b5381229a30f23d073b58e8e35ee6858; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 7223d5e75f26352354ea2c0ccf8b579821b52adf; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< cf0e0817b0f925b70d101d7014ea81b7094e1159; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< c2bdbd4c69308835d1b6f6ba74feeccbfe113478; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 7908b8a541b1578cc61b4da7f19b604a931441da; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< a71248b1accb2b42e4980afef4fa4a27fa0e36f5 (cvelist)
- Linux: 4.10 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-50673.md
Affected: Linux >= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, < 7f801a1593cb957f73659732836b2dafbdfc7709; >= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, < 026a4490b5381229a30f23d073b58e8e35ee6858; >= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, < 7223d5e75f26352354ea2c0ccf8b579821b52adf; >= 2c98eb5ea249767bbc11cf4…
Fixed in: Linux 7f801a1593cb957f73659732836b2dafbdfc7709, Linux 026a4490b5381229a30f23d073b58e8e35ee6858, Linux 7223d5e75f26352354ea2c0ccf8b579821b52adf, Linux 7908b8a541b1578cc61b4da7f19b604a931441da

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

There is no confirmed exploitation: CVE-2022-50673 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-50673?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

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

Linux \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 7f801a1593cb957f73659732836b2dafbdfc7709; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 026a4490b5381229a30f23d073b58e8e35ee6858; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 7223d5e75f26352354ea2c0ccf8b579821b52adf; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< cf0e0817b0f925b70d101d7014ea81b7094e1159; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< c2bdbd4c69308835d1b6f6ba74feeccbfe113478; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< 7908b8a541b1578cc61b4da7f19b604a931441da; \>= 2c98eb5ea249767bbc11cf4e70e91d5b0458ed13, \< a71248b1accb2b42e4980afef4fa4a27fa0e36f5; Linux 4.10.

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

Yes. Fixed in Linux 7f801a1593cb957f73659732836b2dafbdfc7709, Linux 026a4490b5381229a30f23d073b58e8e35ee6858, Linux 7223d5e75f26352354ea2c0ccf8b579821b52adf, Linux 7908b8a541b1578cc61b4da7f19b604a931441da. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/7f801a1593cb957f73659732836b2dafbdfc7709>
- other: <https://git.kernel.org/stable/c/026a4490b5381229a30f23d073b58e8e35ee6858>
- other: <https://git.kernel.org/stable/c/7223d5e75f26352354ea2c0ccf8b579821b52adf>
- other: <https://git.kernel.org/stable/c/cf0e0817b0f925b70d101d7014ea81b7094e1159>
- other: <https://git.kernel.org/stable/c/c2bdbd4c69308835d1b6f6ba74feeccbfe113478>
- other: <https://git.kernel.org/stable/c/7908b8a541b1578cc61b4da7f19b604a931441da>
- other: <https://git.kernel.org/stable/c/a71248b1accb2b42e4980afef4fa4a27fa0e36f5>

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

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