jbd2: bound shrinker scans by examined checkpoint buffers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
9c31bb2684f8035beca0275349d19d679b679ffb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
jbd2: bound shrinker scans by examined checkpoint buffers
The jbd2 shrinker currently accounts only checkpoint buffers that it successfully releases against nr_to_scan. Busy buffers therefore do not consume the scan budget.
If a checkpoint transaction contains mostly busy buffers, the shrinker can scan its entire checkpoint list while holding journal->j_list_lock. Large checkpoint lists can result in excessive lock hold times and leave other CPUs spinning on j_list_lock, causing soft lockups or RCU stalls.
Pass nr_to_scan into journal_shrink_one_cp_list() and decrement it for every buffer examined, including busy buffers. Pass NULL from checkpoint cleanup paths so their existing full-list behavior is preserved.
This restores the scan-budget semantics that existed before journal_shrink_one_cp_list() was changed to always scan a complete checkpoint list.
From the CVE record · Linux
The Linux kernel’s jbd2 shrinker can scan an entire checkpoint list while holding a journal lock when most buffers are busy. Large lists can leave other CPUs spinning on the lock, causing soft lockups or RCU stalls. The input does not describe an attacker or specify access or user-interaction requirements.
Engineers running the Linux kernel should check their versions; affected versions are not specified.