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: 16d, last: 16d
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
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/04/26 07:11 1m fix candidate upstream error job log (0)

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

stack backtrace:
CPU: 0 PID: 4325 Comm: syz-executor326 Not tainted 5.15.155-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
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:6382 [inline]
 debug_check_no_locks_freed+0x27c/0x300 kernel/locking/lockdep.c:6415
 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:1897 [inline]
 __sk_destruct+0x408/0x600 net/core/sock.c:1985
 sk_destruct net/core/sock.c:2000 [inline]
 __sk_free+0x37c/0x4e8 net/core/sock.c:2011
 sk_free+0x68/0xdc net/core/sock.c:2022
 sock_put include/net/sock.h:1913 [inline]
 mptcp_retransmit_timer+0x198/0x2bc net/mptcp/protocol.c:2174
 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
 __do_softirq+0x344/0xdb0 kernel/softirq.c:558
 do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
 invoke_softirq kernel/softirq.c:439 [inline]
 __irq_exit_rcu+0x264/0x4d4 kernel/softirq.c:637
 irq_exit+0x14/0x88 kernel/softirq.c:661
 handle_domain_irq+0xf4/0x178 kernel/irq/irqdesc.c:710
 gic_handle_irq+0x78/0x1c8 drivers/irqchip/irq-gic-v3.c:758
 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:580
 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:3136
 mptcp_reset_rtx_timer net/mptcp/protocol.c:848 [inline]
 __mptcp_push_pending+0x6a8/0x85c net/mptcp/protocol.c:1645
 mptcp_sendmsg+0x1544/0x1a1c net/mptcp/protocol.c:1828
 inet_sendmsg+0x15c/0x290 net/ipv4/af_inet.c:828
 sock_sendmsg_nosec net/socket.c:704 [inline]
 __sock_sendmsg net/socket.c:716 [inline]
 ____sys_sendmsg+0x584/0x870 net/socket.c:2431
 ___sys_sendmsg+0x214/0x294 net/socket.c:2485
 __sys_sendmsg net/socket.c:2514 [inline]
 __do_sys_sendmsg net/socket.c:2523 [inline]
 __se_sys_sendmsg net/socket.c:2521 [inline]
 __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2521
 __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
IPv4: Attempt to release TCP socket in state 8 0000000000aabff1

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.