syzbot


kernel BUG in vlan_get_protocol_dgram

Status: upstream: reported C repro on 2024/12/30 16:04
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+74f70bb1cb968bf09e4f@syzkaller.appspotmail.com
Fix commit: f91a5b808938 af_packet: fix vlan_get_protocol_dgram() vs MSG_PEEK
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-snapshot-upstream-root ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce], missing on: [ci-qemu-native-arm64-kvm ci-qemu2-arm32 ci-qemu2-riscv64 ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-linux-next-kasan-gce-root ci2-upstream-usb]
First crash: 8d08h, last: 5d02h
Cause bisection: introduced by (bisect log) :
commit 79eecf631c14e7f4057186570ac20e2cfac3802e
Author: Chengen Du <chengen.du@canonical.com>
Date: Sat Jul 13 11:47:35 2024 +0000

  af_packet: Handle outgoing VLAN packets without hardware offloading

Crash: kernel BUG in vlan_get_protocol_dgram (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH net] af_packet: fix vlan_get_tci() vs MSG_PEEK 6 (6) 2025/01/03 02:50
[syzbot] [net?] kernel BUG in vlan_get_protocol_dgram 0 (1) 2024/12/30 16:04
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 kernel BUG in vlan_get_protocol_dgram origin:upstream C 4 4d01h 21d 0/2 upstream: reported C repro on 2024/12/14 12:54
android-5-10 kernel BUG in vlan_get_protocol_dgram C 6 23d 107d 0/2 upstream: reported C repro on 2024/09/19 02:58
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/12/30 10:46 24m edumazet@google.com patch upstream OK log

Sample crash report:
skbuff: skb_under_panic: text:ffffffff8a8ccd05 len:29 put:14 head:ffff888025602700 data:ffff8880256026f4 tail:0x11 end:0x140 dev:<NULL>
------------[ cut here ]------------
kernel BUG at net/core/skbuff.c:206!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 10005 Comm: syz-executor152 Not tainted 6.13.0-rc4-syzkaller-00054-gd6ef8b40d075 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:skb_panic net/core/skbuff.c:206 [inline]
RIP: 0010:skb_under_panic+0x14b/0x150 net/core/skbuff.c:216
Code: 0b 8d 48 c7 c6 86 d5 25 8e 48 8b 54 24 08 8b 0c 24 44 8b 44 24 04 4d 89 e9 50 41 54 41 57 41 56 e8 5a 69 79 f7 48 83 c4 20 90 <0f> 0b 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3
RSP: 0018:ffffc9000d95f638 EFLAGS: 00010282
RAX: 0000000000000087 RBX: dffffc0000000000 RCX: 97309cfbc2e66a00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffff888024b26650 R08: ffffffff817f0a8c R09: 1ffff92001b2be60
R10: dffffc0000000000 R11: fffff52001b2be61 R12: 0000000000000140
R13: ffff888025602700 R14: ffff8880256026f4 R15: 0000000000000011
FS:  00007ffb18d046c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe3e555368 CR3: 00000000314d6000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 skb_push+0xe5/0x100 net/core/skbuff.c:2636
 vlan_get_protocol_dgram+0x165/0x290 net/packet/af_packet.c:585
 packet_recvmsg+0x948/0x1ef0 net/packet/af_packet.c:3552
 sock_recvmsg_nosec net/socket.c:1033 [inline]
 sock_recvmsg+0x22f/0x280 net/socket.c:1055
 ____sys_recvmsg+0x1c6/0x480 net/socket.c:2803
 ___sys_recvmsg net/socket.c:2845 [inline]
 do_recvmmsg+0x426/0xab0 net/socket.c:2940
 __sys_recvmmsg net/socket.c:3014 [inline]
 __do_sys_recvmmsg net/socket.c:3037 [inline]
 __se_sys_recvmmsg net/socket.c:3030 [inline]
 __x64_sys_recvmmsg+0x199/0x250 net/socket.c:3030
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ffb18d6ad19
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 00 00 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffb18d04218 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007ffb18df5418 RCX: 00007ffb18d6ad19
RDX: 0400000000000179 RSI: 0000000020000480 RDI: 0000000000000003
RBP: 00007ffb18df5410 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000010022 R11: 0000000000000246 R12: 00007ffb18dc2074
R13: 83a88896d4b9b107 R14: 07c6c9333d389ca9 R15: 0400000000000179
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:skb_panic net/core/skbuff.c:206 [inline]
RIP: 0010:skb_under_panic+0x14b/0x150 net/core/skbuff.c:216
Code: 0b 8d 48 c7 c6 86 d5 25 8e 48 8b 54 24 08 8b 0c 24 44 8b 44 24 04 4d 89 e9 50 41 54 41 57 41 56 e8 5a 69 79 f7 48 83 c4 20 90 <0f> 0b 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3
RSP: 0018:ffffc9000d95f638 EFLAGS: 00010282
RAX: 0000000000000087 RBX: dffffc0000000000 RCX: 97309cfbc2e66a00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffff888024b26650 R08: ffffffff817f0a8c R09: 1ffff92001b2be60
R10: dffffc0000000000 R11: fffff52001b2be61 R12: 0000000000000140
R13: ffff888025602700 R14: ffff8880256026f4 R15: 0000000000000011
FS:  00007ffb18d046c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe3e555368 CR3: 00000000314d6000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/27 20:06 upstream d6ef8b40d075 d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce kernel BUG in vlan_get_protocol_dgram
2024/12/27 18:46 upstream d6ef8b40d075 d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce kernel BUG in vlan_get_protocol_dgram
2024/12/27 17:08 upstream d6ef8b40d075 d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce kernel BUG in vlan_get_protocol_dgram
2024/12/30 21:44 net-next 9268abe611b0 d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce kernel BUG in vlan_get_protocol_dgram
2024/12/30 16:47 net-next 9268abe611b0 d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce kernel BUG in vlan_get_protocol_dgram
2024/12/30 10:46 net-next 9268abe611b0 d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce kernel BUG in vlan_get_protocol_dgram
2024/12/30 08:54 net-next 9268abe611b0 d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce kernel BUG in vlan_get_protocol_dgram
2024/12/27 15:49 upstream d6ef8b40d075 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce kernel BUG in vlan_get_protocol_dgram
* Struck through repros no longer work on HEAD.