# CVE-2023-53813: ext4: fix rbtree traversal bug in ext4\_mb\_use\_preallocated

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.29% (percentile 14, 2026-11-26)
- **Published:** 2025-12-09T00:01:10.886Z
- **Modified:** 2026-06-17T06:46:07.027Z

## Who should check

- Anyone running Linux \>= 3872778664e36528caf8b27f355e75482f6d562d, \< 339fee69a1daa71d6f97e47a867e2c32419a2406; \>= 3872778664e36528caf8b27f355e75482f6d562d, \< 9d3de7ee192a6a253f475197fe4d2e2af10a731f
- Anyone running Linux 6.4

## Description

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

ext4: fix rbtree traversal bug in ext4\_mb\_use\_preallocated

During allocations, while looking for preallocations(PA) in the per
inode rbtree, we can't do a direct traversal of the tree because
ext4\_mb\_discard\_group\_preallocation() can paralelly mark the pa deleted
and that can cause direct traversal to skip some entries. This was
leading to a BUG\_ON() being hit \[1\] when we missed a PA that could satisfy
our request and ultimately tried to create a new PA that would overlap
with the missed one.

To makes sure we handle that case while still keeping the performance of
the rbtree, we make use of the fact that the only pa that could possibly
overlap the original goal start is the one that satisfies the below
conditions:

  1. It must have it's logical start immediately to the left of
  (ie less than) original logical start.

  2. It must not be deleted

To find this pa we use the following traversal method:

1. Descend into the rbtree normally to find the immediate neighboring
PA. Here we keep descending irrespective of if the PA is deleted or if
it overlaps with our request etc. The goal is to find an immediately
adjacent PA.

2. If the found PA is on right of original goal, use rb\_prev() to find
the left adjacent PA.

3. Check if this PA is deleted and keep moving left with rb\_prev() until
a non deleted PA is found.

4. This is the PA we are looking for. Now we can check if it can satisfy
the original request and proceed accordingly.

This approach also takes care of having deleted PAs in the tree.

(While we are at it, also fix a possible overflow bug in calculating the
end of a PA)

\[1\] https://lore.kernel.org/linux-ext4/CA+G9fYv2FRpLqBZf34ZinR8bU2\_ZRAUOjKAD3+tKRFaEQHtt8Q@mail.gmail.com/

## Affected and fixed versions

- Linux: \>= 3872778664e36528caf8b27f355e75482f6d562d, \< 339fee69a1daa71d6f97e47a867e2c32419a2406; \>= 3872778664e36528caf8b27f355e75482f6d562d, \< 9d3de7ee192a6a253f475197fe4d2e2af10a731f (cvelist)
- Linux: 6.4 (cvelist)

## Mitigation

- Upgrade Linux to 9d3de7ee192a6a253f475197fe4d2e2af10a731f or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-53813.md
Affected: Linux >= 3872778664e36528caf8b27f355e75482f6d562d, < 339fee69a1daa71d6f97e47a867e2c32419a2406; >= 3872778664e36528caf8b27f355e75482f6d562d, < 9d3de7ee192a6a253f475197fe4d2e2af10a731f; Linux 6.4
Fixed in: Linux 339fee69a1daa71d6f97e47a867e2c32419a2406, Linux 9d3de7ee192a6a253f475197fe4d2e2af10a731f

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-2023-53813 being exploited?

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

### How serious is CVE-2023-53813?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2023-53813?

Linux \>= 3872778664e36528caf8b27f355e75482f6d562d, \< 339fee69a1daa71d6f97e47a867e2c32419a2406; \>= 3872778664e36528caf8b27f355e75482f6d562d, \< 9d3de7ee192a6a253f475197fe4d2e2af10a731f; Linux 6.4.

### Is there a fix for CVE-2023-53813?

Yes. Fixed in Linux 339fee69a1daa71d6f97e47a867e2c32419a2406, Linux 9d3de7ee192a6a253f475197fe4d2e2af10a731f. Upgrade Linux to 9d3de7ee192a6a253f475197fe4d2e2af10a731f or later.

### How do I check if I'm affected by CVE-2023-53813?

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/339fee69a1daa71d6f97e47a867e2c32419a2406>
- other: <https://git.kernel.org/stable/c/9d3de7ee192a6a253f475197fe4d2e2af10a731f>

## 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-2023-53813>

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