syzbot


WARNING in __sk_msg_free

Status: fixed on 2024/01/30 15:47
Subsystems: bpf net
[Documentation on labels]
Reported-by: syzbot+f2977222e0e95cec15c8@syzkaller.appspotmail.com
Fix commit: dc9dfc8dc629 net: tls, fix WARNIING in __sk_msg_free
First crash: 114d, last: 113d
Cause bisection: introduced by (bisect log) :
commit fe1e81d4f73b6cbaed4fcc476960d26770642842
Author: David Howells <dhowells@redhat.com>
Date: Wed Jun 7 18:19:17 2023 +0000

  tls/sw: Support MSG_SPLICE_PAGES

Crash: WARNING in __sk_msg_free (log)
Repro: C syz .config
  
Discussions (4)
Title Replies (including bot) Last reply
[PATCH net v2 1/2] net: tls, fix WARNIING in __sk_msg_free 1 (1) 2024/01/13 00:32
[PATCH net 1/2] net: tls, fix WARNIING in __sk_msg_free 1 (1) 2024/01/10 22:01
[PATCH] tls: fix WARNING in __sk_msg_free 3 (3) 2024/01/10 07:53
[syzbot] [bpf?] [net?] WARNING in __sk_msg_free 1 (3) 2024/01/09 18:17
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/01/09 05:35 19m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5071 at include/linux/skmsg.h:137 sk_msg_check_to_free include/linux/skmsg.h:137 [inline]
WARNING: CPU: 0 PID: 5071 at include/linux/skmsg.h:137 sk_msg_check_to_free include/linux/skmsg.h:135 [inline]
WARNING: CPU: 0 PID: 5071 at include/linux/skmsg.h:137 __sk_msg_free+0x29f/0x390 net/core/skmsg.c:203
Modules linked in:
CPU: 0 PID: 5071 Comm: syz-executor413 Not tainted 6.7.0-rc8-syzkaller-00024-gac865f00af29 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:sk_msg_check_to_free include/linux/skmsg.h:137 [inline]
RIP: 0010:sk_msg_check_to_free include/linux/skmsg.h:135 [inline]
RIP: 0010:__sk_msg_free+0x29f/0x390 net/core/skmsg.c:203
Code: 00 00 48 83 e0 fe 48 83 c8 02 49 89 85 40 02 00 00 8b 44 24 0c 48 83 c4 30 5b 5d 41 5c 41 5d 41 5e 41 5f c3 e8 a2 77 00 f9 90 <0f> 0b 90 e8 99 77 00 f9 48 63 5c 24 08 48 83 fb 13 0f 87 9d 00 00
RSP: 0018:ffffc90003bc78e8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 000000000000000e RCX: ffffffff8886f9ff
RDX: ffff8880176d1dc0 RSI: ffffffff8886faae RDI: 0000000000000005
RBP: 000000000000000e R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000036 R11: 0000000000000002 R12: 0000000000000036
R13: ffff8880765d0018 R14: 0000000000000007 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa774910a18 CR3: 000000000cd77000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 tls_free_rec net/tls/tls_sw.c:359 [inline]
 tls_free_open_rec net/tls/tls_sw.c:370 [inline]
 tls_sw_release_resources_tx+0x4e8/0x6f0 net/tls/tls_sw.c:2467
 tls_sk_proto_cleanup net/tls/tls_main.c:352 [inline]
 tls_sk_proto_close+0x678/0xac0 net/tls/tls_main.c:382
 inet_release+0x132/0x270 net/ipv4/af_inet.c:433
 inet6_release+0x4f/0x70 net/ipv6/af_inet6.c:485
 __sock_release+0xae/0x260 net/socket.c:659
 sock_close+0x1c/0x20 net/socket.c:1419
 __fput+0x270/0xb70 fs/file_table.c:394
 task_work_run+0x14d/0x240 kernel/task_work.c:180
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0xa8a/0x2ad0 kernel/exit.c:869
 do_group_exit+0xd4/0x2a0 kernel/exit.c:1018
 get_signal+0x23b5/0x2790 kernel/signal.c:2904
 arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:309
 exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
 exit_to_user_mode_prepare+0x121/0x240 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x1e/0x60 kernel/entry/common.c:296
 do_syscall_64+0x4d/0x110 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fa7748b9e39
Code: Unable to access opcode bytes at 0x7fa7748b9e0f.
RSP: 002b:00007fa77487c218 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: 0000000000010000 RBX: 00007fa774943328 RCX: 00007fa7748b9e39
RDX: 00000000fffffecc RSI: 0000000020000100 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa774943320
R13: 0000000000000000 R14: 00007fa774911004 R15: 34ea337571a66fd8
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/04 08:13 upstream ac865f00af29 28c42cff .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in __sk_msg_free
2024/01/04 04:27 net 01b2885d9415 28c42cff .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in __sk_msg_free
2024/01/04 01:34 net-next 2ab1efad60ad 28c42cff .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in __sk_msg_free
2024/01/04 01:00 net-next 2ab1efad60ad 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in __sk_msg_free
* Struck through repros no longer work on HEAD.