gfs2: fix quota init duplicate scan
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.1116.18.537.2In the Linux kernel, the following vulnerability has been resolved:
gfs2: fix quota init duplicate scan
gfs2_quota_init() checks for duplicate quota_change IDs while holding qd_lock and the quota hash bucket bitlock. That path used gfs2_qd_search_bucket(), which takes a lockref reference via lockref_get_not_dead().
On PREEMPT_RT this may sleep, which is not allowed under the bucket bitlock, triggering "sleeping function called from invalid context".
Use a no-ref bucket lookup in this path, then continue duplicate handling without taking a lockref there.
Refactor gfs2_qd_search_bucket() to build on top of the no-ref helper so lookup traversal stays in one place.
This patch fixes a bug reported by syzbot.
From the CVE record · Linux
The Linux kernel’s gfs2 quota initialization can call a potentially sleeping function while holding a bitlock during a duplicate quota-change ID scan. On PREEMPT_RT, this can trigger a “sleeping function called from invalid context” warning. The input does not establish an attacker path, authentication requirement, or user-interaction requirement.
Engineers running the Linux kernel with PREEMPT_RT and gfs2 should check their kernels; affected versions are not specified.