Re: general protection fault in fib_dump_info (2)
On 8/21/20 10:00 AM, Nikolay Aleksandrov wrote: > > This seems like a much older bug to me, the code allows to pass 0 groups > and > thus we end up without any nh_grp_entry pointers. I reproduced it with a > modified iproute2 that sends an empty NHA_GROUP and then just uses the new > nexthop in any way (e.g. add a route with it). This is the same bug as the > earlier report for: "general protection fault in fib_check_nexthop" hmmm empty NHA_GROUP should not be allowed. > > I have a patch but I'll be able to send it tomorrow. > thanks.
Re: general protection fault in fib_dump_info (2)
On 8/21/20 6:27 PM, syzbot wrote: Hello, syzbot found the following issue on: HEAD commit:da2968ff Merge tag 'pci-v5.9-fixes-1' of git://git.kernel... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=137316ca90 kernel config: https://syzkaller.appspot.com/x/.config?x=a0437fdd630bee11 dashboard link: https://syzkaller.appspot.com/bug?extid=a61aa19b0c14c8770bd9 compiler: gcc (GCC) 10.1.0-syz 20200507 userspace arch: i386 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1270705190 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1150a04690 The issue was bisected to: commit 0b5e2e39739e861fa5fc84ab27a35dbe62a15330 Author: David Ahern Date: Tue May 26 18:56:16 2020 + nexthop: Expand nexthop_is_multipath in a few places This seems like a much older bug to me, the code allows to pass 0 groups and thus we end up without any nh_grp_entry pointers. I reproduced it with a modified iproute2 that sends an empty NHA_GROUP and then just uses the new nexthop in any way (e.g. add a route with it). This is the same bug as the earlier report for: "general protection fault in fib_check_nexthop" I have a patch but I'll be able to send it tomorrow. Cheers, Nik
general protection fault in fib_dump_info (2)
Hello, syzbot found the following issue on: HEAD commit:da2968ff Merge tag 'pci-v5.9-fixes-1' of git://git.kernel... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=137316ca90 kernel config: https://syzkaller.appspot.com/x/.config?x=a0437fdd630bee11 dashboard link: https://syzkaller.appspot.com/bug?extid=a61aa19b0c14c8770bd9 compiler: gcc (GCC) 10.1.0-syz 20200507 userspace arch: i386 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1270705190 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1150a04690 The issue was bisected to: commit 0b5e2e39739e861fa5fc84ab27a35dbe62a15330 Author: David Ahern Date: Tue May 26 18:56:16 2020 + nexthop: Expand nexthop_is_multipath in a few places bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=139cec6690 final oops: https://syzkaller.appspot.com/x/report.txt?x=105cec6690 console output: https://syzkaller.appspot.com/x/log.txt?x=179cec6690 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+a61aa19b0c14c8770...@syzkaller.appspotmail.com Fixes: 0b5e2e39739e ("nexthop: Expand nexthop_is_multipath in a few places") general protection fault, probably for non-canonical address 0xdc10: [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0080-0x0087] CPU: 0 PID: 6830 Comm: syz-executor644 Not tainted 5.9.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:nexthop_is_blackhole include/net/nexthop.h:240 [inline] RIP: 0010:fib_dump_info+0x893/0x1f00 net/ipv4/fib_semantics.c:1781 Code: 3c 02 00 0f 85 83 15 00 00 4d 8b 6d 10 e8 85 f1 ab fa 49 8d bd 80 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 62 15 00 00 4d 8b ad 80 00 00 00 e8 37 e2 2a 01 RSP: 0018:c90001d37248 EFLAGS: 00010202 RAX: dc00 RBX: 888093b02000 RCX: 86c84d53 RDX: 0010 RSI: 86c84d8b RDI: 0080 RBP: 88809f95a017 R08: 0001 R09: 88809f95a02b R10: 0001 R11: R12: 88809f95a000 R13: R14: R15: 8880a7164a40 FS: () GS:8880ae60(0063) knlGS:09af2840 CS: 0010 DS: 002b ES: 002b CR0: 80050033 CR2: 2300 CR3: 99698000 CR4: 001506f0 DR0: DR1: DR2: DR3: DR6: fffe0ff0 DR7: 0400 Call Trace: rtmsg_fib+0x318/0xdf0 net/ipv4/fib_semantics.c:524 fib_table_insert+0x1383/0x1af0 net/ipv4/fib_trie.c:1284 inet_rtm_newroute+0x109/0x1e0 net/ipv4/fib_frontend.c:883 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5563 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_32_irqs_on arch/x86/entry/common.c:84 [inline] __do_fast_syscall_32+0x57/0x80 arch/x86/entry/common.c:126 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:149 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c RIP: 0023:0xf7f66549 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:ffba6bdc EFLAGS: 0282 ORIG_RAX: 0172 RAX: ffda RBX: 0004 RCX: 2580 RDX: RSI: 080ea00c RDI: RBP: R08: R09: R10: R11: R12: R13: R14: R15: Modules linked in: ---[ end trace ca6d5d9f281019b7 ]--- RIP: 0010:nexthop_is_blackhole include/net/nexthop.h:240 [inline] RIP: 0010:fib_dump_info+0x893/0x1f00 net/ipv4/fib_semantics.c:1781 Code: 3c 02 00 0f 85 83 15 00 00 4d 8b 6d 10 e8 85 f1 ab fa 49 8d bd 80 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 62 15 00 00 4d 8b ad 80 00 00 00 e8 37 e2 2a 01 RSP: 0018:c90001d37248 EFLAGS: 00010202 RAX: dc00 RBX: 888093b02000 RCX: 86c84d53 RDX: 0010 RSI: 86c84d8b RDI: 0080 RBP: 88809f95a017 R08: 0001 R09: 88809f95a02b R10: 0001 R11: R12: 88809f95a000 R13: R14: R15: 8880a7164a40 FS: () GS:8880ae60(0063)