# CVE-2022-50344: ext4: fix null-ptr-deref in ext4\_write\_info

> 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, CNA) `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.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-09-16T16:11:23.345Z
- **Modified:** 2026-06-17T05:23:16.823Z

## Who should check

- Anyone running Linux \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< dc451578446afd03c0c21913993c08898a691435; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< f4b5ff0b794aa94afac7269c494550ca2f66511b; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 947264e00c46de19a016fd81218118c708fed2f3; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 3638aa1c7d87c0ca0aef23cf58cae2c48e7daca4; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< f34ab95162763cd7352f46df169296eec28b688d; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 533c60a0b97cee5daab376933f486207e6680fb7; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 4a657319cfabd6199fd0b7b65bbebf6ded7a11c1; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< bb420e8afc854d2a1caaa23a0c129839acfb7888; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< f9c1f248607d5546075d3f731e7607d5571f2b60
- Anyone running Linux 3.6

## Description

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

ext4: fix null-ptr-deref in ext4\_write\_info

I caught a null-ptr-deref bug as follows:
==================================================================
KASAN: null-ptr-deref in range \[0x0000000000000068-0x000000000000006f\]
CPU: 1 PID: 1589 Comm: umount Not tainted 5.10.0-02219-dirty \#339
RIP: 0010:ext4\_write\_info+0x53/0x1b0
\[...\]
Call Trace:
 dquot\_writeback\_dquots+0x341/0x9a0
 ext4\_sync\_fs+0x19e/0x800
 \_\_sync\_filesystem+0x83/0x100
 sync\_filesystem+0x89/0xf0
 generic\_shutdown\_super+0x79/0x3e0
 kill\_block\_super+0xa1/0x110
 deactivate\_locked\_super+0xac/0x130
 deactivate\_super+0xb6/0xd0
 cleanup\_mnt+0x289/0x400
 \_\_cleanup\_mnt+0x16/0x20
 task\_work\_run+0x11c/0x1c0
 exit\_to\_user\_mode\_prepare+0x203/0x210
 syscall\_exit\_to\_user\_mode+0x5b/0x3a0
 do\_syscall\_64+0x59/0x70
 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xa9
 ==================================================================

Above issue may happen as follows:
-------------------------------------
exit\_to\_user\_mode\_prepare
 task\_work\_run
  \_\_cleanup\_mnt
   cleanup\_mnt
    deactivate\_super
     deactivate\_locked\_super
      kill\_block\_super
       generic\_shutdown\_super
        shrink\_dcache\_for\_umount
         dentry = sb-\>s\_root
         sb-\>s\_root = NULL              \<--- Here set NULL
        sync\_filesystem
         \_\_sync\_filesystem
          sb-\>s\_op-\>sync\_fs \> ext4\_sync\_fs
           dquot\_writeback\_dquots
            sb-\>dq\_op-\>write\_info \> ext4\_write\_info
             ext4\_journal\_start(d\_inode(sb-\>s\_root), EXT4\_HT\_QUOTA, 2)
              d\_inode(sb-\>s\_root)
               s\_root-\>d\_inode          \<--- Null pointer dereference

To solve this problem, we use ext4\_journal\_start\_sb directly
to avoid s\_root being used.

## Affected and fixed versions

- Linux: \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< dc451578446afd03c0c21913993c08898a691435; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< f4b5ff0b794aa94afac7269c494550ca2f66511b; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 947264e00c46de19a016fd81218118c708fed2f3; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 3638aa1c7d87c0ca0aef23cf58cae2c48e7daca4; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< f34ab95162763cd7352f46df169296eec28b688d; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 533c60a0b97cee5daab376933f486207e6680fb7; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 4a657319cfabd6199fd0b7b65bbebf6ded7a11c1; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< bb420e8afc854d2a1caaa23a0c129839acfb7888; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< f9c1f248607d5546075d3f731e7607d5571f2b60 (cvelist)
- Linux: 3.6 (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-50344. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50344.md
Affected: Linux >= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, < dc451578446afd03c0c21913993c08898a691435; >= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, < f4b5ff0b794aa94afac7269c494550ca2f66511b; >= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, < 947264e00c46de19a016fd81218118c708fed2f3; >= a1177825719ccef3f76ef39…
Fixed in: Linux 947264e00c46de19a016fd81218118c708fed2f3, Linux 3638aa1c7d87c0ca0aef23cf58cae2c48e7daca4, Linux 533c60a0b97cee5daab376933f486207e6680fb7, Linux 4a657319cfabd6199fd0b7b65bbebf6ded7a11c1

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

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

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

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

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

Linux \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< dc451578446afd03c0c21913993c08898a691435; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< f4b5ff0b794aa94afac7269c494550ca2f66511b; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 947264e00c46de19a016fd81218118c708fed2f3; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 3638aa1c7d87c0ca0aef23cf58cae2c48e7daca4; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< f34ab95162763cd7352f46df169296eec28b688d; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 533c60a0b97cee5daab376933f486207e6680fb7; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< 4a657319cfabd6199fd0b7b65bbebf6ded7a11c1; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< bb420e8afc854d2a1caaa23a0c129839acfb7888; \>= a1177825719ccef3f76ef39bbfd5ebb6087d53c7, \< f9c1f248607d5546075d3f731e7607d5571f2b60; Linux 3.6.

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

Yes. Fixed in Linux 947264e00c46de19a016fd81218118c708fed2f3, Linux 3638aa1c7d87c0ca0aef23cf58cae2c48e7daca4, Linux 533c60a0b97cee5daab376933f486207e6680fb7, Linux 4a657319cfabd6199fd0b7b65bbebf6ded7a11c1. No fix listed yet: follow the vendor advisory.

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

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/dc451578446afd03c0c21913993c08898a691435>
- patch: <https://git.kernel.org/stable/c/f4b5ff0b794aa94afac7269c494550ca2f66511b>
- patch: <https://git.kernel.org/stable/c/947264e00c46de19a016fd81218118c708fed2f3>
- patch: <https://git.kernel.org/stable/c/3638aa1c7d87c0ca0aef23cf58cae2c48e7daca4>
- patch: <https://git.kernel.org/stable/c/f34ab95162763cd7352f46df169296eec28b688d>
- patch: <https://git.kernel.org/stable/c/533c60a0b97cee5daab376933f486207e6680fb7>
- patch: <https://git.kernel.org/stable/c/4a657319cfabd6199fd0b7b65bbebf6ded7a11c1>
- patch: <https://git.kernel.org/stable/c/bb420e8afc854d2a1caaa23a0c129839acfb7888>
- patch: <https://git.kernel.org/stable/c/f9c1f248607d5546075d3f731e7607d5571f2b60>

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

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