# CVE-2022-49409: ext4: fix bug\_on in \_\_es\_tree\_search

> 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.29% (percentile 14, 2026-11-26)
- **CWE:** CWE-617
- **Published:** 2025-02-26T02:12:32.591Z
- **Modified:** 2026-06-17T05:17:58.033Z

## Who should check

- Anyone running Linux \>= 5946d089379a35dda0e531710b48fca05446a196, \< d0083459e2b6b07ebd78bea2fe684a19cc0f3d0f; \>= 5946d089379a35dda0e531710b48fca05446a196, \< 4fd58b5cf118d2d9038a0b8c9cc0e43096297686; \>= 5946d089379a35dda0e531710b48fca05446a196, \< 3c617827cd51018bc377bd2954e176920ddbcfad; \>= 5946d089379a35dda0e531710b48fca05446a196, \< 59cf2fabbfe76de29d88dd7ae69858a25735b59f; \>= 5946d089379a35dda0e531710b48fca05446a196, \< ea6ea18b3ab0c0d7fefffb3c4d27df758b1c790a; \>= 5946d089379a35dda0e531710b48fca05446a196, \< d36f6ed761b53933b0b4126486c10d3da7751e7f; 4645e4ee32aee01a85bdc03348982a65c65ce216; a1192c0e5d037def6763f3873d3340615c241fe7; ae21dda05193c441bde106a4bbf88c185a68fbed; ea214c946ee77588c4313be3e9951edd25d6b270; …
- Anyone running Linux 3.13

## Description

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

ext4: fix bug\_on in \_\_es\_tree\_search

Hulk Robot reported a BUG\_ON:
==================================================================
kernel BUG at fs/ext4/extents\_status.c:199!
\[...\]
RIP: 0010:ext4\_es\_end fs/ext4/extents\_status.c:199 \[inline\]
RIP: 0010:\_\_es\_tree\_search+0x1e0/0x260 fs/ext4/extents\_status.c:217
\[...\]
Call Trace:
 ext4\_es\_cache\_extent+0x109/0x340 fs/ext4/extents\_status.c:766
 ext4\_cache\_extents+0x239/0x2e0 fs/ext4/extents.c:561
 ext4\_find\_extent+0x6b7/0xa20 fs/ext4/extents.c:964
 ext4\_ext\_map\_blocks+0x16b/0x4b70 fs/ext4/extents.c:4384
 ext4\_map\_blocks+0xe26/0x19f0 fs/ext4/inode.c:567
 ext4\_getblk+0x320/0x4c0 fs/ext4/inode.c:980
 ext4\_bread+0x2d/0x170 fs/ext4/inode.c:1031
 ext4\_quota\_read+0x248/0x320 fs/ext4/super.c:6257
 v2\_read\_header+0x78/0x110 fs/quota/quota\_v2.c:63
 v2\_check\_quota\_file+0x76/0x230 fs/quota/quota\_v2.c:82
 vfs\_load\_quota\_inode+0x5d1/0x1530 fs/quota/dquot.c:2368
 dquot\_enable+0x28a/0x330 fs/quota/dquot.c:2490
 ext4\_quota\_enable fs/ext4/super.c:6137 \[inline\]
 ext4\_enable\_quotas+0x5d7/0x960 fs/ext4/super.c:6163
 ext4\_fill\_super+0xa7c9/0xdc00 fs/ext4/super.c:4754
 mount\_bdev+0x2e9/0x3b0 fs/super.c:1158
 mount\_fs+0x4b/0x1e4 fs/super.c:1261
\[...\]
==================================================================

Above issue may happen as follows:
-------------------------------------
ext4\_fill\_super
 ext4\_enable\_quotas
  ext4\_quota\_enable
   ext4\_iget
    \_\_ext4\_iget
     ext4\_ext\_check\_inode
      ext4\_ext\_check
       \_\_ext4\_ext\_check
        ext4\_valid\_extent\_entries
         Check for overlapping extents does't take effect
   dquot\_enable
    vfs\_load\_quota\_inode
     v2\_check\_quota\_file
      v2\_read\_header
       ext4\_quota\_read
        ext4\_bread
         ext4\_getblk
          ext4\_map\_blocks
           ext4\_ext\_map\_blocks
            ext4\_find\_extent
             ext4\_cache\_extents
              ext4\_es\_cache\_extent
               ext4\_es\_cache\_extent
                \_\_es\_tree\_search
                 ext4\_es\_end
                  BUG\_ON(es-\>es\_lblk + es-\>es\_len \< es-\>es\_lblk)

The error ext4 extents is as follows:
0af3 0300 0400 0000 00000000    extent\_header
00000000 0100 0000 12000000     extent1
00000000 0100 0000 18000000     extent2
02000000 0400 0000 14000000     extent3

In the ext4\_valid\_extent\_entries function,
if prev is 0, no error is returned even if lblock\<=prev.
This was intended to skip the check on the first extent, but
in the error image above, prev=0+1-1=0 when checking the second extent,
so even though lblock\<=prev, the function does not return an error.
As a result, bug\_ON occurs in \_\_es\_tree\_search and the system panics.

To solve this problem, we only need to check that:
1. The lblock of the first extent is not less than 0.
2. The lblock of the next extent  is not less than
   the next block of the previous extent.
The same applies to extent\_idx.

## Affected and fixed versions

- Linux: \>= 5946d089379a35dda0e531710b48fca05446a196, \< d0083459e2b6b07ebd78bea2fe684a19cc0f3d0f; \>= 5946d089379a35dda0e531710b48fca05446a196, \< 4fd58b5cf118d2d9038a0b8c9cc0e43096297686; \>= 5946d089379a35dda0e531710b48fca05446a196, \< 3c617827cd51018bc377bd2954e176920ddbcfad; \>= 5946d089379a35dda0e531710b48fca05446a196, \< 59cf2fabbfe76de29d88dd7ae69858a25735b59f; \>= 5946d089379a35dda0e531710b48fca05446a196, \< ea6ea18b3ab0c0d7fefffb3c4d27df758b1c790a; \>= 5946d089379a35dda0e531710b48fca05446a196, \< d36f6ed761b53933b0b4126486c10d3da7751e7f; 4645e4ee32aee01a85bdc03348982a65c65ce216; a1192c0e5d037def6763f3873d3340615c241fe7; ae21dda05193c441bde106a4bbf88c185a68fbed; ea214c946ee77588c4313be3e9951edd25d6b270; … (cvelist)
- Linux: 3.13 (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-49409. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49409.md
Affected: Linux >= 5946d089379a35dda0e531710b48fca05446a196, < d0083459e2b6b07ebd78bea2fe684a19cc0f3d0f; >= 5946d089379a35dda0e531710b48fca05446a196, < 4fd58b5cf118d2d9038a0b8c9cc0e43096297686; >= 5946d089379a35dda0e531710b48fca05446a196, < 3c617827cd51018bc377bd2954e176920ddbcfad; >= 5946d089379a35dda0e5317…
Fixed in: Linux 4fd58b5cf118d2d9038a0b8c9cc0e43096297686, Linux 3c617827cd51018bc377bd2954e176920ddbcfad, Linux 59cf2fabbfe76de29d88dd7ae69858a25735b59f

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

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

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

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

Linux \>= 5946d089379a35dda0e531710b48fca05446a196, \< d0083459e2b6b07ebd78bea2fe684a19cc0f3d0f; \>= 5946d089379a35dda0e531710b48fca05446a196, \< 4fd58b5cf118d2d9038a0b8c9cc0e43096297686; \>= 5946d089379a35dda0e531710b48fca05446a196, \< 3c617827cd51018bc377bd2954e176920ddbcfad; \>= 5946d089379a35dda0e531710b48fca05446a196, \< 59cf2fabbfe76de29d88dd7ae69858a25735b59f; \>= 5946d089379a35dda0e531710b48fca05446a196, \< ea6ea18b3ab0c0d7fefffb3c4d27df758b1c790a; \>= 5946d089379a35dda0e531710b48fca05446a196, \< d36f6ed761b53933b0b4126486c10d3da7751e7f; 4645e4ee32aee01a85bdc03348982a65c65ce216; a1192c0e5d037def6763f3873d3340615c241fe7; ae21dda05193c441bde106a4bbf88c185a68fbed; ea214c946ee77588c4313be3e9951edd25d6b270; …; Linux 3.13.

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

Yes. Fixed in Linux 4fd58b5cf118d2d9038a0b8c9cc0e43096297686, Linux 3c617827cd51018bc377bd2954e176920ddbcfad, Linux 59cf2fabbfe76de29d88dd7ae69858a25735b59f. No fix listed yet: follow the vendor advisory.

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

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/d0083459e2b6b07ebd78bea2fe684a19cc0f3d0f>
- patch: <https://git.kernel.org/stable/c/4fd58b5cf118d2d9038a0b8c9cc0e43096297686>
- patch: <https://git.kernel.org/stable/c/3c617827cd51018bc377bd2954e176920ddbcfad>
- patch: <https://git.kernel.org/stable/c/59cf2fabbfe76de29d88dd7ae69858a25735b59f>
- patch: <https://git.kernel.org/stable/c/ea6ea18b3ab0c0d7fefffb3c4d27df758b1c790a>
- patch: <https://git.kernel.org/stable/c/d36f6ed761b53933b0b4126486c10d3da7751e7f>

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

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