syzbot


KCSAN: data-race in _extract_crng / crng_reseed

Status: auto-closed as invalid on 2020/09/29 18:37
Reported-by: syzbot+616fe97dd2d9cb6f513c@syzkaller.appspotmail.com
First crash: 780d, last: 760d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in _extract_crng / crng_reseed (2) 1 613d 613d 0/24 auto-closed as invalid on 2021/02/24 01:37
upstream KCSAN: data-race in _extract_crng / crng_reseed (3) 1 436d 436d 0/24 auto-closed as invalid on 2021/09/03 03:07

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

write to 0xffffffff89e6ebe8 of 8 bytes by task 4790 on cpu 1:
 crng_reseed+0x3ed/0x680 drivers/char/random.c:975
 _extract_crng+0xcc/0x2d0 drivers/char/random.c:1006
 crng_reseed+0x69/0x680 drivers/char/random.c:962
 _extract_crng+0xcc/0x2d0 drivers/char/random.c:1006
 extract_crng drivers/char/random.c:1026 [inline]
 _get_random_bytes+0x141/0x260 drivers/char/random.c:1563
 get_random_bytes+0x65/0x110 drivers/char/random.c:1576
 eth_random_addr include/linux/etherdevice.h:225 [inline]
 nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:508 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:558 [inline]
 nsim_dev_trap_report_work+0x200/0x5c0 drivers/net/netdevsim/dev.c:599
 process_one_work+0x3e1/0x9a0 kernel/workqueue.c:2269
 worker_thread+0x665/0xbe0 kernel/workqueue.c:2415
 kthread+0x20d/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

read to 0xffffffff89e6ebe8 of 8 bytes by task 5075 on cpu 0:
 _extract_crng+0x47/0x2d0 drivers/char/random.c:1004
 crng_reseed+0x69/0x680 drivers/char/random.c:962
 _extract_crng+0xcc/0x2d0 drivers/char/random.c:1006
 extract_crng drivers/char/random.c:1026 [inline]
 extract_crng_user drivers/char/random.c:1082 [inline]
 urandom_read_nowarn+0x152/0x370 drivers/char/random.c:1836
 __do_sys_getrandom drivers/char/random.c:2033 [inline]
 __se_sys_getrandom drivers/char/random.c:2008 [inline]
 __x64_sys_getrandom+0xd6/0x130 drivers/char/random.c:2008
 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: 5075 Comm: systemd-udevd Not tainted 5.9.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/08/25 18:36 upstream 6a9dc5fd6170 344da168 .config log report
ci2-upstream-kcsan-gce 2020/08/06 09:01 upstream fffe3ae0ee84 0487ea6f .config log report
* Struck through repros no longer work on HEAD.