syzbot


KCSAN: data-race in do_epoll_wait / do_epoll_wait

Status: fixed on 2023/02/24 13:50
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+bdd6e38a1ed5ee58d8bd@syzkaller.appspotmail.com
Fix commit: d679ae94fdd5 list: fix a data-race around ep->rdllist
First crash: 1382d, last: 864d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 5.17 000/772] 5.17.14-rc1 review 793 (793) 2022/06/20 15:05
[PATCH 5.18 000/879] 5.18.3-rc1 review 893 (893) 2022/06/09 06:12
[PATCH 5.15 000/667] 5.15.46-rc1 review 678 (678) 2022/06/09 00:23
[PATCH 0/2] Fix data-races around epoll reported by KCSAN. 4 (4) 2022/03/29 17:03

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

write to 0xffff8881049c4b98 of 8 bytes by task 1799 on cpu 0:
 INIT_LIST_HEAD include/linux/list.h:38 [inline]
 list_splice_init include/linux/list.h:492 [inline]
 ep_start_scan fs/eventpoll.c:622 [inline]
 ep_send_events fs/eventpoll.c:1656 [inline]
 ep_poll fs/eventpoll.c:1806 [inline]
 do_epoll_wait+0x541/0xf10 fs/eventpoll.c:2234
 do_epoll_pwait fs/eventpoll.c:2268 [inline]
 __do_sys_epoll_pwait fs/eventpoll.c:2281 [inline]
 __se_sys_epoll_pwait+0x136/0x250 fs/eventpoll.c:2275
 __x64_sys_epoll_pwait+0x74/0x80 fs/eventpoll.c:2275
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

read to 0xffff8881049c4b98 of 8 bytes by task 15342 on cpu 1:
 list_empty_careful include/linux/list.h:329 [inline]
 ep_events_available fs/eventpoll.c:381 [inline]
 ep_poll fs/eventpoll.c:1797 [inline]
 do_epoll_wait+0x2be/0xf10 fs/eventpoll.c:2234
 do_epoll_pwait fs/eventpoll.c:2268 [inline]
 __do_sys_epoll_pwait fs/eventpoll.c:2281 [inline]
 __se_sys_epoll_pwait+0x136/0x250 fs/eventpoll.c:2275
 __x64_sys_epoll_pwait+0x74/0x80 fs/eventpoll.c:2275
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0xffff8881049c4b90 -> 0xffff8881026fdb98

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 15342 Comm: syz-fuzzer Not tainted 5.18.0-syzkaller-01444-g0350785b0a09-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (83):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/05/25 02:39 upstream 0350785b0a09 647c0e27 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/05/18 17:23 upstream ef1302160bfb 50c53f39 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/05/04 20:05 upstream a7391ad35724 dc9e5259 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/04/10 16:02 upstream 1862a69c9174 e22c3da3 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/03/07 19:40 upstream ffb217a13a2e 7bdd8b2c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/03/06 05:22 upstream 0014404f9c18 7bdd8b2c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/02/17 18:30 upstream f71077a4d84b 2bea8a27 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/02/07 03:02 upstream d8ad2ce873ab a7dab638 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/02/04 06:29 upstream c36c04c2e132 30646bfe .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/02/03 15:30 upstream 88808fbbead4 4ebb2798 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/02/02 12:34 upstream 9f7fb8de5d9b 4ebb2798 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/01/27 20:01 upstream 626b2dda7651 64a8e201 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/01/25 16:03 upstream dd81e1c7d5fb 2cbffd88 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/01/24 14:52 upstream dd81e1c7d5fb 214351e1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/01/21 11:40 upstream 2c271fe77d52 ab3d9f17 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/01/18 21:11 upstream 99613159ad74 731a2d23 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/01/14 05:49 upstream 455e73a07f6e b8d780ab .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/01/10 16:09 upstream df0cc57e057f 2ca0d385 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2022/01/09 13:20 upstream 4634129ad9fd 2ca0d385 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/12/29 03:57 upstream ecf71de775a0 76c8cf06 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/12/24 16:15 upstream 7a29b11da965 6caa12e4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/12/12 22:44 upstream 90d9fbc16b69 49ca1f59 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/12/11 07:24 upstream 9e65da135b39 49ca1f59 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/12/10 16:35 upstream c741e49150db fc17c959 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/11/25 17:24 upstream 5f53fa508db0 545ab074 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/11/13 04:13 upstream 66f4beaa6c1d 75b04091 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/11/10 03:36 upstream cb690f5238d7 55fa030c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/11/08 22:26 upstream e851dfae4371 d29682f1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/11/05 22:54 upstream fe91c4725aee 4c1be0be .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/11/05 00:20 upstream 7ddb58cb0eca 4c1be0be .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/11/04 13:42 upstream ce840177930f 4c1be0be .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/11/01 14:52 upstream 8bb7eca972ad 098b5d53 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/10/28 05:24 upstream 1fc596a56b33 be531bb4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/10/27 14:47 upstream d25f27432f80 be531bb4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/10/23 15:48 upstream 9c0c4d24ac00 282f03fb .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/10/17 09:57 upstream d999ade1cc86 0c5d9412 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/10/16 12:44 upstream 8fe31e0995f0 0c5d9412 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/10/01 13:28 upstream 4de593fb965f 1d849ab4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/09/28 19:33 upstream d33bec7b3dfa d82cb927 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/09/26 05:17 upstream 85736168463d 8cac236e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/09/20 14:15 upstream e4e737bb5c17 3d9c9a2a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/09/19 15:17 upstream d4d016caa4b8 70b76c1d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/09/18 06:18 upstream 4357f03d6611 70b76c1d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/09/08 02:59 upstream 0bcfe68b8767 064c9eb7 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/09/07 02:08 upstream 4b93c544e90e 6ca60148 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/04/20 19:46 upstream 7af08140979a c0ced557 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/04/14 17:37 upstream 50987beca096 3134b37f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/04/13 06:15 upstream 89698becf06d 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/03/23 05:40 upstream 0d02ec6b3136 8092f30d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/02/24 01:24 upstream 3b9cdafb5358 fcc6d71b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/02/22 20:25 upstream 31caf8b2a847 c26fb06b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/02/22 00:03 upstream 55f62bc87347 a659b3f1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/02/18 00:17 upstream f40ddce88593 14052202 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/02/17 11:34 upstream f40ddce88593 052f8d9f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/02/10 23:47 upstream 291009f656e8 a52ee10a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_epoll_wait / do_epoll_wait
2021/01/15 14:28 upstream 146620506274 65a7a854 .config console log report info ci2-upstream-kcsan-gce
2021/01/12 15:36 upstream a0d54b4f5b21 2c1f2513 .config console log report info ci2-upstream-kcsan-gce
2021/01/02 07:17 upstream eda809aef534 79264ae3 .config console log report info ci2-upstream-kcsan-gce
2020/12/31 10:10 upstream f6e1ea196492 5cc121d6 .config console log report info ci2-upstream-kcsan-gce
2020/12/28 16:06 upstream 5c8fe583cce5 8259d56c .config console log report info ci2-upstream-kcsan-gce
2020/12/28 00:11 upstream f838f8d2b694 2242f77f .config console log report info ci2-upstream-kcsan-gce
2020/12/26 12:02 upstream 5814bc2d4cc2 821e0b09 .config console log report info ci2-upstream-kcsan-gce
2020/12/23 01:06 upstream 614cb5894306 04201c06 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.