netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [syzbot] [bpf?] WARNING in dev_xdp_install
       [not found] <67e6b3e8.050a0220.2f068f.0079.GAE@google.com>
@ 2025-03-28 23:26 ` Stanislav Fomichev
  2025-03-28 23:26   ` syzbot
  2025-04-02 17:00 ` syzbot
  1 sibling, 1 reply; 3+ messages in thread
From: Stanislav Fomichev @ 2025-03-28 23:26 UTC (permalink / raw)
  To: syzbot
  Cc: andrii, ast, bpf, netdev, kuba, daniel, eddyz87, haoluo,
	john.fastabend, jolsa, kpsingh, linux-kernel, martin.lau, sdf,
	song, syzkaller-bugs, yonghong.song

On 03/28, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    1a9239bb4253 Merge tag 'net-next-6.15' of git://git.kernel..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=17989bb0580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=d48017cf0c2458bf
> dashboard link: https://syzkaller.appspot.com/bug?extid=08936936fe8132f91f1a
> compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> 
> Unfortunately, I don't have any reproducer for this issue yet.
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/0795c9a2c8ce/disk-1a9239bb.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/dfe4e652ed32/vmlinux-1a9239bb.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/34deb7756b26/bzImage-1a9239bb.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+08936936fe8132f91f1a@syzkaller.appspotmail.com
> 
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 8456 at ./include/net/netdev_lock.h:54 netdev_ops_assert_locked include/net/netdev_lock.h:54 [inline]
> WARNING: CPU: 1 PID: 8456 at ./include/net/netdev_lock.h:54 dev_xdp_install+0x610/0x9b0 net/core/dev.c:9911
> Modules linked in:
> CPU: 1 UID: 0 PID: 8456 Comm: syz.5.847 Not tainted 6.14.0-syzkaller-05877-g1a9239bb4253 #0 PREEMPT(full) 
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
> RIP: 0010:netdev_ops_assert_locked include/net/netdev_lock.h:54 [inline]
> RIP: 0010:dev_xdp_install+0x610/0x9b0 net/core/dev.c:9911
> Code: 8d bc 24 28 0d 00 00 be ff ff ff ff e8 69 c5 26 02 31 ff 89 c5 89 c6 e8 0e af 81 f8 85 ed 0f 85 59 fb ff ff e8 d1 b3 81 f8 90 <0f> 0b 90 e9 4b fb ff ff e8 c3 b3 81 f8 49 8d bc 24 28 0d 00 00 be
> RSP: 0018:ffffc9001f13f950 EFLAGS: 00010287
> RAX: 000000000000023c RBX: ffff888059e8ccbd RCX: ffffc9000da1b000
> RDX: 0000000000080000 RSI: ffffffff89395ebf RDI: 0000000000000005
> RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000000 R12: ffff888059e8c000
> R13: ffffffff870484d0 R14: ffffc9000ec3f000 R15: 0000000000000001
> FS:  00007f6e99bf66c0(0000) GS:ffff888124b41000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000000110c2f3eb0 CR3: 000000007f4ec000 CR4: 0000000000350ef0
> Call Trace:
>  <TASK>
>  dev_xdp_attach+0x6d1/0x16a0 net/core/dev.c:10094
>  dev_xdp_attach_link net/core/dev.c:10113 [inline]
>  bpf_xdp_link_attach+0x2c5/0x680 net/core/dev.c:10287
>  link_create kernel/bpf/syscall.c:5379 [inline]
>  __sys_bpf+0x1bc7/0x4c80 kernel/bpf/syscall.c:5865
>  __do_sys_bpf kernel/bpf/syscall.c:5902 [inline]
>  __se_sys_bpf kernel/bpf/syscall.c:5900 [inline]
>  __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5900
>  do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
>  do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
> RIP: 0033:0x7f6e9bd8d169

#syz test

diff --git a/net/core/dev.c b/net/core/dev.c
index 87cba93fa59f..534eda336f8d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -10336,7 +10336,9 @@ int bpf_xdp_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
 		goto unlock;
 	}
 
+	netdev_lock_ops(dev);
 	err = dev_xdp_attach_link(dev, &extack, link);
+	netdev_unlock_ops(dev);
 	rtnl_unlock();
 
 	if (err) {

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

* Re: [syzbot] [bpf?] WARNING in dev_xdp_install
  2025-03-28 23:26 ` [syzbot] [bpf?] WARNING in dev_xdp_install Stanislav Fomichev
@ 2025-03-28 23:26   ` syzbot
  0 siblings, 0 replies; 3+ messages in thread
From: syzbot @ 2025-03-28 23:26 UTC (permalink / raw)
  To: stfomichev
  Cc: andrii, ast, bpf, daniel, eddyz87, haoluo, john.fastabend, jolsa,
	kpsingh, kuba, linux-kernel, martin.lau, netdev, sdf, song,
	stfomichev, syzkaller-bugs, yonghong.song

> On 03/28, syzbot wrote:
>> Hello,
>> 
>> syzbot found the following issue on:
>> 
>> HEAD commit:    1a9239bb4253 Merge tag 'net-next-6.15' of git://git.kernel..
>> git tree:       upstream
>> console output: https://syzkaller.appspot.com/x/log.txt?x=17989bb0580000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=d48017cf0c2458bf
>> dashboard link: https://syzkaller.appspot.com/bug?extid=08936936fe8132f91f1a
>> compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
>> 
>> Unfortunately, I don't have any reproducer for this issue yet.
>> 
>> Downloadable assets:
>> disk image: https://storage.googleapis.com/syzbot-assets/0795c9a2c8ce/disk-1a9239bb.raw.xz
>> vmlinux: https://storage.googleapis.com/syzbot-assets/dfe4e652ed32/vmlinux-1a9239bb.xz
>> kernel image: https://storage.googleapis.com/syzbot-assets/34deb7756b26/bzImage-1a9239bb.xz
>> 
>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> Reported-by: syzbot+08936936fe8132f91f1a@syzkaller.appspotmail.com
>> 
>> ------------[ cut here ]------------
>> WARNING: CPU: 1 PID: 8456 at ./include/net/netdev_lock.h:54 netdev_ops_assert_locked include/net/netdev_lock.h:54 [inline]
>> WARNING: CPU: 1 PID: 8456 at ./include/net/netdev_lock.h:54 dev_xdp_install+0x610/0x9b0 net/core/dev.c:9911
>> Modules linked in:
>> CPU: 1 UID: 0 PID: 8456 Comm: syz.5.847 Not tainted 6.14.0-syzkaller-05877-g1a9239bb4253 #0 PREEMPT(full) 
>> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
>> RIP: 0010:netdev_ops_assert_locked include/net/netdev_lock.h:54 [inline]
>> RIP: 0010:dev_xdp_install+0x610/0x9b0 net/core/dev.c:9911
>> Code: 8d bc 24 28 0d 00 00 be ff ff ff ff e8 69 c5 26 02 31 ff 89 c5 89 c6 e8 0e af 81 f8 85 ed 0f 85 59 fb ff ff e8 d1 b3 81 f8 90 <0f> 0b 90 e9 4b fb ff ff e8 c3 b3 81 f8 49 8d bc 24 28 0d 00 00 be
>> RSP: 0018:ffffc9001f13f950 EFLAGS: 00010287
>> RAX: 000000000000023c RBX: ffff888059e8ccbd RCX: ffffc9000da1b000
>> RDX: 0000000000080000 RSI: ffffffff89395ebf RDI: 0000000000000005
>> RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
>> R10: 0000000000000000 R11: 0000000000000000 R12: ffff888059e8c000
>> R13: ffffffff870484d0 R14: ffffc9000ec3f000 R15: 0000000000000001
>> FS:  00007f6e99bf66c0(0000) GS:ffff888124b41000(0000) knlGS:0000000000000000
>> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>> CR2: 000000110c2f3eb0 CR3: 000000007f4ec000 CR4: 0000000000350ef0
>> Call Trace:
>>  <TASK>
>>  dev_xdp_attach+0x6d1/0x16a0 net/core/dev.c:10094
>>  dev_xdp_attach_link net/core/dev.c:10113 [inline]
>>  bpf_xdp_link_attach+0x2c5/0x680 net/core/dev.c:10287
>>  link_create kernel/bpf/syscall.c:5379 [inline]
>>  __sys_bpf+0x1bc7/0x4c80 kernel/bpf/syscall.c:5865
>>  __do_sys_bpf kernel/bpf/syscall.c:5902 [inline]
>>  __se_sys_bpf kernel/bpf/syscall.c:5900 [inline]
>>  __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5900
>>  do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
>>  do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
>>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
>> RIP: 0033:0x7f6e9bd8d169
>
> #syz test

This crash does not have a reproducer. I cannot test it.

>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 87cba93fa59f..534eda336f8d 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -10336,7 +10336,9 @@ int bpf_xdp_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
>  		goto unlock;
>  	}
>  
> +	netdev_lock_ops(dev);
>  	err = dev_xdp_attach_link(dev, &extack, link);
> +	netdev_unlock_ops(dev);
>  	rtnl_unlock();
>  
>  	if (err) {

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

* Re: [syzbot] [bpf?] WARNING in dev_xdp_install
       [not found] <67e6b3e8.050a0220.2f068f.0079.GAE@google.com>
  2025-03-28 23:26 ` [syzbot] [bpf?] WARNING in dev_xdp_install Stanislav Fomichev
@ 2025-04-02 17:00 ` syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2025-04-02 17:00 UTC (permalink / raw)
  To: alexei.starovoitov, andrii, ast, bpf, daniel, davem, eddyz87,
	edumazet, haoluo, hawk, horms, john.fastabend, jolsa, kpsingh,
	kuba, linux-kernel, martin.lau, netdev, pabeni, sdf, song,
	stfomichev, syzkaller-bugs, yhs, yonghong.song

syzbot has found a reproducer for the following issue on:

HEAD commit:    acc4d5ff0b61 Merge tag 'net-6.15-rc0' of git://git.kernel...
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=124f9404580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=410c49aba9aeb859
dashboard link: https://syzkaller.appspot.com/bug?extid=08936936fe8132f91f1a
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=109b7c3f980000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=103fa178580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-acc4d5ff.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/aad60517b1c2/vmlinux-acc4d5ff.xz
kernel image: https://storage.googleapis.com/syzbot-assets/27bf64833684/bzImage-acc4d5ff.xz

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

------------[ cut here ]------------
WARNING: CPU: 3 PID: 5936 at ./include/net/netdev_lock.h:54 netdev_ops_assert_locked include/net/netdev_lock.h:54 [inline]
WARNING: CPU: 3 PID: 5936 at ./include/net/netdev_lock.h:54 dev_xdp_install+0x610/0x9b0 net/core/dev.c:9911
Modules linked in:
CPU: 3 UID: 0 PID: 5936 Comm: syz-executor652 Not tainted 6.14.0-syzkaller-12456-gacc4d5ff0b61 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:netdev_ops_assert_locked include/net/netdev_lock.h:54 [inline]
RIP: 0010:dev_xdp_install+0x610/0x9b0 net/core/dev.c:9911
Code: 8d bc 24 30 0d 00 00 be ff ff ff ff e8 b9 0d 28 02 31 ff 89 c5 89 c6 e8 4e f4 71 f8 85 ed 0f 85 59 fb ff ff e8 01 f9 71 f8 90 <0f> 0b 90 e9 4b fb ff ff e8 f3 f8 71 f8 49 8d bc 24 30 0d 00 00 be
RSP: 0018:ffffc900031d7950 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88802ab20cc5 RCX: ffffffff89494752
RDX: ffff88802a4b2440 RSI: ffffffff8949475f RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88802ab20000
R13: ffffffff87119240 R14: ffffc90000a26000 R15: 0000000000000002
FS:  0000555586ae1380(0000) GS:ffff8880d6cbb000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000140 CR3: 0000000030ae2000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 dev_xdp_attach+0x6d1/0x16a0 net/core/dev.c:10094
 dev_xdp_attach_link net/core/dev.c:10113 [inline]
 bpf_xdp_link_attach+0x2c5/0x680 net/core/dev.c:10287
 link_create kernel/bpf/syscall.c:5418 [inline]
 __sys_bpf+0x19ef/0x4d80 kernel/bpf/syscall.c:5904
 __do_sys_bpf kernel/bpf/syscall.c:5941 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5939 [inline]
 __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5939
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa71b995919
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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:00007ffc061aef48 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa71b995919
RDX: 0000000000000040 RSI: 0000200000000200 RDI: 000000000000001c
RBP: 0000000000000000 R08: 0000555500000000 R09: 0000555500000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000003
 </TASK>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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

end of thread, other threads:[~2025-04-02 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <67e6b3e8.050a0220.2f068f.0079.GAE@google.com>
2025-03-28 23:26 ` [syzbot] [bpf?] WARNING in dev_xdp_install Stanislav Fomichev
2025-03-28 23:26   ` syzbot
2025-04-02 17:00 ` syzbot

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).