* WARNING in hwsim_new_radio_nl @ 2020-04-10 16:32 syzbot 2020-04-13 6:15 ` syzbot ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: syzbot @ 2020-04-10 16:32 UTC (permalink / raw) To: davem, johannes, kvalo, linux-kernel, linux-wireless, netdev, syzkaller-bugs Hello, syzbot found the following crash on: HEAD commit: 5d30bcac Merge tag '9p-for-5.7-2' of git://github.com/mart.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=119383b3e00000 kernel config: https://syzkaller.appspot.com/x/.config?x=65d386b867ba5289 dashboard link: https://syzkaller.appspot.com/bug?extid=a4aee3f42d7584d76761 compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81) Unfortunately, I don't have any reproducer for this crash yet. IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+a4aee3f42d7584d76761@syzkaller.appspotmail.com ------------[ cut here ]------------ precision 33020 too large WARNING: CPU: 0 PID: 25816 at lib/vsprintf.c:2471 set_precision lib/vsprintf.c:2471 [inline] WARNING: CPU: 0 PID: 25816 at lib/vsprintf.c:2471 vsnprintf+0x1467/0x1aa0 lib/vsprintf.c:2547 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 25816 Comm: syz-executor.0 Not tainted 5.6.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1e9/0x30e lib/dump_stack.c:118 panic+0x264/0x7a0 kernel/panic.c:221 __warn+0x209/0x210 kernel/panic.c:582 report_bug+0x1ac/0x2d0 lib/bug.c:195 fixup_bug arch/x86/kernel/traps.c:175 [inline] do_error_trap+0xca/0x1c0 arch/x86/kernel/traps.c:267 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:286 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027 RIP: 0010:set_precision lib/vsprintf.c:2471 [inline] RIP: 0010:vsnprintf+0x1467/0x1aa0 lib/vsprintf.c:2547 Code: f5 6e f9 48 8d 5c 24 48 e9 8e fc ff ff e8 81 f5 6e f9 c6 05 a6 4e 63 01 01 48 c7 c7 c1 69 0a 89 44 89 fe 31 c0 e8 29 09 41 f9 <0f> 0b e9 b7 f6 ff ff e8 5d f5 6e f9 c6 05 81 4e 63 01 01 48 c7 c7 RSP: 0018:ffffc90016587780 EFLAGS: 00010246 RAX: 2f3b2aeaadea7400 RBX: ffffc900165877c8 RCX: 0000000000040000 RDX: ffffc90001f09000 RSI: 0000000000009177 RDI: 0000000000009178 RBP: 80fc0000ffffff02 R08: dffffc0000000000 R09: fffffbfff162889d R10: fffffbfff162889d R11: 0000000000000000 R12: dffffc0000000000 R13: 0000000000000000 R14: ffffffff88ea1fb0 R15: 00000000000080fc kvasprintf+0x59/0xf0 lib/kasprintf.c:22 kasprintf+0x6a/0x90 lib/kasprintf.c:59 hwsim_new_radio_nl+0x95c/0xf30 drivers/net/wireless/mac80211_hwsim.c:3672 genl_family_rcv_msg_doit net/netlink/genetlink.c:673 [inline] genl_family_rcv_msg net/netlink/genetlink.c:718 [inline] genl_rcv_msg+0x1054/0x1530 net/netlink/genetlink.c:735 netlink_rcv_skb+0x190/0x3a0 net/netlink/af_netlink.c:2469 genl_rcv+0x24/0x40 net/netlink/genetlink.c:746 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x786/0x940 net/netlink/af_netlink.c:1329 netlink_sendmsg+0xa57/0xd70 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x4f9/0x7c0 net/socket.c:2362 ___sys_sendmsg net/socket.c:2416 [inline] __sys_sendmsg+0x2a6/0x360 net/socket.c:2449 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45c889 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fb9e5575c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fb9e55766d4 RCX: 000000000045c889 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 000000000076bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009f5 R14: 00000000004ccb09 R15: 000000000076bf0c Kernel Offset: disabled Rebooting in 86400 seconds.. --- This bug 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 bug report. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: WARNING in hwsim_new_radio_nl 2020-04-10 16:32 WARNING in hwsim_new_radio_nl syzbot @ 2020-04-13 6:15 ` syzbot 2020-04-13 14:05 ` syzbot 2020-04-14 10:42 ` Paolo Abeni 2 siblings, 0 replies; 9+ messages in thread From: syzbot @ 2020-04-13 6:15 UTC (permalink / raw) To: davem, johannes, kvalo, linux-kernel, linux-wireless, netdev, syzkaller-bugs syzbot has found a reproducer for the following crash on: HEAD commit: 4f8a3cc1 Merge tag 'x86-urgent-2020-04-12' of git://git.ke.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=110243b3e00000 kernel config: https://syzkaller.appspot.com/x/.config?x=3bfbde87e8e65624 dashboard link: https://syzkaller.appspot.com/bug?extid=a4aee3f42d7584d76761 compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81) syz repro: https://syzkaller.appspot.com/x/repro.syz?x=100825afe00000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10df613fe00000 IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+a4aee3f42d7584d76761@syzkaller.appspotmail.com netlink: 98586 bytes leftover after parsing attributes in process `syz-executor425'. ------------[ cut here ]------------ precision 33020 too large WARNING: CPU: 1 PID: 6998 at lib/vsprintf.c:2471 set_precision lib/vsprintf.c:2471 [inline] WARNING: CPU: 1 PID: 6998 at lib/vsprintf.c:2471 vsnprintf+0x1467/0x1aa0 lib/vsprintf.c:2547 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 6998 Comm: syz-executor425 Not tainted 5.6.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1e9/0x30e lib/dump_stack.c:118 panic+0x264/0x7a0 kernel/panic.c:221 __warn+0x209/0x210 kernel/panic.c:582 report_bug+0x1ac/0x2d0 lib/bug.c:195 fixup_bug arch/x86/kernel/traps.c:175 [inline] do_error_trap+0xca/0x1c0 arch/x86/kernel/traps.c:267 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:286 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027 RIP: 0010:set_precision lib/vsprintf.c:2471 [inline] RIP: 0010:vsnprintf+0x1467/0x1aa0 lib/vsprintf.c:2547 Code: a6 bb fd 48 8d 5c 24 48 e9 8e fc ff ff e8 01 a6 bb fd c6 05 bf 06 b0 05 01 48 c7 c7 c1 d3 f2 88 44 89 fe 31 c0 e8 29 ba 8d fd <0f> 0b e9 b7 f6 ff ff e8 dd a5 bb fd c6 05 9a 06 b0 05 01 48 c7 c7 RSP: 0018:ffffc90001647780 EFLAGS: 00010246 RAX: 2f9f2ace1f35b900 RBX: ffffc900016477c8 RCX: ffff88809d86c2c0 RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000286 RBP: 80fc0000ffffff02 R08: dffffc0000000000 R09: fffffbfff1628ea5 R10: fffffbfff1628ea5 R11: 0000000000000000 R12: dffffc0000000000 R13: 0000000000000000 R14: ffffffff88ea3058 R15: 00000000000080fc kvasprintf+0x59/0xf0 lib/kasprintf.c:22 kasprintf+0x6a/0x90 lib/kasprintf.c:59 hwsim_new_radio_nl+0x95c/0xf30 drivers/net/wireless/mac80211_hwsim.c:3672 genl_family_rcv_msg_doit net/netlink/genetlink.c:673 [inline] genl_family_rcv_msg net/netlink/genetlink.c:718 [inline] genl_rcv_msg+0x1054/0x1530 net/netlink/genetlink.c:735 netlink_rcv_skb+0x190/0x3a0 net/netlink/af_netlink.c:2469 genl_rcv+0x24/0x40 net/netlink/genetlink.c:746 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x786/0x940 net/netlink/af_netlink.c:1329 netlink_sendmsg+0xa57/0xd70 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x4f9/0x7c0 net/socket.c:2362 ___sys_sendmsg net/socket.c:2416 [inline] __sys_sendmsg+0x2a6/0x360 net/socket.c:2449 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x4401f9 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffecc373af8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401f9 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a80 R13: 0000000000401b10 R14: 0000000000000000 R15: 0000000000000000 Kernel Offset: disabled Rebooting in 86400 seconds.. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: WARNING in hwsim_new_radio_nl 2020-04-10 16:32 WARNING in hwsim_new_radio_nl syzbot 2020-04-13 6:15 ` syzbot @ 2020-04-13 14:05 ` syzbot 2020-04-14 10:38 ` Johannes Berg 2020-04-14 10:42 ` Paolo Abeni 2 siblings, 1 reply; 9+ messages in thread From: syzbot @ 2020-04-13 14:05 UTC (permalink / raw) To: davem, johannes, kvalo, linux-kernel, linux-wireless, mathew.j.martineau, matthieu.baerts, netdev, pabeni, syzkaller-bugs syzbot has bisected this bug to: commit 01cacb00b35cb62b139f07d5f84bcf0eeda8eff6 Author: Paolo Abeni <pabeni@redhat.com> Date: Fri Mar 27 21:48:51 2020 +0000 mptcp: add netlink-based PM bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10225bb3e00000 start commit: 4f8a3cc1 Merge tag 'x86-urgent-2020-04-12' of git://git.ke.. git tree: upstream final crash: https://syzkaller.appspot.com/x/report.txt?x=12225bb3e00000 console output: https://syzkaller.appspot.com/x/log.txt?x=14225bb3e00000 kernel config: https://syzkaller.appspot.com/x/.config?x=3bfbde87e8e65624 dashboard link: https://syzkaller.appspot.com/bug?extid=a4aee3f42d7584d76761 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=100825afe00000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10df613fe00000 Reported-by: syzbot+a4aee3f42d7584d76761@syzkaller.appspotmail.com Fixes: 01cacb00b35c ("mptcp: add netlink-based PM") For information about bisection process see: https://goo.gl/tpsmEJ#bisection ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: WARNING in hwsim_new_radio_nl 2020-04-13 14:05 ` syzbot @ 2020-04-14 10:38 ` Johannes Berg 2020-04-15 15:16 ` Dmitry Vyukov 0 siblings, 1 reply; 9+ messages in thread From: Johannes Berg @ 2020-04-14 10:38 UTC (permalink / raw) To: syzbot, davem, kvalo, linux-kernel, linux-wireless, mathew.j.martineau, matthieu.baerts, netdev, pabeni, syzkaller-bugs Hi syzbot keepers, On Mon, 2020-04-13 at 07:05 -0700, syzbot wrote: > syzbot has bisected this bug to: > > commit 01cacb00b35cb62b139f07d5f84bcf0eeda8eff6 > Author: Paolo Abeni <pabeni@redhat.com> > Date: Fri Mar 27 21:48:51 2020 +0000 > > mptcp: add netlink-based PM > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10225bb3e00000 This is, fairly obviously, incorrect. Same with the bisection for 6693adf1698864d21734, which is really the same underlying problem as this one (though at a different code site). However, it stands out that this was bisected to a commit that adds a new generic netlink family in both cases. This makes sense - the reproducer identifies the family by *number*, but that number isn't stable, generic netlink families should be identified by *name*. Perhaps somehow syzbot could be taught that, so that the bisection is stable across kernels with different generic netlink families registered? Alternatively, we _could_ add some kind of stable ID mode, but I'm not sure we really want to ... since that would mean people start hardcoding IDs? johannes ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: WARNING in hwsim_new_radio_nl 2020-04-14 10:38 ` Johannes Berg @ 2020-04-15 15:16 ` Dmitry Vyukov 0 siblings, 0 replies; 9+ messages in thread From: Dmitry Vyukov @ 2020-04-15 15:16 UTC (permalink / raw) To: Johannes Berg, syzkaller Cc: syzbot, David Miller, Kalle Valo, LKML, linux-wireless, mathew.j.martineau, matthieu.baerts, netdev, Paolo Abeni, syzkaller-bugs On Tue, Apr 14, 2020 at 12:41 PM Johannes Berg <johannes@sipsolutions.net> wrote: > > Hi syzbot keepers, > > On Mon, 2020-04-13 at 07:05 -0700, syzbot wrote: > > syzbot has bisected this bug to: > > > > commit 01cacb00b35cb62b139f07d5f84bcf0eeda8eff6 > > Author: Paolo Abeni <pabeni@redhat.com> > > Date: Fri Mar 27 21:48:51 2020 +0000 > > > > mptcp: add netlink-based PM > > > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10225bb3e00000 > > This is, fairly obviously, incorrect. Same with the bisection for > 6693adf1698864d21734, which is really the same underlying problem as > this one (though at a different code site). > > However, it stands out that this was bisected to a commit that adds a > new generic netlink family in both cases. > > This makes sense - the reproducer identifies the family by *number*, but > that number isn't stable, generic netlink families should be identified > by *name*. > > Perhaps somehow syzbot could be taught that, so that the bisection is > stable across kernels with different generic netlink families > registered? > > Alternatively, we _could_ add some kind of stable ID mode, but I'm not > sure we really want to ... since that would mean people start hardcoding > IDs? +syzkaller mailing list Hi Johannes, syzkaller has a pseudo-syscall to map string genetlink family ID to int ID. If that syscall would have been used, then I assume it should have worked. However in this case, it managed to trigger the bug with a plain opaque blob with no knowledge about the blob contents whatsoever. I don't see any realistic way to preserve family ID in this case. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: WARNING in hwsim_new_radio_nl 2020-04-10 16:32 WARNING in hwsim_new_radio_nl syzbot 2020-04-13 6:15 ` syzbot 2020-04-13 14:05 ` syzbot @ 2020-04-14 10:42 ` Paolo Abeni 2020-04-14 10:59 ` syzbot 2020-04-14 11:11 ` Johannes Berg 2 siblings, 2 replies; 9+ messages in thread From: Paolo Abeni @ 2020-04-14 10:42 UTC (permalink / raw) To: syzbot, davem, johannes, kvalo, linux-kernel, linux-wireless, netdev, syzkaller-bugs #syz test git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master I don't see why the bisection pointed to the MPTCP commit ?!? the following patch should address the issue. --- diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 7fe8207db6ae..2082abdb08d4 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -635,7 +635,8 @@ static const struct nla_policy hwsim_genl_policy[HWSIM_ATTR_MAX + 1] = { [HWSIM_ATTR_SUPPORT_P2P_DEVICE] = { .type = NLA_FLAG }, [HWSIM_ATTR_USE_CHANCTX] = { .type = NLA_FLAG }, [HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE] = { .type = NLA_FLAG }, - [HWSIM_ATTR_RADIO_NAME] = { .type = NLA_STRING }, + [HWSIM_ATTR_RADIO_NAME] = { .type = NLA_STRING, + .len = NL80211_WIPHY_NAME_MAXLEN }, [HWSIM_ATTR_NO_VIF] = { .type = NLA_FLAG }, [HWSIM_ATTR_FREQ] = { .type = NLA_U32 }, [HWSIM_ATTR_TX_INFO_FLAGS] = { .type = NLA_BINARY }, ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: WARNING in hwsim_new_radio_nl 2020-04-14 10:42 ` Paolo Abeni @ 2020-04-14 10:59 ` syzbot 2020-04-14 11:11 ` Johannes Berg 1 sibling, 0 replies; 9+ messages in thread From: syzbot @ 2020-04-14 10:59 UTC (permalink / raw) To: davem, johannes, kvalo, linux-kernel, linux-wireless, netdev, pabeni, syzkaller-bugs Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+a4aee3f42d7584d76761@syzkaller.appspotmail.com Tested on: commit: e154659b mptcp: fix double-unlock in mptcp_poll git tree: net kernel config: https://syzkaller.appspot.com/x/.config?x=5af684c50f30bcb2 dashboard link: https://syzkaller.appspot.com/bug?extid=a4aee3f42d7584d76761 compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81) patch: https://syzkaller.appspot.com/x/patch.diff?x=144e124fe00000 Note: testing is done by a robot and is best-effort only. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: WARNING in hwsim_new_radio_nl 2020-04-14 10:42 ` Paolo Abeni 2020-04-14 10:59 ` syzbot @ 2020-04-14 11:11 ` Johannes Berg 2020-04-14 12:55 ` Paolo Abeni 1 sibling, 1 reply; 9+ messages in thread From: Johannes Berg @ 2020-04-14 11:11 UTC (permalink / raw) To: Paolo Abeni, syzbot, davem, kvalo, linux-kernel, linux-wireless, netdev, syzkaller-bugs On Tue, 2020-04-14 at 12:42 +0200, Paolo Abeni wrote: > #syz test git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master > > I don't see why the bisection pointed to the MPTCP commit ?!? I just sent an explanation for that :) Good fix too, I already applied another one just now for an earlier, but really mostly identical, syzbot warning (and yes, tagged it with both). johannes ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: WARNING in hwsim_new_radio_nl 2020-04-14 11:11 ` Johannes Berg @ 2020-04-14 12:55 ` Paolo Abeni 0 siblings, 0 replies; 9+ messages in thread From: Paolo Abeni @ 2020-04-14 12:55 UTC (permalink / raw) To: Johannes Berg, syzbot, davem, kvalo, linux-kernel, linux-wireless, netdev, syzkaller-bugs On Tue, 2020-04-14 at 13:11 +0200, Johannes Berg wrote: > On Tue, 2020-04-14 at 12:42 +0200, Paolo Abeni wrote: > > #syz test git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master > > > > I don't see why the bisection pointed to the MPTCP commit ?!? > > I just sent an explanation for that :) Thanks, I did not thought about hard-coded ids! > Good fix too, I already applied another one just now for an earlier, but > really mostly identical, syzbot warning (and yes, tagged it with both). Nice! I saw the fix you mentioned after reading your email. I'm fine with that. Cheers, Paolo ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-04-15 15:16 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-10 16:32 WARNING in hwsim_new_radio_nl syzbot 2020-04-13 6:15 ` syzbot 2020-04-13 14:05 ` syzbot 2020-04-14 10:38 ` Johannes Berg 2020-04-15 15:16 ` Dmitry Vyukov 2020-04-14 10:42 ` Paolo Abeni 2020-04-14 10:59 ` syzbot 2020-04-14 11:11 ` Johannes Berg 2020-04-14 12:55 ` Paolo Abeni
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).