# CVE-2022-50782: ext4: fix bug\_on in \_\_es\_tree\_search caused by bad quota inode

> 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.30% (percentile 15, 2026-11-26)
- **Published:** 2025-12-24T13:06:09.914Z
- **Modified:** 2026-11-10T12:10:00.177Z

## Who should check

- Anyone running Linux \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< fb1d3b4107b4837b4a0dbbf01954269bd6acfdc3; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 1d5524832ff204b8a8cd54ae1628b2122f6e9a8d; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 98004f926d27eaccdd2d336b7916a42e07392da1; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 0dcbf4dc3d54aab5990952cfd832042fb300dbe3; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 794c9175db1f2e5d2a28c326f10bd024dbd944f8; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 1daff79463d7d76096c84c57cddc30c5d4be2226; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< d323877484765aaacbb2769b06e355c2041ed115
- Anyone running Linux 3.10

## Description

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

ext4: fix bug\_on in \_\_es\_tree\_search caused by bad quota inode

We got a issue as fllows:
==================================================================
 kernel BUG at fs/ext4/extents\_status.c:202!
 invalid opcode: 0000 \[\#1\] PREEMPT SMP
 CPU: 1 PID: 810 Comm: mount Not tainted 6.1.0-rc1-next-g9631525255e3 \#352
 RIP: 0010:\_\_es\_tree\_search.isra.0+0xb8/0xe0
 RSP: 0018:ffffc90001227900 EFLAGS: 00010202
 RAX: 0000000000000000 RBX: 0000000077512a0f RCX: 0000000000000000
 RDX: 0000000000000002 RSI: 0000000000002a10 RDI: ffff8881004cd0c8
 RBP: ffff888177512ac8 R08: 47ffffffffffffff R09: 0000000000000001
 R10: 0000000000000001 R11: 00000000000679af R12: 0000000000002a10
 R13: ffff888177512d88 R14: 0000000077512a10 R15: 0000000000000000
 FS: 00007f4bd76dbc40(0000)GS:ffff88842fd00000(0000)knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00005653bf993cf8 CR3: 000000017bfdf000 CR4: 00000000000006e0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
 Call Trace:
  \<TASK\>
  ext4\_es\_cache\_extent+0xe2/0x210
  ext4\_cache\_extents+0xd2/0x110
  ext4\_find\_extent+0x5d5/0x8c0
  ext4\_ext\_map\_blocks+0x9c/0x1d30
  ext4\_map\_blocks+0x431/0xa50
  ext4\_getblk+0x82/0x340
  ext4\_bread+0x14/0x110
  ext4\_quota\_read+0xf0/0x180
  v2\_read\_header+0x24/0x90
  v2\_check\_quota\_file+0x2f/0xa0
  dquot\_load\_quota\_sb+0x26c/0x760
  dquot\_load\_quota\_inode+0xa5/0x190
  ext4\_enable\_quotas+0x14c/0x300
  \_\_ext4\_fill\_super+0x31cc/0x32c0
  ext4\_fill\_super+0x115/0x2d0
  get\_tree\_bdev+0x1d2/0x360
  ext4\_get\_tree+0x19/0x30
  vfs\_get\_tree+0x26/0xe0
  path\_mount+0x81d/0xfc0
  do\_mount+0x8d/0xc0
  \_\_x64\_sys\_mount+0xc0/0x160
  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
  ext4\_enable\_quotas
   ext4\_quota\_enable
    ext4\_iget --\> get error inode \<5\>
     ext4\_ext\_check\_inode --\> Wrong imode makes it escape inspection
     make\_bad\_inode(inode) --\> EXT4\_BOOT\_LOADER\_INO set imode
    dquot\_load\_quota\_inode
     vfs\_setup\_quota\_inode --\> check pass
     dquot\_load\_quota\_sb
      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
                \_\_es\_tree\_search.isra.0
                 ext4\_es\_end --\> Wrong extents trigger BUG\_ON

In the above issue, s\_usr\_quota\_inum is set to 5, but inode\<5\> contains
incorrect imode and disordered extents. Because 5 is EXT4\_BOOT\_LOADER\_INO,
the ext4\_ext\_check\_inode check in the ext4\_iget function can be bypassed,
finally, the extents that are not checked trigger the BUG\_ON in the
\_\_es\_tree\_search function. To solve this issue, check whether the inode is
bad\_inode in vfs\_setup\_quota\_inode().

## Affected and fixed versions

- Linux: \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< fb1d3b4107b4837b4a0dbbf01954269bd6acfdc3; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 1d5524832ff204b8a8cd54ae1628b2122f6e9a8d; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 98004f926d27eaccdd2d336b7916a42e07392da1; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 0dcbf4dc3d54aab5990952cfd832042fb300dbe3; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 794c9175db1f2e5d2a28c326f10bd024dbd944f8; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 1daff79463d7d76096c84c57cddc30c5d4be2226; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< d323877484765aaacbb2769b06e355c2041ed115 (cvelist)
- Linux: 3.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-50782. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50782.md
Affected: Linux >= 393d1d1d76933886d5e1ce603214c9987589c6d5, < fb1d3b4107b4837b4a0dbbf01954269bd6acfdc3; >= 393d1d1d76933886d5e1ce603214c9987589c6d5, < 1d5524832ff204b8a8cd54ae1628b2122f6e9a8d; >= 393d1d1d76933886d5e1ce603214c9987589c6d5, < 98004f926d27eaccdd2d336b7916a42e07392da1; >= 393d1d1d76933886d5e1ce6…
Fixed in: Linux 1d5524832ff204b8a8cd54ae1628b2122f6e9a8d, Linux 98004f926d27eaccdd2d336b7916a42e07392da1, Linux 0dcbf4dc3d54aab5990952cfd832042fb300dbe3, Linux 794c9175db1f2e5d2a28c326f10bd024dbd944f8, Linux 1daff79463d7d76096c84c57cddc30c5d4be2226

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

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< fb1d3b4107b4837b4a0dbbf01954269bd6acfdc3; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 1d5524832ff204b8a8cd54ae1628b2122f6e9a8d; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 98004f926d27eaccdd2d336b7916a42e07392da1; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 0dcbf4dc3d54aab5990952cfd832042fb300dbe3; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 794c9175db1f2e5d2a28c326f10bd024dbd944f8; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< 1daff79463d7d76096c84c57cddc30c5d4be2226; \>= 393d1d1d76933886d5e1ce603214c9987589c6d5, \< d323877484765aaacbb2769b06e355c2041ed115; Linux 3.10.

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

Yes. Fixed in Linux 1d5524832ff204b8a8cd54ae1628b2122f6e9a8d, Linux 98004f926d27eaccdd2d336b7916a42e07392da1, Linux 0dcbf4dc3d54aab5990952cfd832042fb300dbe3, Linux 794c9175db1f2e5d2a28c326f10bd024dbd944f8, Linux 1daff79463d7d76096c84c57cddc30c5d4be2226. No fix listed yet: follow the vendor advisory.

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

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/fb1d3b4107b4837b4a0dbbf01954269bd6acfdc3>
- other: <https://git.kernel.org/stable/c/1d5524832ff204b8a8cd54ae1628b2122f6e9a8d>
- other: <https://git.kernel.org/stable/c/98004f926d27eaccdd2d336b7916a42e07392da1>
- other: <https://git.kernel.org/stable/c/0dcbf4dc3d54aab5990952cfd832042fb300dbe3>
- other: <https://git.kernel.org/stable/c/794c9175db1f2e5d2a28c326f10bd024dbd944f8>
- other: <https://git.kernel.org/stable/c/1daff79463d7d76096c84c57cddc30c5d4be2226>
- other: <https://git.kernel.org/stable/c/d323877484765aaacbb2769b06e355c2041ed115>

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

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