[v5.15] WARNING: held lock freed in inet_sendmsg

0 views
Skip to first unread message

syzbot

unread,
Apr 16, 2024, 8:05:23 AMApr 16
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: fa3df276cd36 Linux 5.15.155
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1559561b180000
kernel config: https://syzkaller.appspot.com/x/.config?x=fa45dfd65a261480
dashboard link: https://syzkaller.appspot.com/bug?extid=7c9d92726730e11c0263
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=171044f7180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14d908e7180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0dc19fc63531/disk-fa3df276.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/fae4c89e243a/vmlinux-fa3df276.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a5c832fcb939/Image-fa3df276.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+7c9d92...@syzkaller.appspotmail.com

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


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages