[Android 5.15] UBSAN: shift-out-of-bounds in parse_audio_unit

1 view
Skip to first unread message

syzbot

unread,
Jul 21, 2024, 10:50:26 PM7/21/24
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: db06c48ab67e Merge 5.15.151 into android13-5.15-lts
git tree: android13-5.15-lts
console output: https://syzkaller.appspot.com/x/log.txt?x=1799b995980000
kernel config: https://syzkaller.appspot.com/x/.config?x=86bf041a7cd0c66e
dashboard link: https://syzkaller.appspot.com/bug?extid=564c9cc7746f2a77d21e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10682fe9980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1423311d980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/8c56f45d6602/disk-db06c48a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/91d1d0ae9dfe/vmlinux-db06c48a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1262d10f3bd3/bzImage-db06c48a.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+564c9c...@syzkaller.appspotmail.com

usb 1-1: config 1 has 1 interface, different from the descriptor's value: 3
usb 1-1: New USB device found, idVendor=08b7, idProduct=0000, bcdDevice= 0.00
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=3
usb 1-1: SerialNumber: syz
usb 1-1: 0:2 : does not exist
================================================================================
UBSAN: shift-out-of-bounds in sound/usb/mixer.c:2021:20
shift exponent 41 is too large for 32-bit type 'int'
CPU: 1 PID: 39 Comm: kworker/1:1 Not tainted 5.15.151-syzkaller-00415-gdb06c48ab67e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x17 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_shift_out_of_bounds+0x3bf/0x420 lib/ubsan.c:321
parse_audio_feature_unit sound/usb/mixer.c:2021 [inline]
parse_audio_unit+0x270d/0x3d90 sound/usb/mixer.c:2871
snd_usb_mixer_controls sound/usb/mixer.c:3216 [inline]
snd_usb_create_mixer+0x122f/0x2dd0 sound/usb/mixer.c:3563
usb_audio_probe+0x1412/0x2260 sound/usb/card.c:858
usb_probe_interface+0x5b6/0xa90 drivers/usb/core/driver.c:396
really_probe+0x28d/0x970 drivers/base/dd.c:595
__driver_probe_device+0x1a0/0x310 drivers/base/dd.c:755
driver_probe_device+0x54/0x3d0 drivers/base/dd.c:785
__device_attach_driver+0x2c5/0x470 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x312/0x510 drivers/base/dd.c:979
device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028
bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:487
device_add+0xb60/0xf10 drivers/base/core.c:3404
usb_set_configuration+0x190f/0x1e80 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x8b/0x150 drivers/usb/core/generic.c:238
usb_probe_device+0x144/0x260 drivers/usb/core/driver.c:293
really_probe+0x28d/0x970 drivers/base/dd.c:595
__driver_probe_device+0x1a0/0x310 drivers/base/dd.c:755
driver_probe_device+0x54/0x3d0 drivers/base/dd.c:785
__device_attach_driver+0x2c5/0x470 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x312/0x510 drivers/base/dd.c:979
device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028
bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:487
device_add+0xb60/0xf10 drivers/base/core.c:3404
usb_new_device+0x1038/0x1c00 drivers/usb/core/hub.c:2590
hub_port_connect drivers/usb/core/hub.c:5503 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5643 [inline]
port_event drivers/usb/core/hub.c:5793 [inline]
hub_event+0x2def/0x4770 drivers/usb/core/hub.c:5875
process_one_work+0x6bb/0xc10 kernel/workqueue.c:2325
worker_thread+0xad5/0x12a0 kernel/workqueue.c:2472
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Feb 12, 2025, 3:20:04 PMFeb 12
to syzkaller-a...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit a19c6a484417343667b98acb510e3cc5a053089b
Author: Takashi Iwai <ti...@suse.de>
Date: Sun Jul 28 16:08:55 2024 +0000

ALSA: usb: Fix UBSAN warning in parse_audio_unit()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16bc49b0580000
start commit: b4bd207b0380 Merge branch 'android13-5.15' into android13-..
git tree: android13-5.15-lts
kernel config: https://syzkaller.appspot.com/x/.config?x=f0e2420ad44d4165
dashboard link: https://syzkaller.appspot.com/bug?extid=564c9cc7746f2a77d21e
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15548af8580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17293018580000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: ALSA: usb: Fix UBSAN warning in parse_audio_unit()

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

syzbot

unread,
Apr 21, 2025, 2:27:13 AMApr 21
to syzkaller-a...@googlegroups.com
Auto-closing this bug as obsolete.
No recent activity, existing reproducers are no longer triggering the issue.
Reply all
Reply to author
Forward
0 new messages