Re: UBSAN: shift-out-of-bounds in sound/pci/ctxfi/cthw20k2.c:956:31
From: Takashi Iwai
Date: Fri Mar 27 2026 - 05:14:33 EST
On Sat, 21 Mar 2026 20:56:21 +0100,
Karsten Hohmeier wrote:
>
> Hello Takashi,
>
> I applied your patch and uncommented the stack dumps.
> Here is what I get.
>
> Mar 21 20:41:34 dtest kernel: XXX invalid type 9 for hw20k2
Thanks, this looks like the cause.
Could you try the following one-liner?
thanks,
Takashi
--- a/sound/pci/ctxfi/ctdaio.c
+++ b/sound/pci/ctxfi/ctdaio.c
@@ -118,6 +118,7 @@ static unsigned int daio_device_index(enum DAIOTYP type, struct hw *hw)
switch (type) {
case SPDIFOO: return 0;
case SPDIFIO: return 0;
+ case SPDIFI1: return 1;
case LINEO1: return 4;
case LINEO2: return 7;
case LINEO3: return 5;