{"id":"CVE-2026-99882","aliases":["CVE-2026-99882"],"related":[],"kind":"vulnerability","state":"published","title":"ALSA: usb-audio: Bound packet copies by the PCM buffer size","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: usb-audio: Bound packet copies by the PCM buffer size\n\nretire_capture_urb() and prepare_playback_urb() assume that one USB\npacket never carries more data than the whole ALSA ring buffer. Nothing\nenforces that: the packet size comes from the device (wMaxPacketSize,\nand curpacksize == maxpacksize when the class-specific endpoint\ndescriptor sets MaxPacketsOnly), while the PCM hardware constraints only\nrequire 64-byte periods, two periods and a period time of one data\ninterval. An 8 kHz mono U8 stream on a 128-byte buffer is legal, and a\nfull-speed device can send 1023-byte packets into it.\n\nOn the first oversized packet hwptr_done is wrapped once and stays\nbeyond buffer_bytes (895 for 1023 bytes into 128). On the next packet\nthe wrap arithmetic in the copy path computes\n\n    bytes1 = subs->buffer_bytes - oldptr\n\nwith oldptr > buffer_bytes, so bytes1 wraps to about 4 GB and memcpy()\nruns off the end of the URB buffer and of the vmalloc'd DMA buffer:\n\n  BUG: KASAN: slab-out-of-bounds in retire_capture_urb+0x251/0x870\n  Read of size 4294966529 at addr ffff88800c1e2800 by task vhci_rx/82\n\nand for playback, where copy_to_urb() has the same shape:\n\n  BUG: KASAN: vmalloc-out-of-bounds in copy_to_urb.isra.0+0x188/0x430\n  Read of size 4294966529 at addr ffffc9000004537f by task vhci_rx/79\n   prepare_playback_urb+0x98a/0x1fc0\n\nTruncate an oversized capture packet to the buffer size, and stop\nfilling a playback URB once it holds a whole buffer. With bytes <=\nbuffer_bytes the single wrap of hwptr_done and the two-part memcpy()\nin both copy paths stay inside the buffer. A device whose packets do\nnot fit the buffer at all was never going to play correctly anyway.\n\nReproduced on 7.3-rc7 with a USB/IP device (dummy_hcd cannot carry\nisochronous data) advertising a UAC1 endpoint with MaxPacketsOnly and\nwMaxPacketSize 1023, and a PCM client using period_size 64, periods 2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: usb-audio: Bound packet copies by the PCM buffer size\n\nretire_capture_urb() and prepare_playback_urb() assume that one USB\npacket never carries more data than the whole ALSA ring buffer. Nothing\nenforces that: the packet size comes from the device (wMaxPacketSize,\nand curpacksize == maxpacksize when the class-specific endpoint\ndescriptor sets MaxPacketsOnly), while the PCM hardware constraints only\nrequire 64-byte periods, two periods and a period time of one data\ninterval. An 8 kHz mono U8 stream on a 128-byte buffer is legal, and a\nfull-speed device can send 1023-byte packets into it.\n\nOn the first oversized packet hwptr_done is wrapped once and stays\nbeyond buffer_bytes (895 for 1023 bytes into 128). On the next packet\nthe wrap arithmetic in the copy path computes\n\n    bytes1 = subs->buffer_bytes - oldptr\n\nwith oldptr > buffer_bytes, so bytes1 wraps to about 4 GB and memcpy()\nruns off the end of the URB buffer and of the vmalloc'd DMA buffer:\n\n  BUG: KASAN: slab-out-of-bounds in retire_capture_urb+0x251/0x870\n  Read of size 4294966529 at addr ffff88800c1e2800 by task vhci_rx/82\n\nand for playback, where copy_to_urb() has the same shape:\n\n  BUG: KASAN: vmalloc-out-of-bounds in copy_to_urb.isra.0+0x188/0x430\n  Read of size 4294966529 at addr ffffc9000004537f by task vhci_rx/79\n   prepare_playback_urb+0x98a/0x1fc0\n\nTruncate an oversized capture packet to the buffer size, and stop\nfilling a playback URB once it holds a whole buffer. With bytes <=\nbuffer_bytes the single wrap of hwptr_done and the two-part memcpy()\nin both copy paths stay inside the buffer. A device whose packets do\nnot fit the buffer at all was never going to play correctly anyway.\n\nReproduced on 7.3-rc7 with a USB/IP device (dummy_hcd cannot carry\nisochronous data) advertising a UAC1 endpoint with MaxPacketsOnly and\nwMaxPacketSize 1023, and a PCM client using period_size 64, periods 2.","source":"cvelist"}],"published":"2026-11-30T13:17:56.417Z","modified":"2026-11-30T14:20:22.780Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"668186369809b69a724c8982d256a3a88f7d952b","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"84c6759990a10e71be2afd5ca0a53561579566ce","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"304f5966eec2af8f82e883cbed7694ffd1eac9ff","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"9b6f91aa3846ea1460f03e34e49249c104077668","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"3112ea41836be0f97f5c42e0ef19261811f6de65","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"834ca8b916c768411693b62aaeb33f7ce39fe10e","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"22247f5024684b29d071230b00bc19ae9869bc76","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"06be918062adc1a5a76dc346803b136b20bdb5ae","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.12","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.118","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/668186369809b69a724c8982d256a3a88f7d952b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/84c6759990a10e71be2afd5ca0a53561579566ce","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/304f5966eec2af8f82e883cbed7694ffd1eac9ff","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9b6f91aa3846ea1460f03e34e49249c104077668","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3112ea41836be0f97f5c42e0ef19261811f6de65","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/834ca8b916c768411693b62aaeb33f7ce39fe10e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/22247f5024684b29d071230b00bc19ae9869bc76","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/06be918062adc1a5a76dc346803b136b20bdb5ae","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99882","url":"https://www.cve.org/CVERecord?id=CVE-2026-99882","licence":"CVE Terms of Use","modified":"2026-11-30T13:17:56.417Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99882","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99882","licence":"Public domain","modified":"2026-11-30T14:20:22.780Z"}],"updatedAt":"2026-11-30T14:33:30.375Z","epss":{"score":0.00185,"percentile":0.08497,"date":"2026-12-01T12:00:22.000Z"}}