CVE-2026-98741: ALSA: ua101: reject mismatched capture/playback packet sizes
In the Linux kernel, the following vulnerability has been resolved:
ALSA: ua101: reject mismatched capture/playback packet sizes
detectusbformat() cross-checks bSubframeSize, bBitResolution and tSamFreq between the capture and playback interfaces, but never relates the two endpoints' wMaxPacketSize and bNrChannels. Each playback URB gets a buffer of ua->playback.maxpacketbytes, while the number of bytes written into it is derived from the capture stream: captureurbcomplete() computes frames from the received capture packet and capture.framebytes, and startusbplayback() and playbackwork() multiply that by playback.framebytes.
A device declaring a large capture wMaxPacketSize with few capture channels and a small playback wMaxPacketSize with many playback channels therefore memset()s and memcpy()s past the end of the playback buffer, in open() of the PCM node the driver registers during probe. usbsubmiturb() rejects the over-long isoframedesc[0].length with -EMSGSIZE, but only after the write.
Reject such descriptors at probe time. Genuine UA-101/UA-1000 hardware declares proportional packet sizes and is unaffected.
BUG: KASAN: slab-out-of-bounds in startusbplayback (sound/usb/misc/ua101.c:586) Write of size 2048 at addr ffff8881098f3c00 by task exploit/5021 Call Trace: asanmemset (mm/kasan/shadow.c:84) startusbplayback (sound/usb/misc/ua101.c:586) playbackpcmopen (sound/usb/misc/ua101.c:679) sndpcmopensubstream (sound/core/pcmnative.c:2829) sndpcmopen (sound/core/pcmnative.c:2865 sound/core/pcmnative.c:2932) sndpcmplaybackopen (sound/core/pcmnative.c:2891) sndopen (sound/core/sound.c:166) chrdevopen (fs/chardev.c:411) dodentryopen (fs/open.c:996) vfsopen (fs/open.c:1101) pathopenat (fs/namei.c:4837 fs/namei.c:5000) dofileopen (fs/namei.c:5029) dosysopenat2 (fs/open.c:1417) x64sysopenat (fs/open.c:1423 fs/open.c:1439 fs/open.c:1434) dosyscall64 (arch/x86/entry/syscall64.c:61 arch/x86/entry/syscall64.c:84) entrySYSCALL64afterhwframe (arch/x86/entry/entry64.S:121)
The buggy address belongs to the object at ffff8881098f3c00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes inside of allocated 168-byte region [ffff8881098f3c00, ffff8881098f3ca8)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the ALSA ua101 driver, reject USB audio descriptors at probe time when capture and playback packet sizes are mismatched, such as a large capture wMaxPacketSize with few capture channels and a small playback wMaxPacketSize with many playback channels.