syzbot


WARNING: held lock freed in inet_sendmsg

Status: upstream: reported C repro on 2024/04/16 12:05
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+7c9d92726730e11c0263@syzkaller.appspotmail.com
First crash: 370d, last: 11d
Bug presence (2)
Date Name Commit Repro Result
2024/04/16 linux-5.15.y (ToT) fa3df276cd36 C [report] WARNING: held lock freed in inet_sendmsg
2024/04/16 upstream (ToT) 96fca68c4fbf C Didn't crash
Last patch testing requests (4)
Created Duration User Patch Repo Result
2025/04/10 18:32 18m retest repro linux-5.15.y report log
2025/02/26 01:07 14m retest repro linux-5.15.y report log
2024/12/17 22:38 14m retest repro linux-5.15.y report log
2024/10/05 19:08 16m retest repro linux-5.15.y report log
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2025/02/14 09:05 5m fix candidate upstream error job log
2024/12/22 12:43 1m fix candidate upstream error job log
2024/11/19 04:23 1m fix candidate upstream error job log
2024/10/15 05:48 0m fix candidate upstream error job log
2024/04/26 07:11 1m fix candidate upstream error job log

Sample crash report:
IPv4: Attempt to release TCP socket in state 8 00000000dcfa1b77
=========================
WARNING: held lock freed!
5.15.179-syzkaller #0 Not tainted
-------------------------
syz-executor382/14421 is freeing memory ffff0000cda1ae00-ffff0000cda1b8df, with a lock still held there!
ffff0000cda1af20 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_sendmsg+0x15c/0x290 net/ipv4/af_inet.c:834
2 locks held by syz-executor382/14421:
 #0: ffff0000cda1af20 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_sendmsg+0x15c/0x290 net/ipv4/af_inet.c:834
 #1: ffff800008017ba0 ((&msk->sk.icsk_retransmit_timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:45 [inline]
 #1: ffff800008017ba0 ((&msk->sk.icsk_retransmit_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd0/0x8f0 kernel/time/timer.c:1441

stack backtrace:
CPU: 1 PID: 14421 Comm: syz-executor382 Not tainted 5.15.179-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call trace:
 dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 print_freed_lock_bug kernel/locking/lockdep.c:6398 [inline]
 debug_check_no_locks_freed+0x27c/0x300 kernel/locking/lockdep.c:6431
 slab_free_hook mm/slub.c:1677 [inline]
 slab_free_freelist_hook+0x88/0x1ec mm/slub.c:1731
 slab_free mm/slub.c:3499 [inline]
 kmem_cache_free+0xdc/0x3c4 mm/slub.c:3515
 sk_prot_free net/core/sock.c:1900 [inline]
 __sk_destruct+0x40c/0x604 net/core/sock.c:1988
 sk_destruct net/core/sock.c:2003 [inline]
 __sk_free+0x388/0x4f4 net/core/sock.c:2014
 sk_free+0x68/0xdc net/core/sock.c:2025
 sock_put include/net/sock.h:1929 [inline]
 mptcp_retransmit_timer+0x198/0x2bc net/mptcp/protocol.c:2192
 call_timer_fn+0x19c/0x8f0 kernel/time/timer.c:1451
 expire_timers kernel/time/timer.c:1496 [inline]
 __run_timers+0x554/0x718 kernel/time/timer.c:1767
 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1780
 handle_softirqs+0x384/0xdbc kernel/softirq.c:558
 __do_softirq kernel/softirq.c:592 [inline]
 do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
 invoke_softirq kernel/softirq.c:439 [inline]
 __irq_exit_rcu+0x268/0x4d8 kernel/softirq.c:641
 irq_exit+0x14/0x88 kernel/softirq.c:665
 handle_domain_irq+0x14c/0x1fc kernel/irq/irqdesc.c:711
 gic_handle_irq+0x78/0x1c8 drivers/irqchip/irq-gic-v3.c:765
 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:899
 do_interrupt_handler+0x74/0x94 arch/arm64/kernel/entry-common.c:267
 el1_interrupt+0x30/0x58 arch/arm64/kernel/entry-common.c:454
 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:470
 el1h_64_irq+0x78/0x7c arch/arm64/kernel/entry.S:522
 arch_local_irq_restore arch/arm64/include/asm/irqflags.h:122 [inline]
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
 _raw_spin_unlock_irqrestore+0xbc/0x158 kernel/locking/spinlock.c:194
 __mod_timer+0x960/0xd30 kernel/time/timer.c:1065
 mod_timer+0x2c/0x3c kernel/time/timer.c:1113
 sk_reset_timer+0x30/0xfc net/core/sock.c:3139
 mptcp_reset_rtx_timer net/mptcp/protocol.c:863 [inline]
 __mptcp_push_pending+0x6a8/0x85c net/mptcp/protocol.c:1662
 mptcp_sendmsg+0x1544/0x1a1c net/mptcp/protocol.c:1845
 inet_sendmsg+0x15c/0x290 net/ipv4/af_inet.c:834
 sock_sendmsg_nosec net/socket.c:704 [inline]
 __sock_sendmsg net/socket.c:716 [inline]
 ____sys_sendmsg+0x584/0x870 net/socket.c:2436
 ___sys_sendmsg+0x214/0x294 net/socket.c:2490
 __sys_sendmsg net/socket.c:2519 [inline]
 __do_sys_sendmsg net/socket.c:2528 [inline]
 __se_sys_sendmsg net/socket.c:2526 [inline]
 __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2526
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/27 12:34 linux-5.15.y 0c935c049b5c 20510e88 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 WARNING: held lock freed in inet_sendmsg
2024/04/16 12:04 linux-5.15.y fa3df276cd36 0d592ce4 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 WARNING: held lock freed in inet_sendmsg
* Struck through repros no longer work on HEAD.