[syzbot] kernel BUG in ip_frag_next

13 views
Skip to first unread message

syzbot

unread,
Jan 18, 2023, 11:52:56 AM1/18/23
to b...@vger.kernel.org, bro...@redhat.com, da...@davemloft.net, dsa...@kernel.org, edum...@google.com, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, sa...@kernel.org, syzkall...@googlegroups.com, yosh...@linux-ipv6.org
Hello,

syzbot found the following issue on:

HEAD commit: 0c68c8e5ec68 net: mdio: cavium: Remove unneeded simicolons
git tree: net-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=147c7051480000
kernel config: https://syzkaller.appspot.com/x/.config?x=4695869845c5f393
dashboard link: https://syzkaller.appspot.com/bug?extid=c8a2e66e37eee553c4fd
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=173fca39480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=107ba0a9480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/15c191498614/disk-0c68c8e5.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7c4c9368d89c/vmlinux-0c68c8e5.xz
kernel image: https://storage.googleapis.com/syzbot-assets/083770efc7c4/bzImage-0c68c8e5.xz

The issue was bisected to:

commit eedade12f4cb7284555c4c0314485e9575c70ab7
Author: Jesper Dangaard Brouer <bro...@redhat.com>
Date: Fri Jan 13 13:52:04 2023 +0000

net: kfree_skb_list use kmem_cache_free_bulk

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1136ec41480000
final oops: https://syzkaller.appspot.com/x/report.txt?x=1336ec41480000
console output: https://syzkaller.appspot.com/x/log.txt?x=1536ec41480000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+c8a2e6...@syzkaller.appspotmail.com
Fixes: eedade12f4cb ("net: kfree_skb_list use kmem_cache_free_bulk")

raw_sendmsg: syz-executor409 forgot to set AF_INET. Fix it!
------------[ cut here ]------------
kernel BUG at net/ipv4/ip_output.c:724!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5073 Comm: syz-executor409 Not tainted 6.2.0-rc3-syzkaller-00457-g0c68c8e5ec68 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:ip_frag_next+0xa03/0xa50 net/ipv4/ip_output.c:724
Code: e8 82 b1 86 f9 e9 95 fa ff ff 48 8b 3c 24 e8 74 b1 86 f9 e9 5b f8 ff ff 4c 89 ff e8 67 b1 86 f9 e9 1f f8 ff ff e8 3d ad 38 f9 <0f> 0b 48 89 54 24 20 4c 89 44 24 18 e8 4c b1 86 f9 48 8b 54 24 20
RSP: 0018:ffffc90003a6f6b8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffc90003a6f818 RCX: 0000000000000000
RDX: ffff8880772c0000 RSI: ffffffff8848a583 RDI: 0000000000000005
RBP: 00000000000005c8 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffff2 R11: 0000000000000000 R12: ffff888026841dc0
R13: ffffc90003a6f81c R14: 00000000fffffff2 R15: ffffc90003a6f830
FS: 0000555555b08300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005622b70166a8 CR3: 000000007780f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
ip_do_fragment+0x873/0x17d0 net/ipv4/ip_output.c:902
ip_fragment.constprop.0+0x16b/0x240 net/ipv4/ip_output.c:581
__ip_finish_output net/ipv4/ip_output.c:304 [inline]
__ip_finish_output+0x2de/0x650 net/ipv4/ip_output.c:288
ip_finish_output+0x31/0x280 net/ipv4/ip_output.c:316
NF_HOOK_COND include/linux/netfilter.h:291 [inline]
ip_mc_output+0x21f/0x710 net/ipv4/ip_output.c:415
dst_output include/net/dst.h:444 [inline]
ip_local_out net/ipv4/ip_output.c:126 [inline]
ip_send_skb net/ipv4/ip_output.c:1586 [inline]
ip_push_pending_frames+0x129/0x2b0 net/ipv4/ip_output.c:1606
raw_sendmsg+0x1338/0x2df0 net/ipv4/raw.c:645
inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:827
sock_sendmsg_nosec net/socket.c:722 [inline]
sock_sendmsg+0xde/0x190 net/socket.c:745
__sys_sendto+0x23a/0x340 net/socket.c:2142
__do_sys_sendto net/socket.c:2154 [inline]
__se_sys_sendto net/socket.c:2150 [inline]
__x64_sys_sendto+0xe1/0x1b0 net/socket.c:2150
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f8efa22c499
Code: 28 c3 e8 4a 15 00 00 66 2e 0f 1f 84 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd43ed3198 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007ffd43ed31b8 RCX: 00007f8efa22c499
RDX: 000000000000fcf2 RSI: 0000000020000380 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000020001380 R09: 000000000000006e
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd43ed31c0
R13: 00007ffd43ed31e0 R14: 0000000000000000 R15: 0000000000000000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ip_frag_next+0xa03/0xa50 net/ipv4/ip_output.c:724
Code: e8 82 b1 86 f9 e9 95 fa ff ff 48 8b 3c 24 e8 74 b1 86 f9 e9 5b f8 ff ff 4c 89 ff e8 67 b1 86 f9 e9 1f f8 ff ff e8 3d ad 38 f9 <0f> 0b 48 89 54 24 20 4c 89 44 24 18 e8 4c b1 86 f9 48 8b 54 24 20
RSP: 0018:ffffc90003a6f6b8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffc90003a6f818 RCX: 0000000000000000
RDX: ffff8880772c0000 RSI: ffffffff8848a583 RDI: 0000000000000005
RBP: 00000000000005c8 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffff2 R11: 0000000000000000 R12: ffff888026841dc0
R13: ffffc90003a6f81c R14: 00000000fffffff2 R15: ffffc90003a6f830
FS: 0000555555b08300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000557162e92068 CR3: 000000007780f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


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

Jesper Dangaard Brouer

unread,
Jan 18, 2023, 3:05:46 PM1/18/23
to syzbot, da...@davemloft.net, dsa...@kernel.org, edum...@google.com, ku...@kernel.org, pab...@redhat.com, sa...@kernel.org, syzkall...@googlegroups.com, yosh...@linux-ipv6.org, bro...@redhat.com
Hi Syzbot,

Can you test attached patch?
(... is this how I get syzbot to test a patch?)

On 18/01/2023 17.52, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 0c68c8e5ec68 net: mdio: cavium: Remove unneeded simicolons
> git tree: net-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=147c7051480000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4695869845c5f393
> dashboard link: https://syzkaller.appspot.com/bug?extid=c8a2e66e37eee553c4fd
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=173fca39480000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=107ba0a9480000

The C reproducer doesn't cause the crash on my system.

--Jesper
18-syzbot-fix-to-test

Aleksandr Nogikh

unread,
Jan 18, 2023, 3:08:52 PM1/18/23
to Jesper Dangaard Brouer, syzbot, da...@davemloft.net, dsa...@kernel.org, edum...@google.com, ku...@kernel.org, pab...@redhat.com, sa...@kernel.org, syzkall...@googlegroups.com, yosh...@linux-ipv6.org, bro...@redhat.com
On Wed, Jan 18, 2023 at 9:05 PM Jesper Dangaard Brouer
<jbr...@redhat.com> wrote:
>
> Hi Syzbot,
>
> Can you test attached patch?
> (... is this how I get syzbot to test a patch?)

Not exactly :)

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
master
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/aec5f510-dc3c-0c7a-65ef-845e3a44cd68%40redhat.com.
18-syzbot-fix-to-test

Jesper Dangaard Brouer

unread,
Jan 18, 2023, 3:59:31 PM1/18/23
to syzbot, da...@davemloft.net, dsa...@kernel.org, edum...@google.com, ku...@kernel.org, pab...@redhat.com, sa...@kernel.org, syzkall...@googlegroups.com, yosh...@linux-ipv6.org, bro...@redhat.com
Hi again Syzbot,

Please this second attached patch against netdev tree

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
master

On 18/01/2023 17.52, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 0c68c8e5ec68 net: mdio: cavium: Remove unneeded simicolons
> git tree: net-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=147c7051480000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4695869845c5f393
> dashboard link: https://syzkaller.appspot.com/bug?extid=c8a2e66e37eee553c4fd
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=173fca39480000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=107ba0a9480000

I had to be root to run the reproducer, and can now reproduce.
I have tested the attached patch and it solves the problem for me.
18-syzbot-fix-to-test2

syzbot

unread,
Jan 18, 2023, 7:32:24 PM1/18/23
to bro...@redhat.com, da...@davemloft.net, dsa...@kernel.org, edum...@google.com, jbr...@redhat.com, ku...@kernel.org, nog...@google.com, pab...@redhat.com, sa...@kernel.org, syzkall...@googlegroups.com, yosh...@linux-ipv6.org
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
kernel BUG in ip_frag_next

raw_sendmsg: syz-executor.0 forgot to set AF_INET. Fix it!
------------[ cut here ]------------
kernel BUG at net/ipv4/ip_output.c:724!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5599 Comm: syz-executor.0 Not tainted 6.2.0-rc3-syzkaller-00519-g68e5b6aa2795-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:ip_frag_next+0xa03/0xa50 net/ipv4/ip_output.c:724
Code: e8 72 b9 86 f9 e9 95 fa ff ff 48 8b 3c 24 e8 64 b9 86 f9 e9 5b f8 ff ff 4c 89 ff e8 57 b9 86 f9 e9 1f f8 ff ff e8 2d b5 38 f9 <0f> 0b 48 89 54 24 20 4c 89 44 24 18 e8 3c b9 86 f9 48 8b 54 24 20
RSP: 0018:ffffc900054cf6b8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffc900054cf818 RCX: 0000000000000000
RDX: ffff88801b803a80 RSI: ffffffff88489d93 RDI: 0000000000000005
RBP: 00000000000005c8 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffff2 R11: 0000000000000000 R12: ffff888026306780
R13: ffffc900054cf81c R14: 00000000fffffff2 R15: ffffc900054cf830
FS: 00007f303b68f700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020010000 CR3: 00000000759e7000 CR4: 00000000003506e0
RIP: 0033:0x7f303a88c0c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 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:00007f303b68f168 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f303a9abf80 RCX: 00007f303a88c0c9
RDX: 000000000000fcf2 RSI: 0000000020000380 RDI: 0000000000000003
RBP: 00007f303a8e7ae9 R08: 0000000020001380 R09: 000000000000006e
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdc870156f R14: 00007f303b68f300 R15: 0000000000022000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ip_frag_next+0xa03/0xa50 net/ipv4/ip_output.c:724
Code: e8 72 b9 86 f9 e9 95 fa ff ff 48 8b 3c 24 e8 64 b9 86 f9 e9 5b f8 ff ff 4c 89 ff e8 57 b9 86 f9 e9 1f f8 ff ff e8 2d b5 38 f9 <0f> 0b 48 89 54 24 20 4c 89 44 24 18 e8 3c b9 86 f9 48 8b 54 24 20
RSP: 0018:ffffc900054cf6b8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffc900054cf818 RCX: 0000000000000000
RDX: ffff88801b803a80 RSI: ffffffff88489d93 RDI: 0000000000000005
RBP: 00000000000005c8 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffff2 R11: 0000000000000000 R12: ffff888026306780
R13: ffffc900054cf81c R14: 00000000fffffff2 R15: ffffc900054cf830
FS: 00007f303b68f700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020010000 CR3: 00000000759e7000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


Tested on:

commit: 68e5b6aa xdp: document xdp_do_flush() before napi_comp..
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=17e1ae46480000
kernel config: https://syzkaller.appspot.com/x/.config?x=39c7bc65b36ccf9d
dashboard link: https://syzkaller.appspot.com/bug?extid=c8a2e66e37eee553c4fd
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=16df6539480000

syzbot

unread,
Jan 18, 2023, 7:53:24 PM1/18/23
to bro...@redhat.com, da...@davemloft.net, dsa...@kernel.org, edum...@google.com, jbr...@redhat.com, ku...@kernel.org, pab...@redhat.com, sa...@kernel.org, syzkall...@googlegroups.com, yosh...@linux-ipv6.org
Hello,

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

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

Tested on:

commit: 68e5b6aa xdp: document xdp_do_flush() before napi_comp..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=15a7a805480000
kernel config: https://syzkaller.appspot.com/x/.config?x=39c7bc65b36ccf9d
dashboard link: https://syzkaller.appspot.com/bug?extid=c8a2e66e37eee553c4fd
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=17bd2661480000

Note: testing is done by a robot and is best-effort only.

Jesper Dangaard Brouer

unread,
Jan 19, 2023, 6:09:08 AM1/19/23
to syzbot, b...@vger.kernel.org, da...@davemloft.net, dsa...@kernel.org, edum...@google.com, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, sa...@kernel.org, syzkall...@googlegroups.com, yosh...@linux-ipv6.org, bro...@redhat.com

On 18/01/2023 17.52, syzbot wrote:
> Hello,

Hi Syzbot,

Could you test this attached patch please, against:
18-syzbot-proper-fix-test3

syzbot

unread,
Jan 19, 2023, 6:43:26 AM1/19/23
to b...@vger.kernel.org, bro...@redhat.com, da...@davemloft.net, dsa...@kernel.org, edum...@google.com, jbr...@redhat.com, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, sa...@kernel.org, syzkall...@googlegroups.com, yosh...@linux-ipv6.org
Hello,

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

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

Tested on:

commit: 9ffb07a3 Merge branch 'enetc-bd-ring-cleanup'
console output: https://syzkaller.appspot.com/x/log.txt?x=1641e6a9480000
kernel config: https://syzkaller.appspot.com/x/.config?x=39c7bc65b36ccf9d
dashboard link: https://syzkaller.appspot.com/bug?extid=c8a2e66e37eee553c4fd
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=135c7f0e480000
Reply all
Reply to author
Forward
0 new messages