syzbot


KCSAN: data-race in macsec_handle_frame / macsec_handle_frame (3)

Status: fixed on 2023/10/12 12:47
Subsystems: net
[Documentation on labels]
Fix commit: 32d0a49d36a2 macsec: use DEV_STATS_INC()
First crash: 433d, last: 432d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in macsec_handle_frame / macsec_handle_frame net 35 536d 718d 0/28 auto-obsoleted due to no activity on 2023/05/26 19:55
upstream KCSAN: data-race in macsec_handle_frame / macsec_handle_frame (2) net 1 480d 480d 0/28 auto-obsoleted due to no activity on 2023/07/21 17:19

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

read-write to 0xffff888139a65168 of 8 bytes by task 20693 on cpu 0:
 handle_not_macsec drivers/net/macsec.c:1072 [inline]
 macsec_handle_frame+0x341/0x1410 drivers/net/macsec.c:1119
 __netif_receive_skb_core+0x9e8/0x1e80 net/core/dev.c:5346
 __netif_receive_skb_one_core net/core/dev.c:5450 [inline]
 __netif_receive_skb+0x57/0x1b0 net/core/dev.c:5566
 netif_receive_skb_internal net/core/dev.c:5652 [inline]
 netif_receive_skb+0x4a/0x310 net/core/dev.c:5711
 tun_rx_batched+0x3bf/0x400
 tun_get_user+0x1d24/0x22b0 drivers/net/tun.c:1997
 tun_chr_write_iter+0x18e/0x240 drivers/net/tun.c:2043
 call_write_iter include/linux/fs.h:1871 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x4ab/0x7d0 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read-write to 0xffff888139a65168 of 8 bytes by task 20694 on cpu 1:
 handle_not_macsec drivers/net/macsec.c:1072 [inline]
 macsec_handle_frame+0x341/0x1410 drivers/net/macsec.c:1119
 __netif_receive_skb_core+0x9e8/0x1e80 net/core/dev.c:5346
 __netif_receive_skb_one_core net/core/dev.c:5450 [inline]
 __netif_receive_skb+0x57/0x1b0 net/core/dev.c:5566
 netif_receive_skb_internal net/core/dev.c:5652 [inline]
 netif_receive_skb+0x4a/0x310 net/core/dev.c:5711
 tun_rx_batched+0x3bf/0x400
 tun_get_user+0x1d24/0x22b0 drivers/net/tun.c:1997
 tun_chr_write_iter+0x18e/0x240 drivers/net/tun.c:2043
 call_write_iter include/linux/fs.h:1871 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x4ab/0x7d0 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000000b81 -> 0x0000000000000b83

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 20694 Comm: syz-executor.4 Not tainted 6.5.0-rc4-syzkaller-00051-g7bafbd4027ae #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/04 03:55 upstream 7bafbd4027ae 74621247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in macsec_handle_frame / macsec_handle_frame
2023/08/02 18:23 upstream 5d0c230f1de8 b178af49 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in macsec_handle_frame / macsec_handle_frame
* Struck through repros no longer work on HEAD.