syzbot


general protection fault in ieee802154_llsec_parse_key_id

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+d4c07de0144f6f63be3a@syzkaller.appspotmail.com
Fix commit: 6f7f657f2440 net: ieee802154: nl-mac: fix check on panid
First crash: 492d, last: 389d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: general protection fault in ieee802154_llsec_parse_key_id (log)
Repro: C syz .config
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 general protection fault in ieee802154_llsec_parse_key_id C done 64 439d 490d 1/1 fixed on 2021/05/14 02:49
linux-4.14 general protection fault in ieee802154_llsec_parse_key_id C done 101 437d 492d 1/1 fixed on 2021/05/17 08:49

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 8377 Comm: syz-executor245 Not tainted 5.12.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:nla_get_u16 include/net/netlink.h:1581 [inline]
RIP: 0010:nla_get_shortaddr net/ieee802154/nl-mac.c:48 [inline]
RIP: 0010:ieee802154_llsec_parse_key_id+0x17f/0x8a0 net/ieee802154/nl-mac.c:559
Code: 00 00 4d 8b 66 30 4d 85 e4 0f 84 1e 05 00 00 e8 17 28 e4 f8 49 8d 7c 24 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 4e
RSP: 0018:ffffc90001a874a0 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: ffffc90001a875a8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff888fc959 RDI: 0000000000000004
RBP: ffffc90001a87680 R08: 0000000000000001 R09: 0000000000000000
R10: ffffffff888fc916 R11: 0000000000000000 R12: 0000000000000000
R13: 1ffff92000350e94 R14: ffff8880253c1000 R15: ffffc90001a876a0
FS:  0000000000f7b300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002000024c CR3: 000000001f54d000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 llsec_del_devkey net/ieee802154/nl-mac.c:1138 [inline]
 ieee802154_nl_llsec_change net/ieee802154/nl-mac.c:824 [inline]
 ieee802154_llsec_del_devkey+0x168/0x350 net/ieee802154/nl-mac.c:1148
 genl_family_rcv_msg_doit+0x228/0x320 net/netlink/genetlink.c:739
 genl_family_rcv_msg net/netlink/genetlink.c:783 [inline]
 genl_rcv_msg+0x328/0x580 net/netlink/genetlink.c:800
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:811
 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:654 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:674
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43fa69
Code: 28 c3 e8 5a 14 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:00007ffe0f3f3588 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004004a0 RCX: 000000000043fa69
RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000003
RBP: 00000000004034d0 R08: 0000000000000004 R09: 00000000004004a0
R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000403560
R13: 0000000000000000 R14: 00000000004ad018 R15: 00000000004004a0
Modules linked in:
---[ end trace 529841d0cb49aa2f ]---
RIP: 0010:nla_get_u16 include/net/netlink.h:1581 [inline]
RIP: 0010:nla_get_shortaddr net/ieee802154/nl-mac.c:48 [inline]
RIP: 0010:ieee802154_llsec_parse_key_id+0x17f/0x8a0 net/ieee802154/nl-mac.c:559
Code: 00 00 4d 8b 66 30 4d 85 e4 0f 84 1e 05 00 00 e8 17 28 e4 f8 49 8d 7c 24 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 4e
RSP: 0018:ffffc90001a874a0 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: ffffc90001a875a8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff888fc959 RDI: 0000000000000004
RBP: ffffc90001a87680 R08: 0000000000000001 R09: 0000000000000000
R10: ffffffff888fc916 R11: 0000000000000000 R12: 0000000000000000
R13: 1ffff92000350e94 R14: ffff8880253c1000 R15: ffffc90001a876a0
FS:  0000000000f7b300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa8026a7110 CR3: 000000001f54d000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (92):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-this-kasan-gce 2021/03/31 21:33 net 61431a5907fc 6a81331a .config log report syz C general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/31 21:28 net-next 37f368d8d09d 6a81331a .config log report syz C general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/02/19 17:25 net-next 38b5133ad607 f689d40a .config log report syz C general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/04/03 16:34 net a14d273ba159 6a81331a .config log report syz C KASAN: null-ptr-deref Read in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/03 16:27 net-next 825066651792 6a81331a .config log report syz C KASAN: null-ptr-deref Read in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-smack-root 2021/06/02 23:47 upstream 324c92e5e0ee 0740de69 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-smack-root 2021/05/30 12:27 upstream 6799d4f2da49 325a8dab .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-smack-root 2021/05/28 16:41 upstream 97e5bf604b7a 858ea628 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-smack-root 2021/05/24 10:00 upstream 6ebb6814a1ef 3c7fef33 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-smack-root 2021/05/02 06:02 upstream d2b6f8a17919 77e2b668 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-smack-root 2021/04/23 03:24 upstream 90c911ad7445 590921a5 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-smack-root 2021/04/11 16:18 upstream 52e44129fba5 bfeda1b1 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-selinux-root 2021/04/09 07:37 upstream 4fa56ad0d12e 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-smack-root 2021/04/04 05:40 upstream 57fbdb15ec42 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-smack-root 2021/04/04 04:08 upstream 57fbdb15ec42 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-root 2021/04/01 12:07 upstream d19cc4bfbff1 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-kasan-gce-root 2021/03/27 20:27 upstream 0f4498cef9f5 a8529b82 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-qemu-upstream 2021/03/07 03:27 upstream 280d542f6ffa e4b4d570 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-qemu-upstream-386 2021/03/07 03:26 upstream 280d542f6ffa e4b4d570 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/04/05 10:27 net a14d273ba159 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/04/05 09:26 net a14d273ba159 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/04/05 08:10 net a14d273ba159 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/04/04 08:32 net a14d273ba159 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/04/03 03:09 net 990b03b05b2f 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/04/01 05:50 net d47ec7a0a727 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/03/29 18:46 net 1b479fb80160 a8529b82 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/10 18:37 net-next 626b598aa8be bfeda1b1 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/09 21:31 net-next 4438669eb703 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/09 18:10 net-next 4438669eb703 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/09 00:17 net-next 3cd52c1e32fe 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/07 14:37 net-next be107538c529 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/07 11:15 net-next be107538c529 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/06 05:21 net-next 514e1150da9c 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/06 01:22 net-next 514e1150da9c 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/02 22:45 net-next bd78980be1a6 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/02 12:31 net-next bd78980be1a6 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/01 19:12 net-next 040806343bb4 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/31 11:21 net-next 37f368d8d09d 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/30 15:46 net-next 37f368d8d09d 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/29 23:16 net-next 37f368d8d09d 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/29 12:07 net-next 72642f4127c3 a8529b82 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/29 00:53 net-next a1281601f88e a8529b82 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/28 05:12 net-next a1281601f88e a8529b82 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/27 19:20 net-next a1281601f88e a8529b82 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/27 16:46 net-next a1281601f88e a8529b82 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-linux-next-kasan-gce-root 2021/03/31 04:51 linux-next 931294922e65 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-linux-next-kasan-gce-root 2021/03/30 04:29 linux-next 931294922e65 6a81331a .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-linux-next-kasan-gce-root 2021/03/28 18:10 linux-next 931294922e65 a8529b82 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-linux-next-kasan-gce-root 2021/03/27 23:11 linux-next 931294922e65 a8529b82 .config log report info general protection fault in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/04/04 22:52 net a14d273ba159 6a81331a .config log report info KASAN: null-ptr-deref Read in ieee802154_llsec_parse_key_id
ci-upstream-net-this-kasan-gce 2021/04/03 20:38 net a14d273ba159 6a81331a .config log report info KASAN: null-ptr-deref Read in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/10 19:52 net-next 626b598aa8be bfeda1b1 .config log report info KASAN: null-ptr-deref Read in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/09 16:59 net-next 4438669eb703 6a81331a .config log report info KASAN: null-ptr-deref Read in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/06 12:22 net-next cc0626c2aaed 6a81331a .config log report info KASAN: null-ptr-deref Read in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/04/04 09:47 net-next 428e68e1a85a 6a81331a .config log report info KASAN: null-ptr-deref Read in ieee802154_llsec_parse_key_id
ci-upstream-net-kasan-gce 2021/03/31 15:32 net-next 37f368d8d09d 6a81331a .config log report info KASAN: null-ptr-deref Read in ieee802154_llsec_parse_key_id