syzbot
general protection fault in __vfs_write
Status:
fixed on 2018/07/09 18:05
Subsystems:
fs
[Documentation on labels]
Reported-by: syzbot+7ade6c94abb2774c0fee@syzkaller.appspotmail.com
Fix commit:
66e58e0ef80a
bpfilter: fix race in pipe access
First crash: 2975d, last: 2971d
Sample crash report:
8021q: adding VLAN 0 to HW filter on device team0
8021q: adding VLAN 0 to HW filter on device team0
8021q: adding VLAN 0 to HW filter on device team0
bpfilter: read fail -512
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
CPU: 0 PID: 7060 Comm: syz-executor4 Not tainted 4.17.0+ #92
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:file_write_hint include/linux/fs.h:1934 [inline]
RIP: 0010:init_sync_kiocb include/linux/fs.h:1953 [inline]
RIP: 0010:new_sync_write fs/read_write.c:470 [inline]
RIP: 0010:__vfs_write+0x49f/0x9d0 fs/read_write.c:487
Code: 48 c1 ea 03 80 3c 02 00 0f 85 17 05 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 6b 20 49 8d bd c8 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 59 03 00 00 45 8b ad c8 00 00
RSP: 0018:ffff8801afa47878 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8801cd881800 RCX: ffffffff81c0dc3a
RDX: 0000000000000019 RSI: ffffffff81c0dc44 RDI: 00000000000000c8
RBP: ffff8801afa479f0 R08: ffff8801a9984580 R09: fffffbfff130c749
R10: ffff8801afa47a38 R11: ffffffff89863a4b R12: ffff8801afa479c8
R13: 0000000000000000 R14: 0000000000000000 R15: ffff8801afa47ab0
FS: 00007f758cf49700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcc6845efc CR3: 00000001c653f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__kernel_write+0x10c/0x380 fs/read_write.c:506
__bpfilter_process_sockopt+0x1d8/0x35b net/bpfilter/bpfilter_kern.c:66
bpfilter_mbox_request+0x4d/0xb0 net/ipv4/bpfilter/sockopt.c:25
bpfilter_ip_set_sockopt+0x33/0x40 net/ipv4/bpfilter/sockopt.c:31
ip_setsockopt+0x124/0x140 net/ipv4/ip_sockglue.c:1250
udp_setsockopt+0x62/0xa0 net/ipv4/udp.c:2502
ipv6_setsockopt+0x149/0x170 net/ipv6/ipv6_sockglue.c:917
udpv6_setsockopt+0x62/0xa0 net/ipv6/udp.c:1472
sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3053
__sys_setsockopt+0x1bd/0x390 net/socket.c:1935
__do_sys_setsockopt net/socket.c:1946 [inline]
__se_sys_setsockopt net/socket.c:1943 [inline]
__x64_sys_setsockopt+0xbe/0x150 net/socket.c:1943
do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4559f9
Code: 1d ba 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 eb b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f758cf48c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f758cf496d4 RCX: 00000000004559f9
RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 000000000072bea0 R08: 0000000000000004 R09: 0000000000000000
R10: 0000000020000080 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000004c1377 R14: 00000000004d1360 R15: 0000000000000000
Modules linked in:
Dumping ftrace buffer:
(ftrace buffer empty)
---[ end trace ba806e224521ad96 ]---
RIP: 0010:file_write_hint include/linux/fs.h:1934 [inline]
RIP: 0010:init_sync_kiocb include/linux/fs.h:1953 [inline]
RIP: 0010:new_sync_write fs/read_write.c:470 [inline]
RIP: 0010:__vfs_write+0x49f/0x9d0 fs/read_write.c:487
Code: 48 c1 ea 03 80 3c 02 00 0f 85 17 05 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 6b 20 49 8d bd c8 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 59 03 00 00 45 8b ad c8 00 00
RSP: 0018:ffff8801afa47878 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8801cd881800 RCX: ffffffff81c0dc3a
RDX: 0000000000000019 RSI: ffffffff81c0dc44 RDI: 00000000000000c8
RBP: ffff8801afa479f0 R08: ffff8801a9984580 R09: fffffbfff130c749
R10: ffff8801afa47a38 R11: ffffffff89863a4b R12: ffff8801afa479c8
R13: 0000000000000000 R14: 0000000000000000 R15: ffff8801afa47ab0
FS: 00007f758cf49700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcc6845efc CR3: 00000001c653f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
* Struck through repros no longer work on HEAD.