CVE-2026-98837: ALSA: caiaq: unregister the input device when probe fails
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ALSA: caiaq: unregister the input device when probe fails
setup_card() registers the input device, whose name and phys point into struct snd_usb_caiaqdev, and then goes on to snd_card_register() and snd_usb_caiaq_control_init(). If either fails, snd_probe() calls snd_card_free(), which frees the device state but leaves the input device registered: card_free() only clears the pointer, and the input device is unregistered from snd_disconnect() alone. Reading its "uevent" attribute afterwards dereferences freed memory:
BUG: KASAN: slab-use-after-free in string+0x4a9/0x4f0 Read of size 1 at addr ffff8880208f5043 by task caiaq/4967 add_uevent_var+0x183/0x3a0 input_dev_uevent+0x162/0x900 dev_uevent+0x2f1/0x870 uevent_show+0x1ca/0x3a0 ...
Unregister the input device on the probe error path, as snd_disconnect() does. snd_usb_caiaq_input_disconnect() is a no-op when no input device was registered.
Reproduced with a raw-gadget Audio Kontrol 1 and a temporary hack that makes snd_usb_caiaq_control_init() fail.
The Linux kernel CVE team has assigned CVE-2026-98837 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.12.86 with commit 6251e3e256337a30160ef59ab1580dde4d1acd28 and fixed in 6.12.113 with commit 850810c12686f80cdf7530f4f21e0157d904f739 Issue introduced in 6.18.27 with commit e59ecd4ee3a450db6cb4e4ecaa3efdd593f80056 and fixed in 6.18.56 with commit 84727facd8506140cd04f2b0a8b1c4ddeac41cea Issue introduced in 7.1 with commit 28abd224db4a49560b452115bca3672a20e45b2f and fixed in 7.2.10 with commit 2e5a413cc2a489c9427ecd3d73ad764bfb0c7103 Issue introduced in 7.1 with commit 28abd224db4a49560b452115bca3672a20e45b2f and fixed in 7.3-rc6 with commit 0b7bd20f6379bc5e431fd74d866390f5b5b63f3c Issue introduced in 5.10.258 with commit da938aa9fc7826901921dcea225948ab21a97e45 Issue introduced in 5.15.209 with commit 09616e25f502080ba684fc7fcf959d1376ab756d Issue introduced in 6.1.175 with commit b956e48371f2ff72b76be9a829800ecec963bd45 Issue introduced in 6.6.140 with commit f537e3ad69609f6924a4db6b4a7f6561f5288bdd Issue introduced in 7.0.4 with commit 096dd8519cf2f768e9e14f224b627f7aaee1a9c5
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-98837
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/caiaq/device.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/850810c12686f80cdf7530f4f21e0157d904f739 https://git.kernel.org/stable/c/84727facd8506140cd04f2b0a8b1c4ddeac41cea https://git.kernel.org/stable/c/2e5a413cc2a489c9427ecd3d73ad764bfb0c7103 https://git.kernel.org/stable/c/0b7bd20f6379bc5e431fd74d866390f5b5b63f3c