syzbot


KCSAN: data-race in snd_rawmidi_poll / snd_rawmidi_proceed

Status: fixed on 2021/03/10 01:48
Subsystems: sound
[Documentation on labels]
Reported-by: syzbot+3d367d1df1d2b67f5c19@syzkaller.appspotmail.com
Fix commit: 88a06d6fd6b3 ALSA: rawmidi: Access runtime->avail always in spinlock
First crash: 1556d, last: 1395d
Discussions (6)
Title Replies (including bot) Last reply
[PATCH 5.4 00/47] 5.4.87-rc1 review 58 (58) 2021/02/26 14:21
[PATCH 5.10 00/63] 5.10.5-rc1 review 75 (75) 2021/01/07 08:13
[PATCH 4.19 00/35] 4.19.165-rc1 review 44 (44) 2021/01/06 13:46
[PATCH 4.19 00/29] 4.19.165-rc2 review 36 (36) 2021/01/06 13:46
[PATCH AUTOSEL 5.4 001/130] soc: aspeed-lpc-ctrl: Fail probe of lpc-ctrl if reserved memory is not aligned 140 (140) 2021/01/06 07:33
[PATCH AUTOSEL 4.19 01/87] locks: Fix UBSAN undefined behaviour in flock64_to_posix_lock 87 (87) 2020/12/23 02:21

Sample crash report:
==================================================================
BUG: KCSAN: data-race in snd_rawmidi_poll / snd_rawmidi_proceed

read-write to 0xffff88801096cc38 of 8 bytes by task 3085 on cpu 1:
 __snd_rawmidi_transmit_ack sound/core/rawmidi.c:1255 [inline]
 snd_rawmidi_proceed+0xd8/0x1e0 sound/core/rawmidi.c:1336
 snd_vmidi_output_work+0x8e/0x200 sound/core/seq/seq_virmidi.c:139
 process_one_work+0x3e1/0x950 kernel/workqueue.c:2275
 worker_thread+0x635/0xb90 kernel/workqueue.c:2421
 kthread+0x1fd/0x220 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

read to 0xffff88801096cc38 of 8 bytes by task 18636 on cpu 0:
 snd_rawmidi_ready sound/core/rawmidi.c:102 [inline]
 snd_rawmidi_poll+0x1ce/0x210 sound/core/rawmidi.c:1506
 vfs_poll include/linux/poll.h:90 [inline]
 do_select+0x8b1/0xfc0 fs/select.c:534
 core_sys_select+0x408/0x690 fs/select.c:677
 do_pselect fs/select.c:759 [inline]
 __do_sys_pselect6+0x1bf/0x220 fs/select.c:800
 __se_sys_pselect6 fs/select.c:791 [inline]
 __x64_sys_pselect6+0x74/0x80 fs/select.c:791
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 18636 Comm: syz-executor.3 Not tainted 5.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (378):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/15 22:10 upstream d635a69dd498 f213e07e .config console log report info ci2-upstream-kcsan-gce
2020/12/15 19:47 upstream 148842c98a24 f213e07e .config console log report info ci2-upstream-kcsan-gce
2020/12/15 10:22 upstream 148842c98a24 97183ed7 .config console log report info ci2-upstream-kcsan-gce
2020/12/14 20:34 upstream fab0fca1da5c 97183ed7 .config console log report info ci2-upstream-kcsan-gce
2020/12/14 19:21 upstream 2c85ebc57b3e 97183ed7 .config console log report info ci2-upstream-kcsan-gce
2020/12/14 07:56 upstream 2c85ebc57b3e b22a7ec3 .config console log report info ci2-upstream-kcsan-gce
2020/12/13 21:35 upstream ec6f5e0e5ca0 8f160dd5 .config console log report info ci2-upstream-kcsan-gce
2020/12/13 18:47 upstream 6bff9bb8a292 8f160dd5 .config console log report info ci2-upstream-kcsan-gce
2020/12/13 11:49 upstream 6bff9bb8a292 bca53db9 .config console log report info ci2-upstream-kcsan-gce
2020/12/12 19:47 upstream 7b1b868e1d91 bca53db9 .config console log report info ci2-upstream-kcsan-gce
2020/12/12 02:29 upstream 7f376f1917d7 bca53db9 .config console log report info ci2-upstream-kcsan-gce
2020/12/11 14:33 upstream 33dc9614dc20 ba24ffcd .config console log report info ci2-upstream-kcsan-gce
2020/12/11 01:35 upstream 9fca90cf2892 f900b48c .config console log report info ci2-upstream-kcsan-gce
2020/12/10 10:46 upstream a2f5ea9e314b c090b4da .config console log report info ci2-upstream-kcsan-gce
2020/12/09 23:17 upstream ca4bbdaf1716 c090b4da .config console log report info ci2-upstream-kcsan-gce
2020/12/09 10:00 upstream a68a0262abda 99917735 .config console log report info ci2-upstream-kcsan-gce
2020/12/08 23:09 upstream 7d8761ba27fc 40cc414d .config console log report info ci2-upstream-kcsan-gce
2020/12/08 21:00 upstream cd796ed33450 40cc414d .config console log report info ci2-upstream-kcsan-gce
2020/12/08 09:32 upstream cd796ed33450 9af51e31 .config console log report info ci2-upstream-kcsan-gce
2020/12/07 23:05 upstream cd796ed33450 51a9082e .config console log report info ci2-upstream-kcsan-gce
2020/12/07 09:40 upstream 0477e9288185 f80ce148 .config console log report info ci2-upstream-kcsan-gce
2020/12/06 20:09 upstream 8100a58044f8 c521566d .config console log report info ci2-upstream-kcsan-gce
2020/12/06 09:40 upstream 7059c2c00a21 f12ba0c5 .config console log report info ci2-upstream-kcsan-gce
2020/12/05 23:57 upstream 32f741b02f1a 50503117 .config console log report info ci2-upstream-kcsan-gce
2020/12/05 09:34 upstream b3298500b23f 0ef84591 .config console log report info ci2-upstream-kcsan-gce
2020/12/04 18:51 upstream e87297fa080a 20366b87 .config console log report info ci2-upstream-kcsan-gce
2020/12/03 13:29 upstream 34816d20f173 59ad4022 .config console log report info ci2-upstream-kcsan-gce
2020/12/03 00:33 upstream 3bb61aa61828 8c9190ef .config console log report info ci2-upstream-kcsan-gce
2020/12/02 22:32 upstream 3bb61aa61828 eff43e99 .config console log report info ci2-upstream-kcsan-gce
2020/12/02 12:40 upstream 509a15421674 eff43e99 .config console log report info ci2-upstream-kcsan-gce
2020/12/01 23:59 upstream b65054597872 c42a35e9 .config console log report info ci2-upstream-kcsan-gce
2020/12/01 11:46 upstream b65054597872 07bfe8a5 .config console log report info ci2-upstream-kcsan-gce
2020/12/01 00:07 upstream b65054597872 b3a34598 .config console log report info ci2-upstream-kcsan-gce
2020/11/30 11:28 upstream b65054597872 76831598 .config console log report info ci2-upstream-kcsan-gce
2020/11/30 03:04 upstream b65054597872 a0092f9d .config console log report info ci2-upstream-kcsan-gce
2020/11/30 03:02 upstream b65054597872 a0092f9d .config console log report info ci2-upstream-kcsan-gce
2020/11/29 13:43 upstream aae5ab854e38 a0092f9d .config console log report info ci2-upstream-kcsan-gce
2020/11/29 00:04 upstream 67f34fa8893e a0092f9d .config console log report info ci2-upstream-kcsan-gce
2020/11/28 22:04 upstream 67f34fa8893e 3c7136c0 .config console log report info ci2-upstream-kcsan-gce
2020/11/28 13:09 upstream c84e1efae022 3c7136c0 .config console log report info ci2-upstream-kcsan-gce
2020/11/28 01:42 upstream c84e1efae022 486f93ef .config console log report info ci2-upstream-kcsan-gce
2020/11/27 13:20 upstream 85a2c56cb445 486f93ef .config console log report info ci2-upstream-kcsan-gce
2020/11/26 23:43 upstream 4df910620beb 5018c946 .config console log report info ci2-upstream-kcsan-gce
2020/11/26 19:10 upstream 4df910620beb 2f1cec62 .config console log report info ci2-upstream-kcsan-gce
2020/11/26 11:23 upstream fa02fcd94b0c 2f1cec62 .config console log report info ci2-upstream-kcsan-gce
2020/11/26 04:57 upstream fa02fcd94b0c 2f1cec62 .config console log report info ci2-upstream-kcsan-gce
2020/08/11 11:14 upstream 00e4db51259a 5d3ebca9 .config console log report ci2-upstream-kcsan-gce
2020/08/11 07:44 upstream 4bcf69e57063 d3694ffb .config console log report ci2-upstream-kcsan-gce
2020/07/08 10:12 upstream dcde237b9b0e 5962a2dc .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.