# CVE-2022-50126: jbd2: fix assertion 'jh-\>b\_frozen\_data == NULL' failure when journal aborted

> 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 13, 2026-11-26)
- **CWE:** CWE-617
- **Published:** 2025-06-18T11:02:53.672Z
- **Modified:** 2026-06-17T05:22:48.843Z

## Who should check

- Anyone running Linux \>= 470decc613ab2048b619a01028072d932d9086ee, \< 0f61c6dc4b714be9d79cf0782ca02ba01c1b7ac3; \>= 470decc613ab2048b619a01028072d932d9086ee, \< 6073389db83b903678a0920554fa19f5bdc51c48; \>= 470decc613ab2048b619a01028072d932d9086ee, \< fa5b65d39332fef7a11ae99cb1f0696012a61527; \>= 470decc613ab2048b619a01028072d932d9086ee, \< f7161d0da975adc234161cd0641d0e484f5ce375; \>= 470decc613ab2048b619a01028072d932d9086ee, \< e62f79827784f56499a50ea2e893c98317b5407b; \>= 470decc613ab2048b619a01028072d932d9086ee, \< 731c1662d838fe954c6759e3ee43229b0d928fe4; \>= 470decc613ab2048b619a01028072d932d9086ee, \< ddd896792e1718cb84c96f3e618270589b6886dc; \>= 470decc613ab2048b619a01028072d932d9086ee, \< 4a734f0869f970b8a9b65062ea40b09a5da9dba8
- Anyone running Linux 2.6.19

## Description

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

jbd2: fix assertion 'jh-\>b\_frozen\_data == NULL' failure when journal aborted

Following process will fail assertion 'jh-\>b\_frozen\_data == NULL' in
jbd2\_journal\_dirty\_metadata():

                   jbd2\_journal\_commit\_transaction
unlink(dir/a)
 jh-\>b\_transaction = trans1
 jh-\>b\_jlist = BJ\_Metadata
                    journal-\>j\_running\_transaction = NULL
                    trans1-\>t\_state = T\_COMMIT
unlink(dir/b)
 handle-\>h\_trans = trans2
 do\_get\_write\_access
  jh-\>b\_modified = 0
  jh-\>b\_frozen\_data = frozen\_buffer
  jh-\>b\_next\_transaction = trans2
 jbd2\_journal\_dirty\_metadata
  is\_handle\_aborted
   is\_journal\_aborted // return false

           --\> jbd2 abort \<--

                     while (commit\_transaction-\>t\_buffers)
                      if (is\_journal\_aborted)
                       jbd2\_journal\_refile\_buffer
                        \_\_jbd2\_journal\_refile\_buffer
                         WRITE\_ONCE(jh-\>b\_transaction,
						jh-\>b\_next\_transaction)
                         WRITE\_ONCE(jh-\>b\_next\_transaction, NULL)
                         \_\_jbd2\_journal\_file\_buffer(jh, BJ\_Reserved)
        J\_ASSERT\_JH(jh, jh-\>b\_frozen\_data == NULL) // assertion failure !

The reproducer (See detail in \[Link\]) reports:
 ------------\[ cut here \]------------
 kernel BUG at fs/jbd2/transaction.c:1629!
 invalid opcode: 0000 \[\#1\] PREEMPT SMP
 CPU: 2 PID: 584 Comm: unlink Tainted: G        W
 5.19.0-rc6-00115-g4a57a8400075-dirty \#697
 RIP: 0010:jbd2\_journal\_dirty\_metadata+0x3c5/0x470
 RSP: 0018:ffffc90000be7ce0 EFLAGS: 00010202
 Call Trace:
  \<TASK\>
  \_\_ext4\_handle\_dirty\_metadata+0xa0/0x290
  ext4\_handle\_dirty\_dirblock+0x10c/0x1d0
  ext4\_delete\_entry+0x104/0x200
  \_\_ext4\_unlink+0x22b/0x360
  ext4\_unlink+0x275/0x390
  vfs\_unlink+0x20b/0x4c0
  do\_unlinkat+0x42f/0x4c0
  \_\_x64\_sys\_unlink+0x37/0x50
  do\_syscall\_64+0x35/0x80

After journal aborting, \_\_jbd2\_journal\_refile\_buffer() is executed with
holding @jh-\>b\_state\_lock, we can fix it by moving 'is\_handle\_aborted()'
into the area protected by @jh-\>b\_state\_lock.

## Affected and fixed versions

- Linux: \>= 470decc613ab2048b619a01028072d932d9086ee, \< 0f61c6dc4b714be9d79cf0782ca02ba01c1b7ac3; \>= 470decc613ab2048b619a01028072d932d9086ee, \< 6073389db83b903678a0920554fa19f5bdc51c48; \>= 470decc613ab2048b619a01028072d932d9086ee, \< fa5b65d39332fef7a11ae99cb1f0696012a61527; \>= 470decc613ab2048b619a01028072d932d9086ee, \< f7161d0da975adc234161cd0641d0e484f5ce375; \>= 470decc613ab2048b619a01028072d932d9086ee, \< e62f79827784f56499a50ea2e893c98317b5407b; \>= 470decc613ab2048b619a01028072d932d9086ee, \< 731c1662d838fe954c6759e3ee43229b0d928fe4; \>= 470decc613ab2048b619a01028072d932d9086ee, \< ddd896792e1718cb84c96f3e618270589b6886dc; \>= 470decc613ab2048b619a01028072d932d9086ee, \< 4a734f0869f970b8a9b65062ea40b09a5da9dba8 (cvelist)
- Linux: 2.6.19 (cvelist)

## Mitigation

- Upgrade Linux to 4a734f0869f970b8a9b65062ea40b09a5da9dba8 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50126. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50126.md
Affected: Linux >= 470decc613ab2048b619a01028072d932d9086ee, < 0f61c6dc4b714be9d79cf0782ca02ba01c1b7ac3; >= 470decc613ab2048b619a01028072d932d9086ee, < 6073389db83b903678a0920554fa19f5bdc51c48; >= 470decc613ab2048b619a01028072d932d9086ee, < fa5b65d39332fef7a11ae99cb1f0696012a61527; >= 470decc613ab2048b619a01…
Fixed in: Linux 0f61c6dc4b714be9d79cf0782ca02ba01c1b7ac3, Linux 6073389db83b903678a0920554fa19f5bdc51c48, Linux 731c1662d838fe954c6759e3ee43229b0d928fe4, Linux 4a734f0869f970b8a9b65062ea40b09a5da9dba8

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

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

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

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

Linux \>= 470decc613ab2048b619a01028072d932d9086ee, \< 0f61c6dc4b714be9d79cf0782ca02ba01c1b7ac3; \>= 470decc613ab2048b619a01028072d932d9086ee, \< 6073389db83b903678a0920554fa19f5bdc51c48; \>= 470decc613ab2048b619a01028072d932d9086ee, \< fa5b65d39332fef7a11ae99cb1f0696012a61527; \>= 470decc613ab2048b619a01028072d932d9086ee, \< f7161d0da975adc234161cd0641d0e484f5ce375; \>= 470decc613ab2048b619a01028072d932d9086ee, \< e62f79827784f56499a50ea2e893c98317b5407b; \>= 470decc613ab2048b619a01028072d932d9086ee, \< 731c1662d838fe954c6759e3ee43229b0d928fe4; \>= 470decc613ab2048b619a01028072d932d9086ee, \< ddd896792e1718cb84c96f3e618270589b6886dc; \>= 470decc613ab2048b619a01028072d932d9086ee, \< 4a734f0869f970b8a9b65062ea40b09a5da9dba8; Linux 2.6.19.

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

Yes. Fixed in Linux 0f61c6dc4b714be9d79cf0782ca02ba01c1b7ac3, Linux 6073389db83b903678a0920554fa19f5bdc51c48, Linux 731c1662d838fe954c6759e3ee43229b0d928fe4, Linux 4a734f0869f970b8a9b65062ea40b09a5da9dba8. Upgrade Linux to 4a734f0869f970b8a9b65062ea40b09a5da9dba8 or later.

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

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/0f61c6dc4b714be9d79cf0782ca02ba01c1b7ac3>
- patch: <https://git.kernel.org/stable/c/6073389db83b903678a0920554fa19f5bdc51c48>
- patch: <https://git.kernel.org/stable/c/fa5b65d39332fef7a11ae99cb1f0696012a61527>
- patch: <https://git.kernel.org/stable/c/f7161d0da975adc234161cd0641d0e484f5ce375>
- patch: <https://git.kernel.org/stable/c/e62f79827784f56499a50ea2e893c98317b5407b>
- patch: <https://git.kernel.org/stable/c/731c1662d838fe954c6759e3ee43229b0d928fe4>
- patch: <https://git.kernel.org/stable/c/ddd896792e1718cb84c96f3e618270589b6886dc>
- patch: <https://git.kernel.org/stable/c/4a734f0869f970b8a9b65062ea40b09a5da9dba8>

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

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