syzbot
BUG: unable to handle kernel paging request in skb_release_data
Status: fixed on 2017/10/24 19:00
Fix commit:
0bbd7dad34f8
tun: make tun_build_skb() thread safe
First crash: 3277d, last: 3276d
Sample crash report:
BUG: unable to handle kernel paging request at ffffff0100008000
IP: kfree_skb_list net/core/skbuff.c:670 [inline]
IP: skb_release_data+0x3c2/0x790 net/core/skbuff.c:571
PGD 644c067
P4D 644c067
PUD 0
Oops: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 3888 Comm: syz-executor0 Not tainted 4.13.0-rc5-next-20170816+ #4
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8801c7c6a340 task.stack: ffff8801c9b20000
RIP: 0010:kfree_skb_list net/core/skbuff.c:670 [inline]
RIP: 0010:skb_release_data+0x3c2/0x790 net/core/skbuff.c:571
RSP: 0018:ffff8801c9b26da8 EFLAGS: 00010246
RAX: 1fffffe020001000 RBX: 0000000000000020 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff85b34bc0 RDI: ffff8801cebb0188
RBP: ffff8801c9b26ec8 R08: ffff8801cc389b08 R09: 0000000000000000
R10: ffff8801c9b276b0 R11: 0000000000000007 R12: dffffc0000000000
R13: ffffff0100008000 R14: ffff8801cc389a40 R15: 0000000000000000
FS: 00007f0920ccb700(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffff0100008000 CR3: 00000001c85b5000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
skb_release_all+0x4a/0x60 net/core/skbuff.c:631
__kfree_skb net/core/skbuff.c:645 [inline]
kfree_skb+0x15d/0x4c0 net/core/skbuff.c:663
ip_rcv+0x40a/0x17d0 net/ipv4/ip_input.c:497
__netif_receive_skb_core+0x19af/0x33d0 net/core/dev.c:4418
__netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4456
netif_receive_skb_internal+0x10b/0x5e0 net/core/dev.c:4527
netif_receive_skb+0xae/0x390 net/core/dev.c:4551
tun_rx_batched.isra.43+0x5e7/0x860 drivers/net/tun.c:1221
tun_get_user+0x11dd/0x2150 drivers/net/tun.c:1542
tun_chr_write_iter+0xd8/0x190 drivers/net/tun.c:1568
call_write_iter include/linux/fs.h:1742 [inline]
new_sync_write fs/read_write.c:457 [inline]
__vfs_write+0x684/0x970 fs/read_write.c:470
vfs_write+0x189/0x510 fs/read_write.c:518
SYSC_write fs/read_write.c:565 [inline]
SyS_write+0xef/0x220 fs/read_write.c:557
entry_SYSCALL_64_fastpath+0x1f/0xbe
RIP: 0033:0x40b751
RSP: 002b:00007f0920ccac10 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 000000000040b751
RDX: 0000000000000036 RSI: 0000000020002000 RDI: 0000000000000003
RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000f4246 R11: 0000000000000293 R12: 0000000000000036
R13: 00000000ffffffff R14: 0000000000000036 R15: 0000000020002000
Code: ff 49 bc 00 00 00 00 00 fc ff df 4c 8b 68 08 4d 85 ed 74 2b e8 60 67 8d fd 4c 89 e8 48 c1 e8 03 42 80 3c 20 00 0f 85 97 03 00 00 <49> 8b 5d 00 4c 89 ef e8 42 cf ff ff 48 85 db 49 89 dd 75 d5 e8
RIP: kfree_skb_list net/core/skbuff.c:670 [inline] RSP: ffff8801c9b26da8
RIP: skb_release_data+0x3c2/0x790 net/core/skbuff.c:571 RSP: ffff8801c9b26da8
CR2: ffffff0100008000
---[ end trace 61ff4676e624fe1e ]---
* Struck through repros no longer work on HEAD.