# CVE-2022-49174: ext4: fix ext4\_mb\_mark\_bb() with flex\_bg with fast\_commit

> 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.31% (percentile 16, 2026-11-26)
- **Published:** 2025-02-26T01:55:29.590Z
- **Modified:** 2026-10-15T22:17:23.890Z

## Who should check

- Anyone running Linux \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< cd6d719534af993210306f8a13f9cb3e615f7c8d; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< 6a6beb074186a0452368a023a261c7d0eaebe838; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< b07eedd0222e9548ffc568ec429bb1f61d21a39c; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< 803fb0e8240cc16585a5c9df76add1dfaa781773; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< bfdc502a4a4c058bf4cbb1df0c297761d528f54d
- Anyone running Linux 5.10

## Description

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

ext4: fix ext4\_mb\_mark\_bb() with flex\_bg with fast\_commit

In case of flex\_bg feature (which is by default enabled), extents for
any given inode might span across blocks from two different block group.
ext4\_mb\_mark\_bb() only reads the buffer\_head of block bitmap once for the
starting block group, but it fails to read it again when the extent length
boundary overflows to another block group. Then in this below loop it
accesses memory beyond the block group bitmap buffer\_head and results
into a data abort.

	for (i = 0; i \< clen; i++)
		if (!mb\_test\_bit(blkoff + i, bitmap\_bh-\>b\_data) == !state)
			already++;

This patch adds this functionality for checking block group boundary in
ext4\_mb\_mark\_bb() and update the buffer\_head(bitmap\_bh) for every different
block group.

w/o this patch, I was easily able to hit a data access abort using Power platform.

\<...\>
\[   74.327662\] EXT4-fs error (device loop3): ext4\_mb\_generate\_buddy:1141: group 11, block bitmap and bg descriptor inconsistent: 21248 vs 23294 free clusters
\[   74.533214\] EXT4-fs (loop3): shut down requested (2)
\[   74.536705\] Aborting journal on device loop3-8.
\[   74.702705\] BUG: Unable to handle kernel data access on read at 0xc00000005e980000
\[   74.703727\] Faulting instruction address: 0xc0000000007bffb8
cpu 0xd: Vector: 300 (Data Access) at \[c000000015db7060\]
    pc: c0000000007bffb8: ext4\_mb\_mark\_bb+0x198/0x5a0
    lr: c0000000007bfeec: ext4\_mb\_mark\_bb+0xcc/0x5a0
    sp: c000000015db7300
   msr: 800000000280b033
   dar: c00000005e980000
 dsisr: 40000000
  current = 0xc000000027af6880
  paca    = 0xc00000003ffd5200   irqmask: 0x03   irq\_happened: 0x01
    pid   = 5167, comm = mount
\<...\>
enter ? for help
\[c000000015db7380\] c000000000782708 ext4\_ext\_clear\_bb+0x378/0x410
\[c000000015db7400\] c000000000813f14 ext4\_fc\_replay+0x1794/0x2000
\[c000000015db7580\] c000000000833f7c do\_one\_pass+0xe9c/0x12a0
\[c000000015db7710\] c000000000834504 jbd2\_journal\_recover+0x184/0x2d0
\[c000000015db77c0\] c000000000841398 jbd2\_journal\_load+0x188/0x4a0
\[c000000015db7880\] c000000000804de8 ext4\_fill\_super+0x2638/0x3e10
\[c000000015db7a40\] c0000000005f8404 get\_tree\_bdev+0x2b4/0x350
\[c000000015db7ae0\] c0000000007ef058 ext4\_get\_tree+0x28/0x40
\[c000000015db7b00\] c0000000005f6344 vfs\_get\_tree+0x44/0x100
\[c000000015db7b70\] c00000000063c408 path\_mount+0xdd8/0xe70
\[c000000015db7c40\] c00000000063c8f0 sys\_mount+0x450/0x550
\[c000000015db7d50\] c000000000035770 system\_call\_exception+0x4a0/0x4e0
\[c000000015db7e10\] c00000000000c74c system\_call\_common+0xec/0x250

## Affected and fixed versions

- Linux: \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< cd6d719534af993210306f8a13f9cb3e615f7c8d; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< 6a6beb074186a0452368a023a261c7d0eaebe838; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< b07eedd0222e9548ffc568ec429bb1f61d21a39c; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< 803fb0e8240cc16585a5c9df76add1dfaa781773; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< bfdc502a4a4c058bf4cbb1df0c297761d528f54d (cvelist)
- Linux: 5.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-49174. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49174.md
Affected: Linux >= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, < cd6d719534af993210306f8a13f9cb3e615f7c8d; >= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, < 6a6beb074186a0452368a023a261c7d0eaebe838; >= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, < b07eedd0222e9548ffc568ec429bb1f61d21a39c; >= 8016e29f4362e285f0f7e38…
Fixed in: Linux 6a6beb074186a0452368a023a261c7d0eaebe838, Linux 803fb0e8240cc16585a5c9df76add1dfaa781773

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

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

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

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

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

Linux \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< cd6d719534af993210306f8a13f9cb3e615f7c8d; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< 6a6beb074186a0452368a023a261c7d0eaebe838; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< b07eedd0222e9548ffc568ec429bb1f61d21a39c; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< 803fb0e8240cc16585a5c9df76add1dfaa781773; \>= 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2, \< bfdc502a4a4c058bf4cbb1df0c297761d528f54d; Linux 5.10.

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

Yes. Fixed in Linux 6a6beb074186a0452368a023a261c7d0eaebe838, Linux 803fb0e8240cc16585a5c9df76add1dfaa781773. No fix listed yet: follow the vendor advisory.

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

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/cd6d719534af993210306f8a13f9cb3e615f7c8d>
- patch: <https://git.kernel.org/stable/c/6a6beb074186a0452368a023a261c7d0eaebe838>
- patch: <https://git.kernel.org/stable/c/b07eedd0222e9548ffc568ec429bb1f61d21a39c>
- patch: <https://git.kernel.org/stable/c/803fb0e8240cc16585a5c9df76add1dfaa781773>
- patch: <https://git.kernel.org/stable/c/bfdc502a4a4c058bf4cbb1df0c297761d528f54d>

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

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