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: 2142d, last: 2138d
Discussions (2)
Title Replies (including bot) Last reply
general protection fault in __vfs_write 2 (4) 2018/06/09 15:36
[PATCH net] bpfilter: fix race in pipe access 2 (2) 2018/06/08 00:07
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 general protection fault in __vfs_write (3) 10 534d 848d 0/1 auto-obsoleted due to no activity on 2023/03/01 17:09
linux-4.14 general protection fault in __vfs_write (2) 10 1087d 1282d 0/1 auto-closed as invalid on 2021/08/25 20:18
linux-4.14 general protection fault in __vfs_write 1 1461d 1461d 0/1 auto-closed as invalid on 2020/08/16 02:04

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

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/06/09 21:50 upstream 7d3bf613e99a 866118af .config console log report syz ci-upstream-kasan-gce-root
2018/06/09 20:54 upstream 7d3bf613e99a 866118af .config console log report syz ci-upstream-kasan-gce
2018/06/09 15:35 net-next-old 3a979e8c07e3 866118af .config console log report syz ci-upstream-net-kasan-gce
2018/06/11 00:16 upstream 3ca24ce9ff76 866118af .config console log report ci-upstream-kasan-gce
2018/06/09 19:22 upstream 7d3bf613e99a 866118af .config console log report ci-upstream-kasan-gce-root
2018/06/08 04:27 upstream 68abbe729567 645e75f8 .config console log report ci-upstream-kasan-gce
2018/06/11 07:17 upstream 1aaccb5fa0ea 866118af .config console log report ci-upstream-kasan-gce-386
2018/06/10 08:58 upstream a16afaf7928b 866118af .config console log report ci-upstream-kasan-gce-386
2018/06/08 21:20 upstream 410feb75de24 866118af .config console log report ci-upstream-kasan-gce-386
2018/06/11 00:25 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/10 20:43 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/10 20:42 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/10 20:14 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/10 18:11 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/10 17:03 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/10 09:52 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/10 01:38 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/10 01:15 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/09 18:08 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/09 07:12 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/09 06:27 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/08 19:26 net-next-old 3a979e8c07e3 866118af .config console log report ci-upstream-net-kasan-gce
2018/06/08 17:23 net-next-old 3a979e8c07e3 f7b27b7a .config console log report ci-upstream-net-kasan-gce
2018/06/08 04:01 net-next-old 3a979e8c07e3 645e75f8 .config console log report ci-upstream-net-kasan-gce
2018/06/07 14:02 net-next-old 7170e6045a6a 645e75f8 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.