[syzbot] [net?] WARNING in gre_tap_xmit (2)

19 views
Skip to first unread message

syzbot

unread,
Apr 19, 2024, 5:39:22 AM (13 days ago) Apr 19
to da...@davemloft.net, dsa...@kernel.org, edum...@google.com, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 443574b03387 riscv, bpf: Fix kfunc parameters incompatibil..
git tree: bpf
console output: https://syzkaller.appspot.com/x/log.txt?x=165886c3180000
kernel config: https://syzkaller.appspot.com/x/.config?x=6fb1be60a193d440
dashboard link: https://syzkaller.appspot.com/bug?extid=c298c9f0e46a3c86332b
compiler: Debian clang version 15.0.6, 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/3f355021a085/disk-443574b0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/44cf4de7472a/vmlinux-443574b0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a99a36c7ad65/bzImage-443574b0.xz

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

------------[ cut here ]------------
WARNING: CPU: 0 PID: 13407 at include/linux/skbuff.h:2740 pskb_may_pull_reason include/linux/skbuff.h:2740 [inline]
WARNING: CPU: 0 PID: 13407 at include/linux/skbuff.h:2740 pskb_may_pull include/linux/skbuff.h:2756 [inline]
WARNING: CPU: 0 PID: 13407 at include/linux/skbuff.h:2740 pskb_network_may_pull include/linux/skbuff.h:3077 [inline]
WARNING: CPU: 0 PID: 13407 at include/linux/skbuff.h:2740 pskb_inet_may_pull include/net/ip_tunnels.h:361 [inline]
WARNING: CPU: 0 PID: 13407 at include/linux/skbuff.h:2740 gre_tap_xmit+0x4ff/0x6e0 net/ipv4/ip_gre.c:734
Modules linked in:
CPU: 0 PID: 13407 Comm: syz-executor.1 Not tainted 6.8.0-syzkaller-05236-g443574b03387 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:pskb_may_pull_reason include/linux/skbuff.h:2740 [inline]
RIP: 0010:pskb_may_pull include/linux/skbuff.h:2756 [inline]
RIP: 0010:pskb_network_may_pull include/linux/skbuff.h:3077 [inline]
RIP: 0010:pskb_inet_may_pull include/net/ip_tunnels.h:361 [inline]
RIP: 0010:gre_tap_xmit+0x4ff/0x6e0 net/ipv4/ip_gre.c:734
Code: 00 4c 89 ef 48 89 ee 48 89 da e8 7c 8f fb ff 31 c0 48 83 c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 62 55 9d f7 90 <0f> 0b 90 e9 09 fc ff ff 44 89 e7 89 ee e8 0f 57 9d f7 41 39 ec 0f
RSP: 0018:ffffc90004b66e00 EFLAGS: 00010287
RAX: ffffffff89f79b0e RBX: ffff888061667718 RCX: 0000000000040000
RDX: ffffc9000c375000 RSI: 00000000000124e0 RDI: 00000000000124e1
RBP: 00000000ffffffb6 R08: ffffffff89f79712 R09: 1ffffffff1f0d5cd
R10: dffffc0000000000 R11: ffffffff89f79610 R12: 0000000000000000
R13: ffff888061667640 R14: ffff888062b64000 R15: dffffc0000000000
FS: 00007f08d29ff6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020010000 CR3: 0000000061678000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
<TASK>
__netdev_start_xmit include/linux/netdevice.h:4903 [inline]
netdev_start_xmit include/linux/netdevice.h:4917 [inline]
xmit_one net/core/dev.c:3531 [inline]
dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
sch_direct_xmit+0x2b6/0x5f0 net/sched/sch_generic.c:343
__dev_xmit_skb net/core/dev.c:3760 [inline]
__dev_queue_xmit+0x1912/0x3b10 net/core/dev.c:4301
bond_start_xmit+0x1389/0x1c40 drivers/net/bonding/bond_main.c:5469
__netdev_start_xmit include/linux/netdevice.h:4903 [inline]
netdev_start_xmit include/linux/netdevice.h:4917 [inline]
xmit_one net/core/dev.c:3531 [inline]
dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
__dev_queue_xmit+0x19f4/0x3b10 net/core/dev.c:4335
packet_snd net/packet/af_packet.c:3083 [inline]
packet_sendmsg+0x4932/0x63d0 net/packet/af_packet.c:3115
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:745
____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
___sys_sendmsg net/socket.c:2638 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f08d2e7dea9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f08d29ff0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f08d2fabf80 RCX: 00007f08d2e7dea9
RDX: 00000000200400c4 RSI: 0000000020000180 RDI: 0000000000000006
RBP: 00007f08d2eca4a4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f08d2fabf80 R15: 00007ffcba0da4f8
</TASK>


---
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 syzk...@googlegroups.com.

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

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

Eric Dumazet

unread,
Apr 19, 2024, 6:10:59 AM (13 days ago) Apr 19
to syzbot, Kuniyuki Iwashima, da...@davemloft.net, dsa...@kernel.org, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzkall...@googlegroups.com
Kuniyuki , this is another manifestation of NSH bug, thanks !

syzbot

unread,
Apr 19, 2024, 6:24:34 AM (13 days ago) Apr 19
to da...@davemloft.net, dsa...@kernel.org, edum...@google.com, ku...@kernel.org, kun...@amazon.com, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzkall...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 443574b03387 riscv, bpf: Fix kfunc parameters incompatibil..
git tree: bpf
console+strace: https://syzkaller.appspot.com/x/log.txt?x=149a7ec3180000
kernel config: https://syzkaller.appspot.com/x/.config?x=6fb1be60a193d440
dashboard link: https://syzkaller.appspot.com/bug?extid=c298c9f0e46a3c86332b
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14a94f00980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15bce6ab180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3f355021a085/disk-443574b0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/44cf4de7472a/vmlinux-443574b0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a99a36c7ad65/bzImage-443574b0.xz

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

------------[ cut here ]------------
WARNING: CPU: 0 PID: 5076 at include/linux/skbuff.h:2740 pskb_may_pull_reason include/linux/skbuff.h:2740 [inline]
WARNING: CPU: 0 PID: 5076 at include/linux/skbuff.h:2740 pskb_may_pull include/linux/skbuff.h:2756 [inline]
WARNING: CPU: 0 PID: 5076 at include/linux/skbuff.h:2740 pskb_network_may_pull include/linux/skbuff.h:3077 [inline]
WARNING: CPU: 0 PID: 5076 at include/linux/skbuff.h:2740 pskb_inet_may_pull include/net/ip_tunnels.h:361 [inline]
WARNING: CPU: 0 PID: 5076 at include/linux/skbuff.h:2740 gre_tap_xmit+0x4ff/0x6e0 net/ipv4/ip_gre.c:734
Modules linked in:
CPU: 0 PID: 5076 Comm: syz-executor172 Not tainted 6.8.0-syzkaller-05236-g443574b03387 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:pskb_may_pull_reason include/linux/skbuff.h:2740 [inline]
RIP: 0010:pskb_may_pull include/linux/skbuff.h:2756 [inline]
RIP: 0010:pskb_network_may_pull include/linux/skbuff.h:3077 [inline]
RIP: 0010:pskb_inet_may_pull include/net/ip_tunnels.h:361 [inline]
RIP: 0010:gre_tap_xmit+0x4ff/0x6e0 net/ipv4/ip_gre.c:734
Code: 00 4c 89 ef 48 89 ee 48 89 da e8 7c 8f fb ff 31 c0 48 83 c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 62 55 9d f7 90 <0f> 0b 90 e9 09 fc ff ff 44 89 e7 89 ee e8 0f 57 9d f7 41 39 ec 0f
RSP: 0018:ffffc9000391ee00 EFLAGS: 00010293
RAX: ffffffff89f79b0e RBX: ffff88802e638498 RCX: ffff88802ee90000
RDX: 0000000000000000 RSI: 00000000ffffffb6 RDI: 0000000000000000
RBP: 00000000ffffffb6 R08: ffffffff89f79712 R09: 1ffffffff1f0d5cd
R10: dffffc0000000000 R11: ffffffff89f79610 R12: 0000000000000000
R13: ffff88802e6383c0 R14: ffff88807ade6000 R15: dffffc0000000000
FS: 0000555593010380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020010000 CR3: 0000000023c50000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__netdev_start_xmit include/linux/netdevice.h:4903 [inline]
netdev_start_xmit include/linux/netdevice.h:4917 [inline]
xmit_one net/core/dev.c:3531 [inline]
dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
sch_direct_xmit+0x2b6/0x5f0 net/sched/sch_generic.c:343
__dev_xmit_skb net/core/dev.c:3760 [inline]
__dev_queue_xmit+0x1912/0x3b10 net/core/dev.c:4301
bond_start_xmit+0x1389/0x1c40 drivers/net/bonding/bond_main.c:5469
__netdev_start_xmit include/linux/netdevice.h:4903 [inline]
netdev_start_xmit include/linux/netdevice.h:4917 [inline]
xmit_one net/core/dev.c:3531 [inline]
dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
__dev_queue_xmit+0x19f4/0x3b10 net/core/dev.c:4335
packet_snd net/packet/af_packet.c:3083 [inline]
packet_sendmsg+0x4932/0x63d0 net/packet/af_packet.c:3115
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:745
____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
___sys_sendmsg net/socket.c:2638 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7fc685c982d9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 19 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:00007ffc6536ad28 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc685c982d9
RDX: 00000000200400c4 RSI: 0000000020000180 RDI: 0000000000000003
RBP: 00007ffc6536ad60 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000f4240
R13: 000000000001066e R14: 00007ffc6536ad44 R15: 00007ffc6536ad50
</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.

Kuniyuki Iwashima

unread,
Apr 19, 2024, 1:23:17 PM (13 days ago) Apr 19
to edum...@google.com, da...@davemloft.net, dsa...@kernel.org, ku...@kernel.org, kun...@amazon.com, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzbot+c298c9...@syzkaller.appspotmail.com, syzkall...@googlegroups.com
From: Eric Dumazet <edum...@google.com>
Date: Fri, 19 Apr 2024 12:10:42 +0200
Thanks, will take a look at the repro !

I got a similar v6 gre splat yesterday with no repro, but
this v4 one has, nice :)

Call trace:
pskb_may_pull_reason include/linux/skbuff.h:2740 [inline]
pskb_may_pull include/linux/skbuff.h:2756 [inline]
pskb_network_may_pull include/linux/skbuff.h:3077 [inline]
pskb_inet_may_pull include/net/ip_tunnels.h:361 [inline]
ip6gre_tunnel_xmit+0xea0/0x13b8 net/ipv6/ip6_gre.c:901

syzbot

unread,
Apr 20, 2024, 2:35:06 PM (12 days ago) Apr 20
to da...@davemloft.net, dsa...@kernel.org, edum...@google.com, f...@strlen.de, ho...@kernel.org, ku...@kernel.org, kun...@amazon.com, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzkall...@googlegroups.com
syzbot has bisected this issue to:

commit 219eee9c0d16f1b754a8b85275854ab17df0850a
Author: Florian Westphal <f...@strlen.de>
Date: Fri Feb 16 11:36:57 2024 +0000

net: skbuff: add overflow debug check to pull/push helpers

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=167a954f180000
start commit: 443574b03387 riscv, bpf: Fix kfunc parameters incompatibil..
git tree: bpf
final oops: https://syzkaller.appspot.com/x/report.txt?x=157a954f180000
console output: https://syzkaller.appspot.com/x/log.txt?x=117a954f180000
Reported-by: syzbot+c298c9...@syzkaller.appspotmail.com
Fixes: 219eee9c0d16 ("net: skbuff: add overflow debug check to pull/push helpers")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Kuniyuki Iwashima

unread,
Apr 22, 2024, 12:11:30 PM (10 days ago) Apr 22
to syzbot+c298c9...@syzkaller.appspotmail.com, da...@davemloft.net, dsa...@kernel.org, edum...@google.com, f...@strlen.de, ho...@kernel.org, ku...@kernel.org, kun...@amazon.com, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzkall...@googlegroups.com
From: syzbot <syzbot+c298c9...@syzkaller.appspotmail.com>
Date: Sat, 20 Apr 2024 11:35:04 -0700
Testing same patch for this

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 219eee9c0d16

diff --git a/net/nsh/nsh.c b/net/nsh/nsh.c
index f4a38bd6a7e0..1344653916c4 100644
--- a/net/nsh/nsh.c
+++ b/net/nsh/nsh.c
@@ -77,13 +77,15 @@ EXPORT_SYMBOL_GPL(nsh_pop);
static struct sk_buff *nsh_gso_segment(struct sk_buff *skb,
netdev_features_t features)
{
+ unsigned int tnl_hlen, mac_len, nsh_len;
struct sk_buff *segs = ERR_PTR(-EINVAL);
u16 mac_offset = skb->mac_header;
- unsigned int nsh_len, mac_len;
- __be16 proto;
+ __be16 tnl_proto, proto;

skb_reset_network_header(skb);

+ tnl_proto = skb->protocol;
+ tnl_hlen = skb->network_header - skb->mac_header;
mac_len = skb->mac_len;

if (unlikely(!pskb_may_pull(skb, NSH_BASE_HDR_LEN)))
@@ -113,11 +115,11 @@ static struct sk_buff *nsh_gso_segment(struct sk_buff *skb,
}

for (skb = segs; skb; skb = skb->next) {
- skb->protocol = htons(ETH_P_NSH);
- __skb_push(skb, nsh_len);
- skb->mac_header = mac_offset;
- skb->network_header = skb->mac_header + mac_len;
+ __skb_push(skb, nsh_len + tnl_hlen);
+ skb_reset_mac_header(skb);
+ skb->network_header = skb->mac_header + tnl_hlen;
skb->mac_len = mac_len;
+ skb->protocol = tnl_proto;
}

out:

syzbot

unread,
Apr 22, 2024, 11:28:05 PM (9 days ago) Apr 22
to da...@davemloft.net, dsa...@kernel.org, edum...@google.com, f...@strlen.de, ho...@kernel.org, ku...@kernel.org, kun...@amazon.com, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+c298c9...@syzkaller.appspotmail.com

Tested on:

commit: 219eee9c net: skbuff: add overflow debug check to pull..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1438fd73180000
kernel config: https://syzkaller.appspot.com/x/.config?x=a19cdb0b4b41d5ec
dashboard link: https://syzkaller.appspot.com/bug?extid=c298c9f0e46a3c86332b
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=12dc1973180000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages