Skip to contentSkip to conversation

CVE-2026-98820: blk-mq: set RQF_USE_SCHED when the operation is known

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

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

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

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

blk-mq: set RQF_USE_SCHED when the operation is known

The cached requests are allocated for one operation but can be handed out for another. A passthrough command has RQF_USE_SCHED cleared, so using those flags for a subsequent read/write bio will insert it into the scheduler without ->prepare_request() and frees it without ->finish_request(). For kyber, this leaks the domain token acquired at dispatch and stalls the queue.

Don't set RQF_USE_SCHED based on the first operation the batch happened to be allocated for. Instead, set it after the request is claimed by an operation. Introduce a helper function, blk_mq_rq_late_init() for this, and absorb blk_mq_rq_time_init() since the two run together.

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

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

	Issue introduced in 6.1 with commit 4b6a5d9cea911424e84107df8c4eb8317938d2cd and fixed in 6.18.56 with commit 790730e4d95de8356a573d4b4864486bba731863
	Issue introduced in 6.1 with commit 4b6a5d9cea911424e84107df8c4eb8317938d2cd and fixed in 7.2.10 with commit 2c47ebc27fa72078e26177cd458cdaf3006a9685
	Issue introduced in 6.1 with commit 4b6a5d9cea911424e84107df8c4eb8317938d2cd and fixed in 7.3-rc6 with commit ab6c756f28c741d704a7c3e04814bfc3adf6f818

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-98820

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:
block/blk-mq.c
block/mq-deadline.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/790730e4d95de8356a573d4b4864486bba731863
	https://git.kernel.org/stable/c/2c47ebc27fa72078e26177cd458cdaf3006a9685
	https://git.kernel.org/stable/c/ab6c756f28c741d704a7c3e04814bfc3adf6f818