linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj
@ 2019-11-07 18:55 syzbot
  2019-11-18 15:34 ` Xin Long
  0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2019-11-07 18:55 UTC (permalink / raw)
  To: davem, elver, linux-kernel, linux-sctp, marcelo.leitner, netdev,
	nhorman, syzkaller-bugs, vyasevich

Hello,

syzbot found the following crash on:

HEAD commit:    05f22368 x86, kcsan: Enable KCSAN for x86
git tree:       https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=1046796ce00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=87d111955f40591f
dashboard link: https://syzkaller.appspot.com/bug?extid=e3b35fe7918ff0ee474e
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+e3b35fe7918ff0ee474e@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj

write to 0xffff8880b67c0020 of 8 bytes by task 18908 on cpu 1:
  sctp_assoc_migrate+0x1a6/0x290 net/sctp/associola.c:1091
  sctp_sock_migrate+0x8aa/0x9b0 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_accept net/socket.c:1795 [inline]
  __se_sys_accept net/socket.c:1792 [inline]
  __x64_sys_accept+0x4e/0x60 net/socket.c:1792
  do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
  entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880b67c0020 of 8 bytes by task 12003 on cpu 0:
  sctp_hash_obj+0x4f/0x2d0 net/sctp/input.c:894
  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: 12003 Comm: kworker/0:6 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Workqueue: events rht_deferred_worker
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj
  2019-11-07 18:55 KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj syzbot
@ 2019-11-18 15:34 ` Xin Long
  0 siblings, 0 replies; 2+ messages in thread
From: Xin Long @ 2019-11-18 15:34 UTC (permalink / raw)
  To: syzbot
  Cc: davem, elver, LKML, linux-sctp, Marcelo Ricardo Leitner,
	network dev, Neil Horman, syzkaller-bugs, Vlad Yasevich

On Fri, Nov 8, 2019 at 2:56 AM syzbot
<syzbot+e3b35fe7918ff0ee474e@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:    05f22368 x86, kcsan: Enable KCSAN for x86
> git tree:       https://github.com/google/ktsan.git kcsan
> console output: https://syzkaller.appspot.com/x/log.txt?x=1046796ce00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=87d111955f40591f
> dashboard link: https://syzkaller.appspot.com/bug?extid=e3b35fe7918ff0ee474e
> compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
>
> Unfortunately, I don't have any reproducer for this crash yet.
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+e3b35fe7918ff0ee474e@syzkaller.appspotmail.com
>
> ==================================================================
> BUG: KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj
looks we need a better way to get netns in sctp_hash_obj(),
I believe in sctp_hash_cmp(), too.

>
> write to 0xffff8880b67c0020 of 8 bytes by task 18908 on cpu 1:
>   sctp_assoc_migrate+0x1a6/0x290 net/sctp/associola.c:1091
>   sctp_sock_migrate+0x8aa/0x9b0 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_accept net/socket.c:1795 [inline]
>   __se_sys_accept net/socket.c:1792 [inline]
>   __x64_sys_accept+0x4e/0x60 net/socket.c:1792
>   do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
>   entry_SYSCALL_64_after_hwframe+0x44/0xa9
>
> read to 0xffff8880b67c0020 of 8 bytes by task 12003 on cpu 0:
>   sctp_hash_obj+0x4f/0x2d0 net/sctp/input.c:894
>   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: 12003 Comm: kworker/0:6 Not tainted 5.4.0-rc3+ #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
> Google 01/01/2011
> Workqueue: events rht_deferred_worker
> ==================================================================
>
>
> ---
> This bug is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@googlegroups.com.
>
> syzbot will keep track of this bug report. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-18 15:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07 18:55 KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj syzbot
2019-11-18 15:34 ` Xin Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).