syzbot
general protection fault in get_work_pool
Status:
fixed on 2019/11/03 21:23
Subsystems:
net
[Documentation on labels]
Reported-by: syzbot+880087058dbc131a2703@syzkaller.appspotmail.com
Fix commit:
07bf7908950a
xfrm: Validate address prefix lengths in the xfrm selector.
First crash: 3073d, last: 2670d
Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
CPU: 0 PID: 5458 Comm: syz-executor877 Not tainted 4.18.0+ #203
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:get_work_pool+0x19f/0x260 kernel/workqueue.c:716
Code: 48 83 c4 60 5b 41 5c 41 5d 41 5e 5d c3 e8 a9 7a 2d 00 48 81 e3 00 fe ff ff 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 9e 00 00 00 48 8b 1b eb 99 e8 7d 7a 2d 00 e8 08
RSP: 0018:ffff8801ae266f40 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: 00000000fffffe00 RCX: ffffffff814f49aa
RDX: 000000001fffffc0 RSI: ffffffff814f4a27 RDI: 0000000000000007
RBP: ffff8801ae266fc0 R08: ffff8801d7bfe080 R09: ffffed003b6046d6
R10: ffffed003b6046d6 R11: ffff8801db0236b3 R12: 0000000000000004
R13: 1ffff10035c4cde8 R14: ffff8801ae266fa0 R15: 0000000000000000
FS: 00000000019e7880(0000) GS:ffff8801db000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000300 CR3: 00000001add0a000 CR4: 00000000001406f0
Call Trace:
__queue_work+0x319/0x12f0 kernel/workqueue.c:1401
queue_work_on+0x19a/0x1e0 kernel/workqueue.c:1486
queue_work include/linux/workqueue.h:512 [inline]
schedule_work include/linux/workqueue.h:570 [inline]
xfrm_policy_insert+0xe66/0x16d0 net/xfrm/xfrm_policy.c:803
xfrm_add_policy+0x2c8/0x750 net/xfrm/xfrm_user.c:1642
xfrm_user_rcv_msg+0x455/0x8b0 net/xfrm/xfrm_user.c:2650
netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2454
xfrm_netlink_rcv+0x6f/0x90 net/xfrm/xfrm_user.c:2658
netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x5a0/0x760 net/netlink/af_netlink.c:1343
netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1908
sock_sendmsg_nosec net/socket.c:621 [inline]
sock_sendmsg+0xd5/0x120 net/socket.c:631
___sys_sendmsg+0x7fd/0x930 net/socket.c:2114
__sys_sendmsg+0x11d/0x290 net/socket.c:2152
__do_sys_sendmsg net/socket.c:2161 [inline]
__se_sys_sendmsg net/socket.c:2159 [inline]
__x64_sys_sendmsg+0x78/0xb0 net/socket.c:2159
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441409
Code: e8 6c e8 ff ff 48 83 c4 18 c3 0f 1f 80 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 0f 83 cb 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffdb319a658 EFLAGS: 00000213 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441409
RDX: 000000000000c800 RSI: 0000000020000500 RDI: 0000000000000003
RBP: 0000000000008bbe R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000213 R12: 0000000000000000
R13: 00000000004022f0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
Dumping ftrace buffer:
(ftrace buffer empty)
---[ end trace 7d56894d5132b2c0 ]---
RIP: 0010:get_work_pool+0x19f/0x260 kernel/workqueue.c:716
Code: 48 83 c4 60 5b 41 5c 41 5d 41 5e 5d c3 e8 a9 7a 2d 00 48 81 e3 00 fe ff ff 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 9e 00 00 00 48 8b 1b eb 99 e8 7d 7a 2d 00 e8 08
RSP: 0018:ffff8801ae266f40 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: 00000000fffffe00 RCX: ffffffff814f49aa
RDX: 000000001fffffc0 RSI: ffffffff814f4a27 RDI: 0000000000000007
RBP: ffff8801ae266fc0 R08: ffff8801d7bfe080 R09: ffffed003b6046d6
R10: ffffed003b6046d6 R11: ffff8801db0236b3 R12: 0000000000000004
R13: 1ffff10035c4cde8 R14: ffff8801ae266fa0 R15: 0000000000000000
FS: 00000000019e7880(0000) GS:ffff8801db000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000300 CR3: 00000001add0a000 CR4: 00000000001406f0
* Struck through repros no longer work on HEAD.