Skip to contentSkip to conversation

CVE-2026-99314: ALSA: us122l: Add missing NULL check in usb_stream_hwdep_mmap()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 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:

ALSA: us122l: Add missing NULL check in usb_stream_hwdep_mmap()

usb_stream_hwdep_mmap() reads us122l->sk.s and dereferences it without checking for NULL. The stream object is released by usb_stream_free(), which is reached through us122l_stop() both when the device is disconnected and when us122l_start() fails, and it leaves us122l->sk.s set to NULL. The hwdep file stays usable after that, so a later mmap()

	KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
	RIP: 0010:usb_stream_hwdep_mmap+0x107/0x890 sound/usb/usx2y/us122l.c:182

crashes while reading s->read_size, which sits at offset 0x10.

That NULL is an expected state for this field: usb_stream_hwdep_vm_fault(), usb_stream_hwdep_poll(), usb_stream_hwdep_ioctl(), usb_stream_stop() and usb_stream_free() all test it before use. Only the mmap callback misses the check, so let it return -ENODEV, matching what the other hwdep mapping in usx2yhwdeppcm.c does when its shared buffer has not been allocated.

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

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

	Issue introduced in 2.6.28 with commit 030a07e441296c372f946cd4065b5d831d8dc40c and fixed in 6.12.118 with commit 0f128b326d3defab6bf5c33c09e55addd87e74ec
	Issue introduced in 2.6.28 with commit 030a07e441296c372f946cd4065b5d831d8dc40c and fixed in 6.18.64 with commit 03d3690ba06713358cd8c89bbec090040c272438
	Issue introduced in 2.6.28 with commit 030a07e441296c372f946cd4065b5d831d8dc40c and fixed in 7.3.5 with commit 6fdd96fa2f7a70d61eeed166e520a990c40ff223
	Issue introduced in 2.6.28 with commit 030a07e441296c372f946cd4065b5d831d8dc40c and fixed in 7.4-rc2 with commit f5d3eb483fed59fc0f3b059b8b6a32cedc922360

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

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:

	sound/usb/usx2y/us122l.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/0f128b326d3defab6bf5c33c09e55addd87e74ec
	https://git.kernel.org/stable/c/03d3690ba06713358cd8c89bbec090040c272438
	https://git.kernel.org/stable/c/6fdd96fa2f7a70d61eeed166e520a990c40ff223
	https://git.kernel.org/stable/c/f5d3eb483fed59fc0f3b059b8b6a32cedc922360