syzbot


KCSAN: data-race in __inet_lookup_established / inet_put_port

Status: auto-closed as invalid on 2021/12/31 18:59
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 371d, last: 371d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __inet_lookup_established / inet_put_port (2) 1 261d 248d 0/24 auto-closed as invalid on 2022/04/20 06:18

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

write to 0xffff888107c184ce of 2 bytes by task 23232 on cpu 0:
 __inet_put_port net/ipv4/inet_hashtables.c:118 [inline]
 inet_put_port+0x112/0x1b0 net/ipv4/inet_hashtables.c:126
 tcp_set_state net/ipv4/tcp.c:2602 [inline]
 tcp_done+0x19f/0x360 net/ipv4/tcp.c:4409
 tcp_reset+0xc6/0x1b0 net/ipv4/tcp_input.c:4312
 tcp_validate_incoming+0xc5b/0xdf0
 tcp_rcv_state_process+0x2c0/0x1250 net/ipv4/tcp_input.c:6448
 tcp_v4_do_rcv+0x42c/0x590 net/ipv4/tcp_ipv4.c:1738
 sk_backlog_rcv include/net/sock.h:1030 [inline]
 __release_sock+0xf2/0x270 net/core/sock.c:2768
 __tcp_close+0x782/0x11d0 net/ipv4/tcp.c:2811
 tcp_close+0x24/0xa0 net/ipv4/tcp.c:2888
 inet_release+0xc6/0xe0 net/ipv4/af_inet.c:427
 __sock_release net/socket.c:649 [inline]
 sock_release+0x40/0xd0 net/socket.c:677
 rds_tcp_conn_path_shutdown+0x12c/0x190 net/rds/tcp_connect.c:217
 rds_conn_shutdown+0x2bb/0x440 net/rds/connection.c:397
 rds_shutdown_worker+0x18/0x20 net/rds/threads.c:249
 process_one_work+0x3fc/0x980 kernel/workqueue.c:2298
 worker_thread+0x616/0xa70 kernel/workqueue.c:2445
 kthread+0x2c7/0x2e0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

read to 0xffff888107c184cc of 4 bytes by interrupt on cpu 1:
 __inet_lookup_established+0xe1/0x3d0 net/ipv4/inet_hashtables.c:413
 __inet_lookup include/net/inet_hashtables.h:359 [inline]
 __inet_lookup_skb include/net/inet_hashtables.h:401 [inline]
 tcp_v4_rcv+0x8a8/0x26d0 net/ipv4/tcp_ipv4.c:2001
 ip_protocol_deliver_rcu+0x291/0x540 net/ipv4/ip_input.c:204
 ip_local_deliver_finish net/ipv4/ip_input.c:231 [inline]
 NF_HOOK include/linux/netfilter.h:307 [inline]
 ip_local_deliver+0x1d6/0x2a0 net/ipv4/ip_input.c:252
 dst_input include/net/dst.h:460 [inline]
 ip_rcv_finish net/ipv4/ip_input.c:429 [inline]
 NF_HOOK include/linux/netfilter.h:307 [inline]
 ip_rcv+0x1a6/0x250 net/ipv4/ip_input.c:540
 __netif_receive_skb_one_core net/core/dev.c:5462 [inline]
 __netif_receive_skb+0x8b/0x1b0 net/core/dev.c:5576
 process_backlog+0x23f/0x3e0 net/core/dev.c:6452
 __napi_poll+0x65/0x3f0 net/core/dev.c:7020
 napi_poll net/core/dev.c:7087 [inline]
 net_rx_action+0x29e/0x650 net/core/dev.c:7174
 __do_softirq+0x158/0x2de kernel/softirq.c:558
 run_ksoftirqd+0x1f/0x30 kernel/softirq.c:920
 smpboot_thread_fn+0x308/0x4a0 kernel/smpboot.c:164
 kthread+0x2c7/0x2e0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

value changed: 0xb1d30140 -> 0x00000140

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 18 Comm: ksoftirqd/1 Tainted: G        W         5.16.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/26 18:55 upstream a4849f6000e2 63eeac02 .config log report info KCSAN: data-race in __inet_lookup_established / inet_put_port
* Struck through repros no longer work on HEAD.