# CVE-2022-49327: bcache: avoid journal no-space deadlock by reserving 1 journal bucket

> 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.21% (percentile 7, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-02-26T02:10:49.092Z
- **Modified:** 2026-06-17T05:17:43.680Z

## Who should check

- Anyone running Linux \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 59afd4f287900c8187e968a4153ed35e6b48efce; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 5607652823ac65e2c6885e73bd46d5a4f9a20363; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 6332ea3e35efa12dc08f0cbf5faea5e6e8eb0497; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 1dda32aed6f62c163f38ff947ef5b3360e329159; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 32feee36c30ea06e38ccb8ae6e5c44c6eec790a6
- Anyone running Linux 3.10

## Description

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

bcache: avoid journal no-space deadlock by reserving 1 journal bucket

The journal no-space deadlock was reported time to time. Such deadlock
can happen in the following situation.

When all journal buckets are fully filled by active jset with heavy
write I/O load, the cache set registration (after a reboot) will load
all active jsets and inserting them into the btree again (which is
called journal replay). If a journaled bkey is inserted into a btree
node and results btree node split, new journal request might be
triggered. For example, the btree grows one more level after the node
split, then the root node record in cache device super block will be
upgrade by bch\_journal\_meta() from bch\_btree\_set\_root(). But there is no
space in journal buckets, the journal replay has to wait for new journal
bucket to be reclaimed after at least one journal bucket replayed. This
is one example that how the journal no-space deadlock happens.

The solution to avoid the deadlock is to reserve 1 journal bucket in
run time, and only permit the reserved journal bucket to be used during
cache set registration procedure for things like journal replay. Then
the journal space will never be fully filled, there is no chance for
journal no-space deadlock to happen anymore.

This patch adds a new member "bool do\_reserve" in struct journal, it is
inititalized to 0 (false) when struct journal is allocated, and set to
1 (true) by bch\_journal\_space\_reserve() when all initialization done in
run\_cache\_set(). In the run time when journal\_reclaim() tries to
allocate a new journal bucket, free\_journal\_buckets() is called to check
whether there are enough free journal buckets to use. If there is only
1 free journal bucket and journal-\>do\_reserve is 1 (true), the last
bucket is reserved and free\_journal\_buckets() will return 0 to indicate
no free journal bucket. Then journal\_reclaim() will give up, and try
next time to see whetheer there is free journal bucket to allocate. By
this method, there is always 1 jouranl bucket reserved in run time.

During the cache set registration, journal-\>do\_reserve is 0 (false), so
the reserved journal bucket can be used to avoid the no-space deadlock.

## Affected and fixed versions

- Linux: \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 59afd4f287900c8187e968a4153ed35e6b48efce; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 5607652823ac65e2c6885e73bd46d5a4f9a20363; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 6332ea3e35efa12dc08f0cbf5faea5e6e8eb0497; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 1dda32aed6f62c163f38ff947ef5b3360e329159; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 32feee36c30ea06e38ccb8ae6e5c44c6eec790a6 (cvelist)
- Linux: 3.10 (cvelist)

## Mitigation

- Upgrade Linux to 32feee36c30ea06e38ccb8ae6e5c44c6eec790a6 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-49327. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49327.md
Affected: Linux >= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, < 59afd4f287900c8187e968a4153ed35e6b48efce; >= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, < 5607652823ac65e2c6885e73bd46d5a4f9a20363; >= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, < 6332ea3e35efa12dc08f0cbf5faea5e6e8eb0497; >= cafe563591446cf80bfbc2f…
Fixed in: Linux 59afd4f287900c8187e968a4153ed35e6b48efce, Linux 5607652823ac65e2c6885e73bd46d5a4f9a20363, Linux 6332ea3e35efa12dc08f0cbf5faea5e6e8eb0497, Linux 1dda32aed6f62c163f38ff947ef5b3360e329159, Linux 32feee36c30ea06e38ccb8ae6e5c44c6eec790a6

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

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

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

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

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

Linux \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 59afd4f287900c8187e968a4153ed35e6b48efce; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 5607652823ac65e2c6885e73bd46d5a4f9a20363; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 6332ea3e35efa12dc08f0cbf5faea5e6e8eb0497; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 1dda32aed6f62c163f38ff947ef5b3360e329159; \>= cafe563591446cf80bfbc2fe3bc72a2e36cf1060, \< 32feee36c30ea06e38ccb8ae6e5c44c6eec790a6; Linux 3.10.

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

Yes. Fixed in Linux 59afd4f287900c8187e968a4153ed35e6b48efce, Linux 5607652823ac65e2c6885e73bd46d5a4f9a20363, Linux 6332ea3e35efa12dc08f0cbf5faea5e6e8eb0497, Linux 1dda32aed6f62c163f38ff947ef5b3360e329159, Linux 32feee36c30ea06e38ccb8ae6e5c44c6eec790a6. Upgrade Linux to 32feee36c30ea06e38ccb8ae6e5c44c6eec790a6 or later.

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

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/59afd4f287900c8187e968a4153ed35e6b48efce>
- patch: <https://git.kernel.org/stable/c/5607652823ac65e2c6885e73bd46d5a4f9a20363>
- patch: <https://git.kernel.org/stable/c/6332ea3e35efa12dc08f0cbf5faea5e6e8eb0497>
- patch: <https://git.kernel.org/stable/c/1dda32aed6f62c163f38ff947ef5b3360e329159>
- patch: <https://git.kernel.org/stable/c/32feee36c30ea06e38ccb8ae6e5c44c6eec790a6>

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

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