syzbot


KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj

Status: fixed on 2019/12/13 00:31
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+e3b35fe7918ff0ee474e@syzkaller.appspotmail.com
Fix commit: 312434617cb1 sctp: cache netns in sctp_ep_common
First crash: 1691d, last: 1656d
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 4.19 000/321] 4.19.88-stable review 352 (352) 2020/02/09 12:41
[PATCH 4.9 000/125] 4.9.206-stable review 133 (133) 2019/12/11 23:17
[PATCH 4.14 000/209] 4.14.158-stable review 223 (223) 2019/12/10 00:52
[PATCH 5.4 00/46] 5.4.2-stable review 58 (58) 2019/12/06 13:05
[PATCH 5.3 000/135] 5.3.15-stable review 140 (140) 2019/12/04 19:13
[PATCH net] sctp: cache netns in sctp_ep_common 3 (3) 2019/11/24 02:29
KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj 1 (2) 2019/11/18 15:34

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

write to 0xffff888124553020 of 8 bytes by task 9912 on cpu 1:
 sctp_assoc_migrate+0x1a6/0x290 net/sctp/associola.c:1091
 sctp_sock_migrate+0x959/0xa60 net/sctp/socket.c:9465
 sctp_accept+0x3c8/0x470 net/sctp/socket.c:4916
 inet_accept+0x7f/0x360 net/ipv4/af_inet.c:734
 __sys_accept4+0x224/0x430 net/socket.c:1754
 __do_sys_accept4 net/socket.c:1789 [inline]
 __se_sys_accept4 net/socket.c:1786 [inline]
 __x64_sys_accept4+0x5e/0x80 net/socket.c:1786
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888124553020 of 8 bytes by task 7647 on cpu 0:
 sctp_hash_obj+0x4f/0x2e0 net/sctp/input.c:900
 rht_key_get_hash include/linux/rhashtable.h:133 [inline]
 rht_key_hashfn include/linux/rhashtable.h:159 [inline]
 rht_head_hashfn include/linux/rhashtable.h:174 [inline]
 head_hashfn lib/rhashtable.c:41 [inline]
 rhashtable_rehash_one lib/rhashtable.c:245 [inline]
 rhashtable_rehash_chain lib/rhashtable.c:276 [inline]
 rhashtable_rehash_table lib/rhashtable.c:316 [inline]
 rht_deferred_worker+0x468/0xab0 lib/rhashtable.c:420
 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269
 worker_thread+0xa0/0x800 kernel/workqueue.c:2415
 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 7647 Comm: kworker/0:4 Not tainted 5.4.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events rht_deferred_worker
==================================================================

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/04 14:53 https://github.com/google/ktsan.git kcsan ef798c30ba4e b2088328 .config console log report ci2-upstream-kcsan-gce
2019/11/28 22:50 https://github.com/google/ktsan.git kcsan ef798c30ba4e 76357d6f .config console log report ci2-upstream-kcsan-gce
2019/11/23 14:16 https://github.com/google/ktsan.git kcsan 5863cc791e4c 598ca6c8 .config console log report ci2-upstream-kcsan-gce
2019/11/20 22:24 https://github.com/google/ktsan.git kcsan 5863cc791e4c 8098ea0f .config console log report ci2-upstream-kcsan-gce
2019/11/17 19:04 https://github.com/google/ktsan.git kcsan 5863cc791e4c d5696d51 .config console log report ci2-upstream-kcsan-gce
2019/11/16 06:00 https://github.com/google/ktsan.git kcsan 5863cc791e4c cdac920b .config console log report ci2-upstream-kcsan-gce
2019/11/12 07:18 https://github.com/google/ktsan.git kcsan 94c006602e13 377d77fa .config console log report ci2-upstream-kcsan-gce
2019/11/09 00:34 https://github.com/google/ktsan.git kcsan 94c006602e13 1e35461e .config console log report ci2-upstream-kcsan-gce
2019/11/07 23:38 https://github.com/google/ktsan.git kcsan 94c006602e13 f39aff9e .config console log report ci2-upstream-kcsan-gce
2019/11/05 05:39 https://github.com/google/ktsan.git kcsan 94c006602e13 76630fc9 .config console log report ci2-upstream-kcsan-gce
2019/11/04 15:37 https://github.com/google/ktsan.git kcsan 94c006602e13 18e12644 .config console log report ci2-upstream-kcsan-gce
2019/10/30 22:20 https://github.com/google/ktsan.git kcsan 05f2236801fe a41ca8fa .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.