BPF Archive on lore.kernel.org
 help / color / Atom feed
* [syzbot] WARNING: suspicious RCU usage in tcp_bpf_update_proto
@ 2021-04-05 22:05 syzbot
  2021-04-06 17:58 ` Cong Wang
  2021-04-06 18:21 ` John Fastabend
  0 siblings, 2 replies; 3+ messages in thread
From: syzbot @ 2021-04-05 22:05 UTC (permalink / raw)
  To: akpm, andrii, anton, ast, bp, bpf, daniel, davem, hpa, jakub,
	jmattson, john.fastabend, joro, kafai, kpsingh, kuba, kvm,
	linux-kernel, lmb, mingo, netdev, pbonzini, rkovhaev, seanjc,
	songliubraving, syzkaller-bugs, tglx, torvalds, vkuznets,
	wanpengli, x86, yhs

Hello,

syzbot found the following issue on:

HEAD commit:    514e1150 net: x25: Queue received packets in the drivers i..
git tree:       net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=112a8831d00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=7eff0f22b8563a5f
dashboard link: https://syzkaller.appspot.com/bug?extid=320a3bc8d80f478c37e4
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1532d711d00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15f44c5ed00000

The issue was bisected to:

commit 4dfe6bd94959222e18d512bdf15f6bf9edb9c27c
Author: Rustam Kovhaev <rkovhaev@gmail.com>
Date:   Wed Feb 24 20:00:30 2021 +0000

    ntfs: check for valid standard information attribute

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=16207a81d00000
final oops:     https://syzkaller.appspot.com/x/report.txt?x=15207a81d00000
console output: https://syzkaller.appspot.com/x/log.txt?x=11207a81d00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+320a3bc8d80f478c37e4@syzkaller.appspotmail.com
Fixes: 4dfe6bd94959 ("ntfs: check for valid standard information attribute")

=============================
WARNING: suspicious RCU usage
5.12.0-rc4-syzkaller #0 Not tainted
-----------------------------
include/linux/skmsg.h:286 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
1 lock held by syz-executor383/8454:
 #0: ffff888013a99b48 (clock-AF_INET){++..}-{2:2}, at: sk_psock_drop+0x2c/0x460 net/core/skmsg.c:788

stack backtrace:
CPU: 1 PID: 8454 Comm: syz-executor383 Not tainted 5.12.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x141/0x1d7 lib/dump_stack.c:120
 sk_psock include/linux/skmsg.h:286 [inline]
 tcp_bpf_update_proto+0x530/0x5f0 net/ipv4/tcp_bpf.c:504
 sk_psock_restore_proto include/linux/skmsg.h:408 [inline]
 sk_psock_drop+0xdf/0x460 net/core/skmsg.c:789
 sk_psock_put include/linux/skmsg.h:446 [inline]
 tcp_bpf_recvmsg+0x42d/0x480 net/ipv4/tcp_bpf.c:208
 inet_recvmsg+0x11b/0x5d0 net/ipv4/af_inet.c:852
 sock_recvmsg_nosec net/socket.c:888 [inline]
 sock_recvmsg net/socket.c:906 [inline]
 sock_recvmsg net/socket.c:902 [inline]
 ____sys_recvmsg+0x2c4/0x600 net/socket.c:2569
 ___sys_recvmsg+0x127/0x200 net/socket.c:2611
 do_recvmmsg+0x24d/0x6d0 net/socket.c:2705
 __sys_recvmmsg net/socket.c:2784 [inline]
 __do_sys_recvmmsg net/socket.c:2807 [inline]
 __se_sys_recvmmsg net/socket.c:2800 [inline]
 __x64_sys_recvmmsg+0x20b/0x260 net/socket.c:2800
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4468e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f010b0cc318 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00000000004cb4e8 RCX: 00000000004468e9
RDX: 0000000000000422 RSI: 0000000020000540 RDI: 0000000000000004
RBP: 00000000004cb4e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000049b270
R13: 00007ffe3829a5bf R14: 00007f010b0cc400 R15: 0000000000022000


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

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

* Re: [syzbot] WARNING: suspicious RCU usage in tcp_bpf_update_proto
  2021-04-05 22:05 [syzbot] WARNING: suspicious RCU usage in tcp_bpf_update_proto syzbot
@ 2021-04-06 17:58 ` Cong Wang
  2021-04-06 18:21 ` John Fastabend
  1 sibling, 0 replies; 3+ messages in thread
From: Cong Wang @ 2021-04-06 17:58 UTC (permalink / raw)
  To: syzbot
  Cc: Andrew Morton, Andrii Nakryiko, anton, Alexei Starovoitov,
	Borislav Petkov, bpf, Daniel Borkmann, David Miller,
	H. Peter Anvin, Jakub Sitnicki, jmattson, John Fastabend,
	Joerg Roedel, Martin KaFai Lau, kpsingh, Jakub Kicinski,
	kvm@vger.kernel.org list, LKML, Lorenz Bauer, Ingo Molnar,
	Linux Kernel Network Developers, pbonzini, rkovhaev, seanjc,
	Song Liu, syzkaller-bugs, Thomas Gleixner, Linus Torvalds,
	vkuznets, wanpengli, x86, Yonghong Song

On Tue, Apr 6, 2021 at 2:44 AM syzbot
<syzbot+320a3bc8d80f478c37e4@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:    514e1150 net: x25: Queue received packets in the drivers i..
> git tree:       net-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=112a8831d00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=7eff0f22b8563a5f
> dashboard link: https://syzkaller.appspot.com/bug?extid=320a3bc8d80f478c37e4
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1532d711d00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15f44c5ed00000
>
> The issue was bisected to:
>
> commit 4dfe6bd94959222e18d512bdf15f6bf9edb9c27c
> Author: Rustam Kovhaev <rkovhaev@gmail.com>
> Date:   Wed Feb 24 20:00:30 2021 +0000
>
>     ntfs: check for valid standard information attribute

This is caused by one of my sockmap patches.

>
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=16207a81d00000
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=15207a81d00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=11207a81d00000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+320a3bc8d80f478c37e4@syzkaller.appspotmail.com
> Fixes: 4dfe6bd94959 ("ntfs: check for valid standard information attribute")
>
> =============================
> WARNING: suspicious RCU usage
> 5.12.0-rc4-syzkaller #0 Not tainted
> -----------------------------
> include/linux/skmsg.h:286 suspicious rcu_dereference_check() usage!
>
> other info that might help us debug this:
>
>
> rcu_scheduler_active = 2, debug_locks = 1
> 1 lock held by syz-executor383/8454:
>  #0: ffff888013a99b48 (clock-AF_INET){++..}-{2:2}, at: sk_psock_drop+0x2c/0x460 net/core/skmsg.c:788
>
> stack backtrace:
> CPU: 1 PID: 8454 Comm: syz-executor383 Not tainted 5.12.0-rc4-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Call Trace:
>  __dump_stack lib/dump_stack.c:79 [inline]
>  dump_stack+0x141/0x1d7 lib/dump_stack.c:120
>  sk_psock include/linux/skmsg.h:286 [inline]
>  tcp_bpf_update_proto+0x530/0x5f0 net/ipv4/tcp_bpf.c:504
>  sk_psock_restore_proto include/linux/skmsg.h:408 [inline]
>  sk_psock_drop+0xdf/0x460 net/core/skmsg.c:789
>  sk_psock_put include/linux/skmsg.h:446 [inline]
>  tcp_bpf_recvmsg+0x42d/0x480 net/ipv4/tcp_bpf.c:208
>  inet_recvmsg+0x11b/0x5d0 net/ipv4/af_inet.c:852

Oddly, I have all relevant Kconfig enabled but never see this
warning when running selftests for hours....

Anyway, let me see how this should be fixed.

Thanks!

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

* RE: [syzbot] WARNING: suspicious RCU usage in tcp_bpf_update_proto
  2021-04-05 22:05 [syzbot] WARNING: suspicious RCU usage in tcp_bpf_update_proto syzbot
  2021-04-06 17:58 ` Cong Wang
@ 2021-04-06 18:21 ` John Fastabend
  1 sibling, 0 replies; 3+ messages in thread
From: John Fastabend @ 2021-04-06 18:21 UTC (permalink / raw)
  To: syzbot, akpm, andrii, anton, ast, bp, bpf, daniel, davem, hpa,
	jakub, jmattson, john.fastabend, joro, kafai, kpsingh, kuba, kvm,
	linux-kernel, lmb, mingo, netdev, pbonzini, rkovhaev, seanjc,
	songliubraving, syzkaller-bugs, tglx, torvalds, vkuznets,
	wanpengli, x86, yhs

syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    514e1150 net: x25: Queue received packets in the drivers i..
> git tree:       net-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=112a8831d00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=7eff0f22b8563a5f
> dashboard link: https://syzkaller.appspot.com/bug?extid=320a3bc8d80f478c37e4
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1532d711d00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15f44c5ed00000
> 
> The issue was bisected to:
> 
> commit 4dfe6bd94959222e18d512bdf15f6bf9edb9c27c
> Author: Rustam Kovhaev <rkovhaev@gmail.com>
> Date:   Wed Feb 24 20:00:30 2021 +0000
> 
>     ntfs: check for valid standard information attribute
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=16207a81d00000
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=15207a81d00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=11207a81d00000
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+320a3bc8d80f478c37e4@syzkaller.appspotmail.com
> Fixes: 4dfe6bd94959 ("ntfs: check for valid standard information attribute")
> 
> =============================
> WARNING: suspicious RCU usage
> 5.12.0-rc4-syzkaller #0 Not tainted
> -----------------------------
> include/linux/skmsg.h:286 suspicious rcu_dereference_check() usage!
> 
> other info that might help us debug this:
> 
> 
> rcu_scheduler_active = 2, debug_locks = 1
> 1 lock held by syz-executor383/8454:
>  #0: ffff888013a99b48 (clock-AF_INET){++..}-{2:2}, at: sk_psock_drop+0x2c/0x460 net/core/skmsg.c:788
> 
> stack backtrace:
> CPU: 1 PID: 8454 Comm: syz-executor383 Not tainted 5.12.0-rc4-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Call Trace:
>  __dump_stack lib/dump_stack.c:79 [inline]
>  dump_stack+0x141/0x1d7 lib/dump_stack.c:120
>  sk_psock include/linux/skmsg.h:286 [inline]
>  tcp_bpf_update_proto+0x530/0x5f0 net/ipv4/tcp_bpf.c:504
>  sk_psock_restore_proto include/linux/skmsg.h:408 [inline]
>  sk_psock_drop+0xdf/0x460 net/core/skmsg.c:789
>  sk_psock_put include/linux/skmsg.h:446 [inline]
>  tcp_bpf_recvmsg+0x42d/0x480 net/ipv4/tcp_bpf.c:208


The bisection is bogus, but we will get a fix for this ASAP. The real commit
is,

commit 8a59f9d1e3d4340659fdfee8879dc09a6f2546e1
Author: Cong Wang <cong.wang@bytedance.com>
Date:   Tue Mar 30 19:32:31 2021 -0700

    sock: Introduce sk->sk_prot->psock_update_sk_prot()

Thanks,
John

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 22:05 [syzbot] WARNING: suspicious RCU usage in tcp_bpf_update_proto syzbot
2021-04-06 17:58 ` Cong Wang
2021-04-06 18:21 ` John Fastabend

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git