syzbot


general protection fault in usb_audio_probe

Status: fixed on 2021/04/09 19:46
Subsystems: usb sound
[Documentation on labels]
Reported-by: syzbot+719da9b149a931f5143f@syzkaller.appspotmail.com
Fix commit: 30dea07180de ALSA: usb-audio: fix NULL ptr dereference in usb_audio_probe
First crash: 1138d, last: 1133d
Cause bisection: introduced by (bisect log) :
commit 9799110825dba087c2bdce886977cf84dada2005
Author: Kai-Heng Feng <kai.heng.feng@canonical.com>
Date: Thu Mar 4 04:34:16 2021 +0000

  ALSA: usb-audio: Disable USB autosuspend properly in setup_disable_autosuspend()

Crash: general protection fault in usb_audio_probe (log)
Repro: C syz .config
  
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 5.10 000/290] 5.10.24-rc1 review 317 (317) 2021/03/22 08:15
[PATCH 5.11 000/306] 5.11.7-rc1 review 313 (313) 2021/03/19 09:50
[PATCH next 0/2] fixes for sound: usb: 5 (5) 2021/03/09 06:43
[syzbot] general protection fault in usb_audio_probe 0 (1) 2021/03/08 18:00

Sample crash report:
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: syz
usb 1-1: Manufacturer: syz
usb 1-1: SerialNumber: syz
usb 1-1: 0:2 : does not exist
general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 0 PID: 2965 Comm: kworker/0:2 Not tainted 5.12.0-rc1-next-20210305-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
RIP: 0010:usb_audio_probe+0xa80/0x2c70 sound/usb/card.c:833
Code: 8b 74 24 08 48 89 df e8 0e 31 06 00 e8 59 64 8d fa 48 8b 04 24 48 8d 78 12 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 af
RSP: 0018:ffffc900016cf0c8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff888023e48e88 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff86e61767 RDI: 0000000000000012
RBP: 0000000000000020 R08: 0000000000000000 R09: ffffffff8d580a07
R10: ffffffff86e61bfe R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: 000000000000001f
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056098ddcb140 CR3: 00000000147bd000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396
 really_probe+0x291/0xe60 drivers/base/dd.c:554
 driver_probe_device+0x26b/0x3d0 drivers/base/dd.c:740
 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:846
 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431
 __device_attach+0x228/0x4a0 drivers/base/dd.c:914
 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491
 device_add+0xbdb/0x1db0 drivers/base/core.c:3242
 usb_set_configuration+0x113f/0x1910 drivers/usb/core/message.c:2164
 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238
 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293
 really_probe+0x291/0xe60 drivers/base/dd.c:554
 driver_probe_device+0x26b/0x3d0 drivers/base/dd.c:740
 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:846
 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431
 __device_attach+0x228/0x4a0 drivers/base/dd.c:914
 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491
 device_add+0xbdb/0x1db0 drivers/base/core.c:3242
 usb_new_device.cold+0x721/0x1058 drivers/usb/core/hub.c:2555
 hub_port_connect drivers/usb/core/hub.c:5223 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5363 [inline]
 port_event drivers/usb/core/hub.c:5509 [inline]
 hub_event+0x2357/0x4320 drivers/usb/core/hub.c:5591
 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275
 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421
 kthread+0x3b1/0x4a0 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Modules linked in:
---[ end trace 4d5988887d9521a9 ]---
RIP: 0010:usb_audio_probe+0xa80/0x2c70 sound/usb/card.c:833
Code: 8b 74 24 08 48 89 df e8 0e 31 06 00 e8 59 64 8d fa 48 8b 04 24 48 8d 78 12 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 af
RSP: 0018:ffffc900016cf0c8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff888023e48e88 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff86e61767 RDI: 0000000000000012
RBP: 0000000000000020 R08: 0000000000000000 R09: ffffffff8d580a07
R10: ffffffff86e61bfe R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: 000000000000001f
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005572425f2908 CR3: 0000000020f01000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (360):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/03/05 13:28 linux-next 4641b32307b3 9d751681 .config console log report syz C ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/10 13:21 linux-next 3aa6f5082286 26967e35 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/10 12:21 linux-next 3aa6f5082286 26967e35 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/10 11:59 linux-next 3aa6f5082286 26967e35 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/10 10:59 linux-next 3aa6f5082286 26967e35 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/09 17:12 linux-next 3aa6f5082286 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/09 03:00 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/09 01:53 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/09 00:22 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 23:41 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 22:32 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 21:32 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 20:52 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 18:34 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 15:51 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 14:50 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 13:45 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 13:42 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/08 00:08 linux-next 4641b32307b3 75506d9c .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 10:35 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 09:13 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 07:46 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 06:45 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 05:46 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 05:05 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 04:32 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 04:16 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 03:14 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 02:43 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/07 01:59 linux-next 4641b32307b3 e4b4d570 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 17:04 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 15:42 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 14:32 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 12:41 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 12:21 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:55 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:54 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:52 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:51 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:48 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:46 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:46 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:44 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:42 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
2021/03/05 11:02 linux-next 4641b32307b3 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in usb_audio_probe
* Struck through repros no longer work on HEAD.