{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40269","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-04-16T07:20:57.183Z","datePublished":"2025-12-06T21:50:50.229Z","dateUpdated":"2026-08-05T12:09:02.371Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:09:02.371Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: usb-audio: Fix potential overflow of PCM transfer buffer\n\nThe PCM stream data in USB-audio driver is transferred over USB URB\npacket buffers, and each packet size is determined dynamically.  The\npacket sizes are limited by some factors such as wMaxPacketSize USB\ndescriptor.  OTOH, in the current code, the actually used packet sizes\nare determined only by the rate and the PPS, which may be bigger than\nthe size limit above.  This results in a buffer overflow, as reported\nby syzbot.\n\nBasically when the limit is smaller than the calculated packet size,\nit implies that something is wrong, most likely a weird USB\ndescriptor.  So the best option would be just to return an error at\nthe parameter setup time before doing any further operations.\n\nThis patch introduces such a sanity check, and returns -EINVAL when\nthe packet size is greater than maxpacksize.  The comparison with\nep->packsize[1] alone should suffice since it's always equal or\ngreater than ep->packsize[0]."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The overflow is driven by locally-supplied `hw_params` (rate/format/channels) written via ioctl on `/dev/snd/pcmC*D*p` plus PCM data the attacker writes into the mmap'd buffer, on any system with a USB audio endpoint present (USB headsets/DACs/webcam mics are ubiquitous on desktops, Android, kiosks and embedded systems). Although a malformed descriptor is one way to reach it, no physical interaction is required for a local attacker on a machine with an attached USB audio device.\nAC:L - The attacker deterministically chooses the rate and sample format that make `packsize[1] * stride` exceed the `wMaxPacketSize`-derived buffer, then triggers the copy by starting playback — no race, no memory-layout guessing, and the condition is fully reproducible on every URB submission.\nPR:L - Only access to the ALSA PCM device node is required, which is granted to the logged-in session user via logind ACLs or membership in the `audio` group; no CAP_SYS_ADMIN or root is needed.\nUI:N - The attacking process performs open/hw_params/prepare/write entirely on its own; no victim action is needed, and on desktop/Android systems PipeWire/AudioFlinger will even drive the stream automatically on hotplug.\nS:U - The corruption stays within the kernel's own memory and the USB host controller's DMA-coherent pool, managed by the same security authority; no VM, IOMMU or sandbox boundary is crossed.\nC:H - The oversized `iso_frame_desc` lengths cause the host controller to DMA kernel memory beyond the allocated coherent buffer out to the USB device, disclosing adjacent kernel heap contents to the attacker; heap corruption can also be leveraged for broader arbitrary read.\nI:H - `copy_to_urb()` memcpy's an attacker-controlled length of attacker-controlled PCM bytes past the end of the coherent URB buffer, giving a heap out-of-bounds write with controlled content — a primitive suitable for corrupting adjacent objects and hijacking control flow.\nA:H - Overrunning the DMA-coherent transfer buffer corrupts neighbouring kernel/DMA-pool memory and reliably produces an oops or panic, as observed in the syzbot report and the related bugzilla crash reports."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/usb/endpoint.c"],"versions":[{"version":"02c56650f3c118d3752122996d96173d26bb13aa","lessThan":"480a1490c595a242f27493a4544b3efb21b29f6a","status":"affected","versionType":"git"},{"version":"5ef30e443e6d3654cccecec99cf481a69a0a6d3b","lessThan":"ab0b5e92fc36ee82c1bd01fe896d0f775ed5de41","status":"affected","versionType":"git"},{"version":"99703c921864a318e3e8aae74fde071b1ff35bea","lessThan":"282aba56713bbc58155716b55ca7222b2d9cf3c8","status":"affected","versionType":"git"},{"version":"2d50acd7dbd0682a56968ad9551341d7fc5b6eaf","lessThan":"c4dc012b027c9eb101583011089dea14d744e314","status":"affected","versionType":"git"},{"version":"aba41867dd66939d336fdf604e4d73b805d8039f","lessThan":"e0ed5a36fb3ab9e7b9ee45cd17f09f6d5f594360","status":"affected","versionType":"git"},{"version":"d288dc74f8cf95cb7ae0aaf245b7128627a49bf3","lessThan":"d67dde02049e632ba58d3c44a164a74b6a737154","status":"affected","versionType":"git"},{"version":"f0bd62b64016508938df9babe47f65c2c727d25c","lessThan":"6a5da3fa80affc948923f20a4e086177f505e86e","status":"affected","versionType":"git"},{"version":"f0bd62b64016508938df9babe47f65c2c727d25c","lessThan":"217d47255a2ec8b246f2725f5db9ac3f1d4109d7","status":"affected","versionType":"git"},{"version":"f0bd62b64016508938df9babe47f65c2c727d25c","lessThan":"ef592bf2232a2daa9fffa8881881fc9957ea56e9","status":"affected","versionType":"git"},{"version":"f0bd62b64016508938df9babe47f65c2c727d25c","lessThan":"ece3b981bb6620e47fac826a2156c090b1a936a0","status":"affected","versionType":"git"},{"version":"f0bd62b64016508938df9babe47f65c2c727d25c","lessThan":"98e9d5e33bda8db875cc1a4fe99c192658e45ab6","status":"affected","versionType":"git"},{"version":"f0bd62b64016508938df9babe47f65c2c727d25c","lessThan":"d2c04f20ccc6c0d219e6d3038bab45bc66a178ad","status":"affected","versionType":"git"},{"version":"f0bd62b64016508938df9babe47f65c2c727d25c","lessThan":"05a1fc5efdd8560f34a3af39c9cf1e1526cc3ddf","status":"affected","versionType":"git"},{"version":"4.4.229","lessThan":"4.4.230","status":"affected","versionType":"semver"},{"version":"4.9.229","lessThan":"4.9.230","status":"affected","versionType":"semver"},{"version":"4.14.186","lessThan":"4.14.188","status":"affected","versionType":"semver"},{"version":"4.19.130","lessThan":"4.19.132","status":"affected","versionType":"semver"},{"version":"5.4.49","lessThan":"5.4.51","status":"affected","versionType":"semver"},{"version":"5.7.6","lessThan":"5.7.8","status":"affected","versionType":"semver"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/usb/endpoint.c"],"versions":[{"version":"5.8","status":"affected"},{"version":"0","lessThan":"5.8","status":"unaffected","versionType":"semver"},{"version":"4.4.230","lessThanOrEqual":"4.4.*","status":"unaffected","versionType":"semver"},{"version":"4.9.230","lessThanOrEqual":"4.9.*","status":"unaffected","versionType":"semver"},{"version":"4.14.188","lessThanOrEqual":"4.14.*","status":"unaffected","versionType":"semver"},{"version":"4.19.132","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.51","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.7.8","lessThanOrEqual":"5.7.*","status":"unaffected","versionType":"semver"},{"version":"5.10.247","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.197","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.159","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.117","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.59","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.17.9","lessThanOrEqual":"6.17.*","status":"unaffected","versionType":"semver"},{"version":"6.18","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.4.229","versionEndExcluding":"4.4.230"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.9.229","versionEndExcluding":"4.9.230"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14.186","versionEndExcluding":"4.14.188"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19.130","versionEndExcluding":"4.19.132"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4.49","versionEndExcluding":"5.4.51"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7.6","versionEndExcluding":"5.7.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.10.247"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.15.197"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.1.159"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.6.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.12.59"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.17.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.18"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/480a1490c595a242f27493a4544b3efb21b29f6a"},{"url":"https://git.kernel.org/stable/c/ab0b5e92fc36ee82c1bd01fe896d0f775ed5de41"},{"url":"https://git.kernel.org/stable/c/282aba56713bbc58155716b55ca7222b2d9cf3c8"},{"url":"https://git.kernel.org/stable/c/c4dc012b027c9eb101583011089dea14d744e314"},{"url":"https://git.kernel.org/stable/c/e0ed5a36fb3ab9e7b9ee45cd17f09f6d5f594360"},{"url":"https://git.kernel.org/stable/c/d67dde02049e632ba58d3c44a164a74b6a737154"},{"url":"https://git.kernel.org/stable/c/6a5da3fa80affc948923f20a4e086177f505e86e"},{"url":"https://git.kernel.org/stable/c/217d47255a2ec8b246f2725f5db9ac3f1d4109d7"},{"url":"https://git.kernel.org/stable/c/ef592bf2232a2daa9fffa8881881fc9957ea56e9"},{"url":"https://git.kernel.org/stable/c/ece3b981bb6620e47fac826a2156c090b1a936a0"},{"url":"https://git.kernel.org/stable/c/98e9d5e33bda8db875cc1a4fe99c192658e45ab6"},{"url":"https://git.kernel.org/stable/c/d2c04f20ccc6c0d219e6d3038bab45bc66a178ad"},{"url":"https://git.kernel.org/stable/c/05a1fc5efdd8560f34a3af39c9cf1e1526cc3ddf"}],"title":"ALSA: usb-audio: Fix potential overflow of PCM transfer buffer","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-16T20:14:17.883716Z","id":"CVE-2025-40269","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2026-06-16T20:14:28.678Z"}}]}}