🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #3097

Bug#1152888: Regression: MOTU M4 USB audio playback fails with EIO on Linux 6.12.115 (works on 6.12.113)

#3097
From: Benjamin Scherrer
Date: Wed, 04 Nov 2026 16:30
157 lines
10021 bytes
Hi Salvatore,

I downloaded upstream 6.12.115, applied patch 70b4db7d2581.patch from 
torvalds' repository with the diff

###
git diff -- sound/usb/pcm.c
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 3a4666e3b..bbffd978b 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1505,7 +1505,8 @@ static int prepare_playback_urb(struct 
snd_usb_substream *subs,

         for (i = 0; i < ctx->packets; i++) {
                 counts = snd_usb_endpoint_next_packet_size(ep, ctx, i, 
avail);
-               if (counts < 0 || frames + counts >= ep->max_urb_frames)
+                       if (counts < 0 ||
+                           (frames + counts) * stride > ctx->buffer_size)
                         break;
                 /* set up descriptor */
                 urb->iso_frame_desc[i].offset = frames * stride;
###

After compiling and booting into that kernel, the sound works!

Best regards
Benjamin

Am 04.11.26 um 05:49 schrieb Salvatore Bonaccorso:
> Control: tags -1 + upstream
> Control: forwarded -1 https://lore.kernel.org/all/shfaXkZCI7FtyNr5tS4kCC_d5E4uQFhc0MtwJa2CQFXpNMfSw7Ub6urwWpGrcoRnHuoneJEi9mLwtnvVImMhz1Hb25iwNJxx8GZZsDCV_HE=@protonmail.com/
> 
> Hi
> On Tue, Nov 03, 2026 at 11:22:16PM +0100, Benjamin Scherrer wrote:
>> Hi Salvatore,
>>
>> thanks a lot for the quick reply.
>>
>> It really is an upstream problem. It works with the upstream 6.12.113 kernel
>> but fails with 6.12.115.
>>
>> I dissected it and only built about 10 kernels, haven't done this in years
>> ;)
>>
>> output of last 'git bisect bad':
>>
>> ---
>> 81e4b0009f2acc841d77a24fd796528b0bf62c4e is the first bad commit
>> commit 81e4b0009f2acc841d77a24fd796528b0bf62c4e (HEAD)
>> Author: Edward Adam Davis <eadavis@qq.com>
>> Date:   Tue Jan 13 16:29:23 2026 +0800
>>
>>      ALSA: usb-audio: Prevent excessive number of frames
>>
>>      [ Upstream commit ef5749ef8b307bf8717945701b1b79d036af0a15 ]
>>
>>      In this case, the user constructed the parameters with maxpacksize 40
>>      for rate 22050 / pps 1000, and packsize[0] 22 packsize[1] 23. The buffer
>>      size for each data URB is maxpacksize * packets, which in this example
>>      is 40 * 6 = 240; When the user performs a write operation to send audio
>>      data into the ALSA PCM playback stream, the calculated number of frames
>>      is packsize[0] * packets = 264, which exceeds the allocated URB buffer
>>      size, triggering the out-of-bounds (OOB) issue reported by syzbot [1].
>>
>>      Added a check for the number of single data URB frames when calculating
>>      the number of frames to prevent [1].
>>
>>      [1]
>>      BUG: KASAN: slab-out-of-bounds in copy_to_urb+0x261/0x460
>> sound/usb/pcm.c:1487
>>      Write of size 264 at addr ffff88804337e800 by task syz.0.17/5506
>>      Call Trace:
>>       copy_to_urb+0x261/0x460 sound/usb/pcm.c:1487
>>       prepare_playback_urb+0x953/0x13d0 sound/usb/pcm.c:1611
>>       prepare_outbound_urb+0x377/0xc50 sound/usb/endpoint.c:333
>>
>>      Reported-by: syzbot+6db0415d6d5c635f72cb@syzkaller.appspotmail.com
>>      Closes: https://syzkaller.appspot.com/bug?extid=6db0415d6d5c635f72cb
>>      Tested-by: syzbot+6db0415d6d5c635f72cb@syzkaller.appspotmail.com
>>      Signed-off-by: Edward Adam Davis <eadavis@qq.com>
>>      Link:
>> https://patch.msgid.link/tencent_9AECE6CD2C7A826D902D696C289724E8120A@qq.com
>>      Signed-off-by: Takashi Iwai <tiwai@suse.de>
>>      Signed-off-by: Sasha Levin <sashal@kernel.org>
>>
>>   sound/usb/pcm.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> ---
>>
>> output of 'git bisect log':
>>
>> ---
>> git bisect start
>> # Status: warte auf guten und schlechten Commit
>> # good: [7fdb7c1824a1f9979d648d7ae28ac446bcee9c6e] Linux 6.12.113
>> git bisect good 7fdb7c1824a1f9979d648d7ae28ac446bcee9c6e
>> # Status: warte auf schlechten Commit, 1 guter Commit bekannt
>> # bad: [03bae623ec326c2738198739625832aab0eb120a] Linux 6.12.115
>> git bisect bad 03bae623ec326c2738198739625832aab0eb120a
>> # bad: [9afcfc4c6597547c20d6354fa68f1d6012e31c0e] wifi: iwlwifi: dvm: pair
>> transport op-mode enter/leave
>> git bisect bad 9afcfc4c6597547c20d6354fa68f1d6012e31c0e
>> # bad: [33201705179d94985c788ae9186ceeab044fb6bd] ceph: Remove uses of page
>> from ceph_process_folio_batch()
>> git bisect bad 33201705179d94985c788ae9186ceeab044fb6bd
>> # good: [39870dbccdea99e1aa0ae445ab913748e912a352] ASoC: Intel: avs: Use
>> topology information for endpoint numbers
>> git bisect good 39870dbccdea99e1aa0ae445ab913748e912a352
>> # bad: [58a4c2dbe6f746cdf9ea06fcaeda535aecb4b80b] bnxt_en: Update firmware
>> interface spec to 1.10.3.85
>> git bisect bad 58a4c2dbe6f746cdf9ea06fcaeda535aecb4b80b
>> # good: [20b3c72c1b83054c568d2322a95e217fdc281bc3] bpf: Mark bpf_refcount
>> field as unique
>> git bisect good 20b3c72c1b83054c568d2322a95e217fdc281bc3
>> # bad: [4eca06a55417c3b2e538656d12c89e224343653e] bpf: Fix exception exit
>> lock checking for subprogs
>> git bisect bad 4eca06a55417c3b2e538656d12c89e224343653e
>> # bad: [f8b8ec0ddde74066d4452a7a961da544f193e00f] riscv: trace: fix snapshot
>> deadlock with sbi ecall
>> git bisect bad f8b8ec0ddde74066d4452a7a961da544f193e00f
>> # good: [f32ae3cfc976074e9c5927893ce49bcf12f53748] idpf: fix error handling
>> in the init_task on load
>> git bisect good f32ae3cfc976074e9c5927893ce49bcf12f53748
>> # good: [d1e9614a142eff34c93e94a15a71ad0e806799c4] virtio_net: Fix
>> misalignment bug in struct virtnet_info
>> git bisect good d1e9614a142eff34c93e94a15a71ad0e806799c4
>> # bad: [81e4b0009f2acc841d77a24fd796528b0bf62c4e] ALSA: usb-audio: Prevent
>> excessive number of frames
>> git bisect bad 81e4b0009f2acc841d77a24fd796528b0bf62c4e
>> # first bad commit: [81e4b0009f2acc841d77a24fd796528b0bf62c4e] ALSA:
>> usb-audio: Prevent excessive number of frames
>> ---
>>
>> I hope this helps!
> 
> Yes it does, thank you for having taken the time to do his. At same
> time another user reported already the issue upstream reaching the
> same commit:
> https://lore.kernel.org/all/shfaXkZCI7FtyNr5tS4kCC_d5E4uQFhc0MtwJa2CQFXpNMfSw7Ub6urwWpGrcoRnHuoneJEi9mLwtnvVImMhz1Hb25iwNJxx8GZZsDCV_HE=@protonmail.com/
> 
> Would it be possible that you check with 6.12.115-2 and the commit
> 70b4db7d2581 ("ALSA: usb-audio: Use the right limit for PCM OOB
> check") on top if that fixes your problem?
> 
> You can either build 6.12.115 upstream with that commit on top, or
> follow
> https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#id-1.6.6.4
> to make the Debian packaging for 6.12.115-2 with a single patch on top
> to test the fix.
> 
> But let me know if that does not help and you need more detailed help.
> 
> Regards,
> Salvatore
> 
Technical Details
Message-ID: <NVM25-9Pqr-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!bofh.it!news.nic.it!robomod
References: <NV7BE-9tvH-1@gated-at.bofh.it> <NVpoS-9Dnm-15@gated-at.bofh.it> <NVM25-9Pqr-3@gated-at.bofh.it> <NVBgl-9JFa-3@gated-at.bofh.it> <NV7BE-9tvH-1@gated-at.bofh.it> <NVBgl-9JFa-3@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From: Benjamin Scherrer <benjamin@wagnerbrutal.de>
Newsgroups: linux.debian.bugs.dist,linux.debian.kernel
Subject: Bug#1152888: Regression: MOTU M4 USB audio playback fails with EIO on Linux 6.12.115 (works on 6.12.113)
Date: Wed, 04 Nov 2026 17:30:01 +0100
Message-ID: <NVM25-9Pqr-1@gated-at.bofh.it>
References: <NV7BE-9tvH-1@gated-at.bofh.it> <NVpoS-9Dnm-15@gated-at.bofh.it> <NVM25-9Pqr-3@gated-at.bofh.it> <NVBgl-9JFa-3@gated-at.bofh.it> <NV7BE-9tvH-1@gated-at.bofh.it> <NVBgl-9JFa-3@gated-at.bofh.it>
X-Original-To: Salvatore Bonaccorso <carnil@debian.org>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Wed Nov  4 16:26:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.45
Reply-To: Benjamin Scherrer <benjamin@wagnerbrutal.de>, 1152888@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-kernel@lists.debian.org
X-Debian-Pr-Message: followup 1152888
X-Debian-Pr-Package: src:linux
X-Debian-Pr-Keywords: upstream moreinfo
X-Debian-Pr-Source: linux
X-Kas-Sym: v3:f51bdf72230551df:SMXWdVvZpZmzOjxH14SewocE00vh2xQw5L5Qe7ko4aKGJ
	0lnpAhG2Z7I1JClP/D2MgG2iExEZZcUbvvsEye7Zcb7ZImUneW0OeH1AKQ7tNK7LaEL5Oh/2B9J
	dS/ybLjwO2hwyMOlBdnE1nR6alVkxUajpN4KtZazdmhwY1AgI6PXiGNxMyILpFHRI74wl7mgr6s
	Y18X8U15CIDE7ThD02v9Cx3AZz0n7Y9dIud/dC9m9DSSzS+SOaQADKAo86Hd/NHEkFZWbwfSW8h
	HfIr2na6v0cbVGTL5dzOtD8IZgWNUO+nQLDIWhxc7Cw/VUVAR7z8YsRaOSLLCtPO0YkbhT4A==:
	kqYDkwnE0B6Gyf4SDmba0tTSt0jWHo2uFcMb639qT6gVkhvzXC5jjT9JXsyWTsfh1F3py49FuC4
	1+zr+eC1/su9cTywILHkP4u1U9uk6LRJ+78Y+s30vng+j3sJbiLljyhOQYt5XQXM3emdTAa+DoU
	/IuSbRcIVlmu9EmpDMaMy/FvRYXUBiwxXDZbOLyY3LzOm6fkOlAZ28N6r3a6jj69Fv6bfrptaQ0
	tRwKEfSB2I1R8e84YHqZhmIU4T3fpXtjIXiXYSsvGF26RlRZFcRHyYTyh0YGaQyaxBtm7d3TfVX
	3hcvReyWS85CyCzV9+oq5DAMK/q3BtfaGDLb2j/c4NqotvII81q9dq/ng9XqhOzQbSbXZIadAgS
	QOR0HJCUKuyC7MtBBAbwf2wRNWB2NjamUQ4N9i/6bqpexGkWm6KA7EmnV0ZmEcFjyZUuZyhOfUF
	lPV2+Vp/rhaId/UAfxZUKjDs/tS51QCEYgJPIfA44t2IBVR2CnI1lRJcdFDNcP5OOw+RR6uiHzQ
	KSxCp0t9W6Sxs0R7axZho9XKv36xUcJXRx/CXm+sGGeGc8z
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: de-DE, en-US
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spamd-Bar: ----
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2000627
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 157
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: 1152888@bugs.debian.org
X-Original-Date: Wed, 4 Nov 2026 17:24:38 +0100
X-Original-Message-ID: <f486c324-8692-4fdc-9f02-db1aeea64baf@wagnerbrutal.de>
X-Original-References: <179365404033.4880.4185261490236431358.reportbug@sound> <auoIQhPDIH1rTq3i@eldamar.lan> <d0534cde-29de-4de9-923a-7b0ff1fdcd50@wagnerbrutal.de> <auq5RSNebuP-76Nk@eldamar.lan> <179365404033.4880.4185261490236431358.reportbug@sound> <auq5RSNebuP-76Nk@eldamar.lan>