Skip to contentSkip to conversation

CVE-2026-98341: wifi: cfg80211: don't free driver-owned scan requests

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 6

lore
Share & tools
lore
#0 lore raw

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

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

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

wifi: cfg80211: don't free driver-owned scan requests

When an interface goes down while a scan is running, cfg80211 completes the scan towards userspace and frees the scan request. However, the driver can be convinced that it owns the request, since the cancellation is (intended to be) asynchronous.

The WARN_ON() in the netdev notifier was meant to catch this, but it's not actually avoidable, so it triggers and we get a UAF in scan_done().

There doesn't seem to be a great way around it, so just track that the driver is still convinced it owns the request, and then just free it on completion if it was already cancelled. Also remove the warnings since they can trigger in the intended architecture.

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

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

	Issue introduced in 3.14 with commit 4a58e7c38443154fce1b47910e1a9184f65c5d72 and fixed in 6.18.54 with commit e8c75736cfd0c6c87562cda2312e3fe5e2227955
	Issue introduced in 3.14 with commit 4a58e7c38443154fce1b47910e1a9184f65c5d72 and fixed in 7.2.8 with commit cf6da29d17994865f73ca70976495ea856909c63
	Issue introduced in 3.14 with commit 4a58e7c38443154fce1b47910e1a9184f65c5d72 and fixed in 7.3-rc4 with commit dab68a74e90b8e07f08ed9deaa5884857a3cfe89

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

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:
net/wireless/core.c
net/wireless/core.h
net/wireless/rdev-ops.h
net/wireless/scan.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/e8c75736cfd0c6c87562cda2312e3fe5e2227955
	https://git.kernel.org/stable/c/cf6da29d17994865f73ca70976495ea856909c63
	https://git.kernel.org/stable/c/dab68a74e90b8e07f08ed9deaa5884857a3cfe89