Subject: general protection fault in ieee80211_debugfs_rename_netdev

From: syzbot <[email-masked]>
Date: Sun, 14 Apr 2019 09:47:06 -0700

Hello,

syzbot found the following crash on:

HEAD commit:    ed0de45a ipv4: recompile ip options in ipv4_link_failure
git tree:       net
console output: https://syzkaller.appspot.com/x/log.txt?x=14495fc3200000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4fb64439e07a1ec0
dashboard link: https://syzkaller.appspot.com/bug?extid=4ece1a28b8f4730547c9
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)

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: [email-masked]

netlink: 9 bytes leftover after parsing attributes in process  
`syz-executor.5'.
mac80211_hwsim hwsim17 0-�: renamed from wlan0
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 17228 Comm: syz-executor.5 Not tainted 5.1.0-rc4+ #165
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
RIP: 0010:ieee80211_debugfs_rename_netdev+0xd1/0x14d  
net/mac80211/debugfs_netdev.c:848
Code: 05 00 00 48 c7 c6 00 92 13 88 4c 89 fa 4c 89 f7 e8 24 43 45 00 49 8d  
7d 40 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75  
6f 49 8b 7d 40 4c 89 f1 4c 89 ee 48 89 fa e8 27 ee
RSP: 0018:ffff88806601edd0 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffff888099119ac0 RCX: 1ffff1100cc03d8c
RDX: 0000000000000005 RSI: 0000000000000000 RDI: 000000000000002f
RBP: ffff88806601ee70 R08: ffff88806ebf8400 R09: ffffed100cc03dbf
R10: ffffed100cc03dbe R11: ffff88806601edf6 R12: 1ffff1100cc03dba
R13: ffffffffffffffef R14: ffff88806601edf0 R15: ffff88809911ab10
FS:  00007f4c104b2700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b30c26000 CR3: 00000000a6006000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
  netdev_notify+0x1f9/0x260 net/mac80211/iface.c:1991
  notifier_call_chain+0xc7/0x240 kernel/notifier.c:93
  __raw_notifier_call_chain kernel/notifier.c:394 [inline]
  raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401
  call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1753
  call_netdevice_notifiers_extack net/core/dev.c:1765 [inline]
  call_netdevice_notifiers net/core/dev.c:1779 [inline]
  dev_change_name+0x5cc/0xa70 net/core/dev.c:1248
  do_setlink+0x2a51/0x3510 net/core/rtnetlink.c:2466
  rtnl_setlink+0x271/0x3b0 net/core/rtnetlink.c:2747
  rtnetlink_rcv_msg+0x465/0xb00 net/core/rtnetlink.c:5192
  netlink_rcv_skb+0x17a/0x460 net/netlink/af_netlink.c:2486
  rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5210
  netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
  netlink_unicast+0x536/0x720 net/netlink/af_netlink.c:1337
  netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1926
  sock_sendmsg_nosec net/socket.c:651 [inline]
  sock_sendmsg+0xdd/0x130 net/socket.c:661
  sock_write_iter+0x27c/0x3e0 net/socket.c:988
  call_write_iter include/linux/fs.h:1866 [inline]
  do_iter_readv_writev+0x5e1/0x8e0 fs/read_write.c:681
  do_iter_write fs/read_write.c:957 [inline]
  do_iter_write+0x184/0x610 fs/read_write.c:938
  vfs_writev+0x1b3/0x2f0 fs/read_write.c:1002
  do_writev+0x15e/0x370 fs/read_write.c:1037
  __do_sys_writev fs/read_write.c:1110 [inline]
  __se_sys_writev fs/read_write.c:1107 [inline]
  __x64_sys_writev+0x75/0xb0 fs/read_write.c:1107
  do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
  entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458c29
Code: ad b8 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 b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f4c104b1c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458c29
RDX: 0000000000000001 RSI: 0000000020000340 RDI: 0000000000000003
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4c104b26d4
R13: 00000000004c5996 R14: 00000000004df0e0 R15: 00000000ffffffff
Modules linked in:
---[ end trace 3d9f3ebb82855582 ]---
RIP: 0010:ieee80211_debugfs_rename_netdev+0xd1/0x14d  
net/mac80211/debugfs_netdev.c:848
Code: 05 00 00 48 c7 c6 00 92 13 88 4c 89 fa 4c 89 f7 e8 24 43 45 00 49 8d  
7d 40 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75  
6f 49 8b 7d 40 4c 89 f1 4c 89 ee 48 89 fa e8 27 ee
RSP: 0018:ffff88806601edd0 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffff888099119ac0 RCX: 1ffff1100cc03d8c
RDX: 0000000000000005 RSI: 0000000000000000 RDI: 000000000000002f
RBP: ffff88806601ee70 R08: ffff88806ebf8400 R09: ffffed100cc03dbf
R10: ffffed100cc03dbe R11: ffff88806601edf6 R12: 1ffff1100cc03dba
R13: ffffffffffffffef R14: ffff88806601edf0 R15: ffff88809911ab10
FS:  00007f4c104b2700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004e6460 CR3: 00000000a6006000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

---
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 [email-masked].

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