syzbot


general protection fault in packet_lookup_frame

Status: fixed on 2019/12/04 13:46
Reported-by: syzbot+7afaf23453f7e4fe9c05@syzkaller.appspotmail.com
Fix commit: 154e6bc497c9 net/packet: fix race in tpacket_snd()
First crash: 1711d, last: 1711d
Fix bisection: fixed by (bisect log) :
commit 154e6bc497c9c4dd4c8ce41a10615dbe474135cf
Author: Eric Dumazet <edumazet@google.com>
Date: Wed Aug 14 09:11:57 2019 +0000

  net/packet: fix race in tpacket_snd()

  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 general protection fault in packet_lookup_frame C done 1 1711d 1711d 1/1 fixed on 2019/12/04 13:46
upstream general protection fault in packet_lookup_frame net C done 7 1711d 1711d 12/26 fixed on 2019/09/06 20:45

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] PREEMPT SMP KASAN
CPU: 1 PID: 9270 Comm: syz-executor762 Not tainted 4.19.66 #40
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:packet_lookup_frame+0x8d/0x270 net/packet/af_packet.c:482
Code: c1 ee 03 f7 73 0c 80 3c 0e 00 0f 85 cb 01 00 00 48 8b 0b 89 c0 4c 8d 24 c1 48 b8 00 00 00 00 00 fc ff df 4c 89 e1 48 c1 e9 03 <80> 3c 01 00 0f 85 94 01 00 00 48 8d 7b 10 4d 8b 3c 24 48 b8 00 00
RSP: 0018:ffff8880960ff7c8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888092b80ad0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 1ffff1101257015a RDI: ffff888092b80adc
RBP: ffff8880960ff7f8 R08: ffff88808036a640 R09: 0000000000000001
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: 0000000000000000
R13: 0000000000000001 R14: ffff888092b80580 R15: dffffc0000000000
FS:  00007f4ce8045700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000040 CR3: 00000000920d9000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 packet_current_frame net/packet/af_packet.c:495 [inline]
 tpacket_snd net/packet/af_packet.c:2665 [inline]
 packet_sendmsg+0x58d/0x64f0 net/packet/af_packet.c:2973
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xd7/0x130 net/socket.c:632
 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2115
 __sys_sendmmsg+0x1bf/0x4e0 net/socket.c:2210
 __do_sys_sendmmsg net/socket.c:2239 [inline]
 __se_sys_sendmmsg net/socket.c:2236 [inline]
 __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2236
 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4489e9
Code: e8 6c 10 03 00 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 ab 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f4ce8044ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00000000006e49f8 RCX: 00000000004489e9
RDX: 0400000000000328 RSI: 0000000020008a80 RDI: 0000000000000003
RBP: 00000000006e49f0 R08: 00007f4ce8045700 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006e49fc
R13: 00007fffef4a20af R14: 00007f4ce80459c0 R15: 0000000000000005
Modules linked in:
---[ end trace 821cbe90373f254e ]---
RIP: 0010:packet_lookup_frame+0x8d/0x270 net/packet/af_packet.c:482
Code: c1 ee 03 f7 73 0c 80 3c 0e 00 0f 85 cb 01 00 00 48 8b 0b 89 c0 4c 8d 24 c1 48 b8 00 00 00 00 00 fc ff df 4c 89 e1 48 c1 e9 03 <80> 3c 01 00 0f 85 94 01 00 00 48 8d 7b 10 4d 8b 3c 24 48 b8 00 00
RSP: 0018:ffff8880960ff7c8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888092b80ad0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 1ffff1101257015a RDI: ffff888092b80adc
RBP: ffff8880960ff7f8 R08: ffff88808036a640 R09: 0000000000000001
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: 0000000000000000
R13: 0000000000000001 R14: ffff888092b80580 R15: dffffc0000000000
FS:  00007f4ce8045700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000040 CR3: 00000000920d9000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/08/13 23:33 linux-4.19.y 893af1c79e42 74d61399 .config console log report syz C ci2-linux-4-19
* Struck through repros no longer work on HEAD.