Skip to contentSkip to conversation

CVE-2026-97521: gfs2: fix quota init duplicate scan

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 24

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In 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.

The Linux kernel CVE team has assigned CVE-2026-97521 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.12.111 with commit 7fdcf16e5e14e11028f5bcaa6d25075eb5e876a0
	Fixed in 6.18.53 with commit 812a766e2b0a8f4d094393fad13475c57f5f86db
	Fixed in 7.2 with commit b99a1f0f18ee50445907f55069e88bcfd8947383

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-97521

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	fs/gfs2/quota.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/7fdcf16e5e14e11028f5bcaa6d25075eb5e876a0
	https://git.kernel.org/stable/c/812a766e2b0a8f4d094393fad13475c57f5f86db
	https://git.kernel.org/stable/c/b99a1f0f18ee50445907f55069e88bcfd8947383