syzbot


WARNING in sock_map_close (2)

Status: upstream: reported C repro on 2024/08/22 13:19
Subsystems: bpf net
[Documentation on labels]
Reported-by: syzbot+8dbe3133b840c470da0e@syzkaller.appspotmail.com
Fix commit: l2tp: avoid overriding sk->sk_user_data
Patched on: [ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 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-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 23d, last: 23d
Cause bisection: introduced by (bisect log) :
commit 4a4cd70369f162f819b7855b0eabcb2db21f01f4
Author: James Chapman <jchapman@katalix.com>
Date: Mon Jul 29 15:38:04 2024 +0000

  l2tp: don't set sk_user_data in tunnel socket

Crash: WARNING in sock_map_close (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[Patch net-next] l2tp: avoid overriding sk->sk_user_data 3 (3) 2024/08/26 17:10
[syzbot] [bpf?] [net?] WARNING in sock_map_close (2) 5 (11) 2024/08/24 23:51
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 WARNING in sock_map_close origin:upstream missing-backport C inconclusive 1 94d 153d 0/3 upstream: reported C repro on 2024/04/14 07:14
linux-6.1 WARNING in sock_map_close origin:upstream C 60 8d23h 163d 0/3 upstream: reported C repro on 2024/04/04 17:51
upstream WARNING in sock_map_close bpf net C error 182 95d 158d 25/28 fixed on 2024/06/11 03:41
Last patch testing requests (5)
Created Duration User Patch Repo Result
2024/08/24 23:35 15m hdanton@sina.com patch git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d785ed945de6 report log
2024/08/24 11:57 18m hdanton@sina.com patch git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d785ed945de6 report log
2024/08/24 10:38 18m hdanton@sina.com patch git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d785ed945de6 report log
2024/08/24 07:43 17m hdanton@sina.com patch git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d785ed945de6 report log
2024/08/23 10:47 15m hdanton@sina.com patch git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d785ed945de6 report log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5231 at net/core/sock_map.c:1699 sock_map_close+0x399/0x3d0 net/core/sock_map.c:1699
Modules linked in:
CPU: 0 UID: 0 PID: 5231 Comm: syz-executor309 Not tainted 6.11.0-rc3-syzkaller-00508-gd785ed945de6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:sock_map_close+0x399/0x3d0 net/core/sock_map.c:1699
Code: 48 89 df e8 e9 a3 5a f8 4c 8b 23 eb 05 e8 8f 5e f3 f7 e8 ba ea ff ff 4c 89 ef e8 82 e1 da ff e9 47 ff ff ff e8 78 5e f3 f7 90 <0f> 0b 90 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc
RSP: 0018:ffffc90002dbfb10 EFLAGS: 00010293
RAX: ffffffff89a02af8 RBX: ffffffff95312d30 RCX: ffff888023a09e00
RDX: 0000000000000000 RSI: ffffffff8c0ad560 RDI: ffffffff8c606900
RBP: 0000000000000000 R08: ffffffff937328e7 R09: 1ffffffff26e651c
R10: dffffc0000000000 R11: fffffbfff26e651d R12: ffffffff89a02760
R13: ffff88802ea81000 R14: dffffc0000000000 R15: ffffffff89a02791
FS:  0000000000000000(0000) GS:ffff8880b9200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1ca082bf78 CR3: 000000000e734000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 inet_release+0x17d/0x200 net/ipv4/af_inet.c:437
 __sock_release net/socket.c:659 [inline]
 sock_close+0xbc/0x240 net/socket.c:1421
 __fput+0x24a/0x8a0 fs/file_table.c:422
 task_work_run+0x24f/0x310 kernel/task_work.c:228
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0xa2f/0x27f0 kernel/exit.c:882
 do_group_exit+0x207/0x2c0 kernel/exit.c:1031
 __do_sys_exit_group kernel/exit.c:1042 [inline]
 __se_sys_exit_group kernel/exit.c:1040 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1040
 x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232
 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:0x7f1ca07e1d09
Code: Unable to access opcode bytes at 0x7f1ca07e1cdf.
RSP: 002b:00007fff02432038 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1ca07e1d09
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007f1ca085c2b0 R08: ffffffffffffffb8 R09: 0000000000000006
R10: 0000000000000006 R11: 0000000000000246 R12: 00007f1ca085c2b0
R13: 0000000000000000 R14: 00007f1ca085cd00 R15: 00007f1ca07b2f60
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/22 09:43 net-next d785ed945de6 ca02180f .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in sock_map_close
2024/08/22 08:25 net-next d785ed945de6 ca02180f .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in sock_map_close
2024/08/22 07:07 net-next d785ed945de6 ca02180f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in sock_map_close
* Struck through repros no longer work on HEAD.