syzbot


INFO: trying to register non-static key in ieee802154_del_llsec_key (2)

Status: upstream: reported on 2022/04/22 01:06
Reported-by: syzbot+2105c6c6cd5083d1c37d@syzkaller.appspotmail.com
First crash: 789d, last: 499d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: trying to register non-static key in ieee802154_del_llsec_key 2 1040d 1065d 0/1 auto-closed as invalid on 2021/12/12 04:50
linux-4.19 INFO: trying to register non-static key in ieee802154_del_llsec_key (2) 1 874d 874d 0/1 auto-closed as invalid on 2022/05/26 14:58
linux-4.14 INFO: trying to register non-static key in ieee802154_del_llsec_key 1 1157d 1157d 0/1 auto-closed as invalid on 2021/08/16 09:53
linux-4.19 INFO: trying to register non-static key in ieee802154_del_llsec_key (3) 3 499d 686d 0/1 upstream: reported on 2022/08/02 08:55

Sample crash report:
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 11763 Comm: syz-executor.0 Not tainted 4.14.304-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 register_lock_class+0x389/0x1180 kernel/locking/lockdep.c:768
 __lock_acquire+0x167/0x3f20 kernel/locking/lockdep.c:3378
 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
 __mutex_lock_common kernel/locking/mutex.c:756 [inline]
 __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893
 ieee802154_del_llsec_key+0x3f/0x70 net/mac802154/cfg.c:358
 rdev_del_llsec_key net/ieee802154/rdev-ops.h:268 [inline]
 nl802154_del_llsec_key+0x226/0x2e0 net/ieee802154/nl802154.c:1639
 genl_family_rcv_msg+0x572/0xb20 net/netlink/genetlink.c:600
 genl_rcv_msg+0xaf/0x140 net/netlink/genetlink.c:625
 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:636
 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline]
 netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322
 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
 __sys_sendmsg+0xa3/0x120 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x27/0x40 net/socket.c:2103
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f4b2391f0c9
RSP: 002b:00007f4b21e91168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f4b23a3ef80 RCX: 00007f4b2391f0c9
RDX: 000000002000a000 RSI: 0000000020000400 RDI: 0000000000000007
RBP: 00007f4b2397aae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd0c0f2eff R14: 00007f4b21e91300 R15: 0000000000022000
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
Modules linked in:
CPU: 1 PID: 11763 Comm: syz-executor.0 Not tainted 4.14.304-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
task: ffff88809c98a1c0 task.stack: ffff88809edd8000
RIP: 0010:llsec_key_id_equal+0x22/0x390 net/mac802154/llsec.c:199
RSP: 0018:ffff88809eddf620 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000010 RCX: ffffc90005bd4000
RDX: 0000000000000002 RSI: ffffffff86e01d81 RDI: 0000000000000010
RBP: ffff88809eddf6d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: ffff88809c98a1c0 R12: ffff888095090ee0
R13: dffffc0000000000 R14: ffff888095090d90 R15: ffff88809eddf6d0
FS:  00007f4b21e91700(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4598f4b988 CR3: 0000000097869000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 mac802154_llsec_key_del+0x7f/0x200 net/mac802154/llsec.c:286
 ieee802154_del_llsec_key+0x4e/0x70 net/mac802154/cfg.c:359
 rdev_del_llsec_key net/ieee802154/rdev-ops.h:268 [inline]
 nl802154_del_llsec_key+0x226/0x2e0 net/ieee802154/nl802154.c:1639
 genl_family_rcv_msg+0x572/0xb20 net/netlink/genetlink.c:600
 genl_rcv_msg+0xaf/0x140 net/netlink/genetlink.c:625
 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:636
 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline]
 netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322
 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
 __sys_sendmsg+0xa3/0x120 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x27/0x40 net/socket.c:2103
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f4b2391f0c9
RSP: 002b:00007f4b21e91168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f4b23a3ef80 RCX: 00007f4b2391f0c9
RDX: 000000002000a000 RSI: 0000000020000400 RDI: 0000000000000007
RBP: 00007f4b2397aae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd0c0f2eff R14: 00007f4b21e91300 R15: 0000000000022000
Code: 89 e0 41 5c c3 0f 1f 40 00 41 55 41 54 55 48 89 f5 53 48 89 fb e8 ff 36 75 fa 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 84 c0 74 06 0f 8e 31 02 00 00 48 89 ea 44 0f b6 23 
RIP: llsec_key_id_equal+0x22/0x390 net/mac802154/llsec.c:199 RSP: ffff88809eddf620
---[ end trace abbee27eba17f693 ]---
----------------
Code disassembly (best guess):
   0:	89 e0                	mov    %esp,%eax
   2:	41 5c                	pop    %r12
   4:	c3                   	retq
   5:	0f 1f 40 00          	nopl   0x0(%rax)
   9:	41 55                	push   %r13
   b:	41 54                	push   %r12
   d:	55                   	push   %rbp
   e:	48 89 f5             	mov    %rsi,%rbp
  11:	53                   	push   %rbx
  12:	48 89 fb             	mov    %rdi,%rbx
  15:	e8 ff 36 75 fa       	callq  0xfa753719
  1a:	48 89 da             	mov    %rbx,%rdx
  1d:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  24:	fc ff df
  27:	48 c1 ea 03          	shr    $0x3,%rdx
* 2b:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	74 06                	je     0x39
  33:	0f 8e 31 02 00 00    	jle    0x26a
  39:	48 89 ea             	mov    %rbp,%rdx
  3c:	44 0f b6 23          	movzbl (%rbx),%r12d

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/06 02:44 linux-4.14.y 3949d1610004 be607b78 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 INFO: trying to register non-static key in ieee802154_del_llsec_key
2022/11/05 23:12 linux-4.14.y a901bb6c7db7 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 INFO: trying to register non-static key in ieee802154_del_llsec_key
2022/09/18 19:30 linux-4.14.y 5df8b4735177 dd9a85ff .config console log report info [disk image] [vmlinux] ci2-linux-4-14 INFO: trying to register non-static key in ieee802154_del_llsec_key
2022/07/21 17:23 linux-4.14.y 424a46ea058e 6e67af9d .config console log report info ci2-linux-4-14 INFO: trying to register non-static key in ieee802154_del_llsec_key
2022/05/03 23:23 linux-4.14.y e3a56aaade89 dc9e5259 .config console log report info ci2-linux-4-14 INFO: trying to register non-static key in ieee802154_del_llsec_key
2022/04/23 12:06 linux-4.14.y 15a1c6b6f516 131df97d .config console log report info ci2-linux-4-14 INFO: trying to register non-static key in ieee802154_del_llsec_key
2022/04/22 01:06 linux-4.14.y 15a1c6b6f516 2738b391 .config console log report info ci2-linux-4-14 INFO: trying to register non-static key in ieee802154_del_llsec_key
* Struck through repros no longer work on HEAD.