Re: UBSAN: shift-out-of-bounds in sound/pci/ctxfi/cthw20k2.c:956:31

Karsten Hohmeier
2026-03-21T19:56:33Z

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
Mar 21 20:41:34 dtest kernel: CPU: 8 UID: 0 PID: 535 Comm: (udev-worker) Tainted: G OE 6.19.8 #2 PREEMPT(lazy)
Mar 21 20:41:34 dtest kernel: Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
Mar 21 20:41:34 dtest kernel: Hardware name: To Be Filled By O.E.M. A320M-DVS R4.0/A320M-DVS R4.0, BIOS P10.44 02/23/2026
Mar 21 20:41:34 dtest kernel: Call Trace:
Mar 21 20:41:34 dtest kernel: <TASK>
Mar 21 20:41:34 dtest kernel: dump_stack_lvl+0x5d/0x80
Mar 21 20:41:34 dtest kernel: daio_device_index.isra.0.cold+0x13/0x45 [snd_ctxfi]
Mar 21 20:41:34 dtest kernel: get_daio_rsc+0x1d1/0x2c0 [snd_ctxfi]
Mar 21 20:41:34 dtest kernel: atc_get_resources+0x161/0x380 [snd_ctxfi]
Mar 21 20:41:34 dtest kernel: ct_atc_create+0x3ec/0x540 [snd_ctxfi]
Mar 21 20:41:34 dtest kernel: ct_card_probe+0x104/0x2c0 [snd_ctxfi]
Mar 21 20:41:34 dtest kernel: local_pci_probe+0x42/0x90
Mar 21 20:41:34 dtest kernel: pci_device_probe+0xda/0x2b0
Mar 21 20:41:34 dtest kernel: ? sysfs_do_create_link_sd+0x6d/0xd0
Mar 21 20:41:34 dtest kernel: really_probe+0xde/0x380
Mar 21 20:41:34 dtest kernel: __driver_probe_device+0x78/0x150
Mar 21 20:41:34 dtest kernel: driver_probe_device+0x1f/0xa0
Mar 21 20:41:34 dtest kernel: ? __pfx___driver_attach+0x10/0x10
Mar 21 20:41:34 dtest kernel: __driver_attach+0xcb/0x200
Mar 21 20:41:34 dtest kernel: bus_for_each_dev+0x85/0xd0
Mar 21 20:41:34 dtest kernel: bus_add_driver+0x118/0x200
Mar 21 20:41:34 dtest kernel: ? __pfx_ct_driver_init+0x10/0x10 [snd_ctxfi]
Mar 21 20:41:34 dtest kernel: driver_register+0x75/0xe0
Mar 21 20:41:34 dtest kernel: do_one_initcall+0x5b/0x300
Mar 21 20:41:34 dtest kernel: do_init_module+0x62/0x250
Mar 21 20:41:34 dtest kernel: init_module_from_file+0xd8/0x140
Mar 21 20:41:34 dtest kernel: idempotent_init_module+0x114/0x310
Mar 21 20:41:34 dtest kernel: __x64_sys_finit_module+0x71/0xe0
Mar 21 20:41:34 dtest kernel: ? syscall_trace_enter+0x8d/0x1d0
Mar 21 20:41:34 dtest kernel: do_syscall_64+0x81/0x600
Mar 21 20:41:34 dtest kernel: ? vfs_read+0x165/0x390
Mar 21 20:41:34 dtest kernel: ? vfs_read+0x165/0x390
Mar 21 20:41:34 dtest kernel: ? restore_fpregs_from_fpstate+0x46/0xa0
Mar 21 20:41:34 dtest kernel: ? switch_fpu_return+0x5b/0xe0
Mar 21 20:41:34 dtest kernel: ? do_syscall_64+0x245/0x600
Mar 21 20:41:34 dtest kernel: ? exc_page_fault+0x7e/0x1a0
Mar 21 20:41:34 dtest kernel: entry_SYSCALL_64_after_hwframe+0x76/0x7e
Mar 21 20:41:34 dtest kernel: RIP: 0033:0x7ff26a11bc29
Mar 21 20:41:34 dtest kernel: Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d b7 51 0d 0>
Mar 21 20:41:34 dtest kernel: RSP: 002b:00007ffcf4bdf7c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
Mar 21 20:41:34 dtest kernel: RAX: ffffffffffffffda RBX: 000055a12d9ec2b0 RCX: 00007ff26a11bc29
Mar 21 20:41:34 dtest kernel: RDX: 0000000000000004 RSI: 00007ff2696e844d RDI: 000000000000004d
Mar 21 20:41:34 dtest kernel: RBP: 0000000000000004 R08: 0000000000000000 R09: 000055a12d5e1670
Mar 21 20:41:34 dtest kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000020000
Mar 21 20:41:34 dtest kernel: R13: 00007ff2696e844d R14: 000055a12d9e7720 R15: 0000000000000000
Mar 21 20:41:34 dtest kernel: </TASK>
Mar 21 20:41:34 dtest kernel: snd_ctxfi 0000:05:00.0: Failed to get DAIO resource 9!!!
Mar 21 20:41:34 dtest kernel: snd_ctxfi 0000:05:00.0: Something wrong!!!
Mar 21 20:41:34 dtest kernel: snd_ctxfi 0000:05:00.0: probe with driver snd_ctxfi failed with error -22

Sorry, that it takes a while for me to test, but I only have access to this machine on weekends.

Regards

Karsten