syzbot


KCSAN: data-race in sctp_association_free / sctp_wait_for_connect (9)

Status: moderation: reported on 2024/03/04 15:29
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+2751b0e8175308aacdf9@syzkaller.appspotmail.com
First crash: 69d, last: 18d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in sctp_association_free / sctp_wait_for_connect sctp 8 1533d 1631d 0/26 auto-closed as invalid on 2020/04/25 04:20
upstream KCSAN: data-race in sctp_association_free / sctp_wait_for_connect (5) sctp 2 698d 712d 0/26 auto-closed as invalid on 2022/07/03 08:54
upstream KCSAN: data-race in sctp_association_free / sctp_wait_for_connect (6) kernel 1 444d 444d 0/26 auto-obsoleted due to no activity on 2023/03/21 10:51
upstream KCSAN: data-race in sctp_association_free / sctp_wait_for_connect (3) sctp 1 1143d 1143d 0/26 auto-closed as invalid on 2021/04/15 05:09
upstream KCSAN: data-race in sctp_association_free / sctp_wait_for_connect (7) sctp 1 387d 387d 0/26 auto-obsoleted due to no activity on 2023/05/10 22:22
upstream KCSAN: data-race in sctp_association_free / sctp_wait_for_connect (4) sctp 1 894d 894d 0/26 auto-closed as invalid on 2021/12/19 15:10
upstream KCSAN: data-race in sctp_association_free / sctp_wait_for_connect (2) sctp 1 1319d 1319d 0/26 auto-closed as invalid on 2020/10/20 15:22
upstream KCSAN: data-race in sctp_association_free / sctp_wait_for_connect (8) sctp 1 299d 299d 0/26 auto-obsoleted due to no activity on 2023/08/06 09:15

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

write to 0xffff88812556e008 of 1 bytes by task 23873 on cpu 0:
 sctp_association_free+0x14c/0x590 net/sctp/associola.c:336
 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:944 [inline]
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1330 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1198 [inline]
 sctp_do_sm+0x2afc/0x31a0 net/sctp/sm_sideeffect.c:1169
 sctp_primitive_ABORT+0x75/0x90 net/sctp/primitive.c:104
 sctp_sendmsg_check_sflags+0x199/0x1d0 net/sctp/socket.c:1781
 sctp_sendmsg+0x12bd/0x1920 net/sctp/socket.c:2022
 inet_sendmsg+0xc5/0xd0 net/ipv4/af_inet.c:851
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x102/0x180 net/socket.c:745
 ____sys_sendmsg+0x312/0x410 net/socket.c:2584
 ___sys_sendmsg net/socket.c:2638 [inline]
 __sys_sendmmsg+0x269/0x500 net/socket.c:2724
 __do_sys_sendmmsg net/socket.c:2753 [inline]
 __se_sys_sendmmsg net/socket.c:2750 [inline]
 __x64_sys_sendmmsg+0x57/0x70 net/socket.c:2750
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x72/0x7a

read to 0xffff88812556e008 of 1 bytes by task 23863 on cpu 1:
 sctp_wait_for_connect+0x179/0x360 net/sctp/socket.c:9333
 __sctp_connect+0x723/0x7a0 net/sctp/socket.c:1247
 __sctp_setsockopt_connectx net/sctp/socket.c:1336 [inline]
 sctp_setsockopt_connectx+0xc5/0x120 net/sctp/socket.c:1363
 sctp_setsockopt+0x71c/0xea0 net/sctp/socket.c:4622
 sock_common_setsockopt+0x64/0x80 net/core/sock.c:3727
 do_sock_setsockopt net/socket.c:2311 [inline]
 __sys_setsockopt+0x1d8/0x250 net/socket.c:2334
 __do_sys_setsockopt net/socket.c:2343 [inline]
 __se_sys_setsockopt net/socket.c:2340 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2340
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x72/0x7a

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 23863 Comm: syz-executor.3 Tainted: G        W          6.9.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/08 21:40 upstream fec50db7033e 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sctp_association_free / sctp_wait_for_connect
2024/03/21 05:32 upstream dba89d1b81df 6753db5c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sctp_association_free / sctp_wait_for_connect
2024/02/17 15:05 upstream c1ca10ceffbb 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sctp_association_free / sctp_wait_for_connect
* Struck through repros no longer work on HEAD.