# CVE-2022-49352: ext4: fix warning in ext4\_handle\_inode\_extension

> 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.28% (percentile 14, 2026-11-26)
- **Published:** 2025-02-26T02:11:04.496Z
- **Modified:** 2026-11-05T20:17:04.067Z

## Who should check

- Anyone running Linux \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< adf490083ca52ebfb0b2fe64ff1ead00c0452dd7; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< b81d2ff6885e38fc745eeaf9565775055778fc0b; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< e383c2aa5f02ab571530dc5c5696479672478c25; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< 1bcce88da60eccc946c0f4ed942b0f08cd565778; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< f4534c9fc94d22383f187b9409abb3f9df2e3db3
- Anyone running Linux 5.5

## Description

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

ext4: fix warning in ext4\_handle\_inode\_extension

We got issue as follows:
EXT4-fs error (device loop0) in ext4\_reserve\_inode\_write:5741: Out of memory
EXT4-fs error (device loop0): ext4\_setattr:5462: inode \#13: comm syz-executor.0: mark\_inode\_dirty error
EXT4-fs error (device loop0) in ext4\_setattr:5519: Out of memory
EXT4-fs error (device loop0): ext4\_ind\_map\_blocks:595: inode \#13: comm syz-executor.0: Can't allocate blocks for non-extent mapped inodes with bigalloc
------------\[ cut here \]------------
WARNING: CPU: 1 PID: 4361 at fs/ext4/file.c:301 ext4\_file\_write\_iter+0x11c9/0x1220
Modules linked in:
CPU: 1 PID: 4361 Comm: syz-executor.0 Not tainted 5.10.0+ \#1
RIP: 0010:ext4\_file\_write\_iter+0x11c9/0x1220
RSP: 0018:ffff924d80b27c00 EFLAGS: 00010282
RAX: ffffffff815a3379 RBX: 0000000000000000 RCX: 000000003b000000
RDX: ffff924d81601000 RSI: 00000000000009cc RDI: 00000000000009cd
RBP: 000000000000000d R08: ffffffffbc5a2c6b R09: 0000902e0e52a96f
R10: ffff902e2b7c1b40 R11: ffff902e2b7c1b40 R12: 000000000000000a
R13: 0000000000000001 R14: ffff902e0e52aa10 R15: ffffffffffffff8b
FS:  00007f81a7f65700(0000) GS:ffff902e3bc80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600400 CR3: 000000012db88001 CR4: 00000000003706e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 do\_iter\_readv\_writev+0x2e5/0x360
 do\_iter\_write+0x112/0x4c0
 do\_pwritev+0x1e5/0x390
 \_\_x64\_sys\_pwritev2+0x7e/0xa0
 do\_syscall\_64+0x37/0x50
 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xa9

Above issue may happen as follows:
Assume
inode.i\_size=4096
EXT4\_I(inode)-\>i\_disksize=4096

step 1: set inode-\>i\_isize = 8192
ext4\_setattr
  if (attr-\>ia\_size != inode-\>i\_size)
    EXT4\_I(inode)-\>i\_disksize = attr-\>ia\_size;
    rc = ext4\_mark\_inode\_dirty
       ext4\_reserve\_inode\_write
          ext4\_get\_inode\_loc
            \_\_ext4\_get\_inode\_loc
              sb\_getblk --\> return -ENOMEM
   ...
   if (!error)  -\>will not update i\_size
     i\_size\_write(inode, attr-\>ia\_size);
Now:
inode.i\_size=4096
EXT4\_I(inode)-\>i\_disksize=8192

step 2: Direct write 4096 bytes
ext4\_file\_write\_iter
 ext4\_dio\_write\_iter
   iomap\_dio\_rw -\>return error
 if (extend)
   ext4\_handle\_inode\_extension
     WARN\_ON\_ONCE(i\_size\_read(inode) \< EXT4\_I(inode)-\>i\_disksize);
-\>Then trigger warning.

To solve above issue, if mark inode dirty failed in ext4\_setattr just
set 'EXT4\_I(inode)-\>i\_disksize' with old value.

## Affected and fixed versions

- Linux: \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< adf490083ca52ebfb0b2fe64ff1ead00c0452dd7; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< b81d2ff6885e38fc745eeaf9565775055778fc0b; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< e383c2aa5f02ab571530dc5c5696479672478c25; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< 1bcce88da60eccc946c0f4ed942b0f08cd565778; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< f4534c9fc94d22383f187b9409abb3f9df2e3db3 (cvelist)
- Linux: 5.5 (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-49352. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49352.md
Affected: Linux >= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, < adf490083ca52ebfb0b2fe64ff1ead00c0452dd7; >= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, < b81d2ff6885e38fc745eeaf9565775055778fc0b; >= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, < e383c2aa5f02ab571530dc5c5696479672478c25; >= b1b4705d54abedfd69dcdf4…
Fixed in: Linux 1bcce88da60eccc946c0f4ed942b0f08cd565778

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

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

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

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

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

Linux \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< adf490083ca52ebfb0b2fe64ff1ead00c0452dd7; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< b81d2ff6885e38fc745eeaf9565775055778fc0b; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< e383c2aa5f02ab571530dc5c5696479672478c25; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< 1bcce88da60eccc946c0f4ed942b0f08cd565778; \>= b1b4705d54abedfd69dcdf42779c521aa1e0fbd3, \< f4534c9fc94d22383f187b9409abb3f9df2e3db3; Linux 5.5.

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

Yes. Fixed in Linux 1bcce88da60eccc946c0f4ed942b0f08cd565778. No fix listed yet: follow the vendor advisory.

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

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/adf490083ca52ebfb0b2fe64ff1ead00c0452dd7>
- patch: <https://git.kernel.org/stable/c/b81d2ff6885e38fc745eeaf9565775055778fc0b>
- patch: <https://git.kernel.org/stable/c/e383c2aa5f02ab571530dc5c5696479672478c25>
- patch: <https://git.kernel.org/stable/c/1bcce88da60eccc946c0f4ed942b0f08cd565778>
- patch: <https://git.kernel.org/stable/c/f4534c9fc94d22383f187b9409abb3f9df2e3db3>

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

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