From: syzbot <syzbot+f3a31fb909db9b2a5c4d@syzkaller.appspotmail.com>
To: eadavis@qq.com, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mptcp?] KASAN: slab-use-after-free Read in __timer_delete_sync
Date: Tue, 03 Sep 2024 07:24:03 -0700 [thread overview]
Message-ID: <00000000000037c3da062137cf02@google.com> (raw)
In-Reply-To: <tencent_DF6D237A296523A8E45177687763C6C2B305@qq.com>
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in remove_anno_list_by_saddr
============================================
WARNING: possible recursive locking detected
6.11.0-rc6-syzkaller-00019-g67784a74e258-dirty #0 Not tainted
--------------------------------------------
syz.1.16/6115 is trying to acquire lock:
ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: mptcp_pm_del_add_timer net/mptcp/pm_netlink.c:338 [inline]
ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: remove_anno_list_by_saddr+0x24/0x190 net/mptcp/pm_netlink.c:1464
but task is already holding lock:
ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: mptcp_pm_remove_addrs_and_subflows net/mptcp/pm_netlink.c:1682 [inline]
ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: mptcp_nl_remove_addrs_list net/mptcp/pm_netlink.c:1719 [inline]
ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: mptcp_pm_nl_flush_addrs_doit+0x509/0xd80 net/mptcp/pm_netlink.c:1760
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&msk->pm.lock);
lock(&msk->pm.lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
4 locks held by syz.1.16/6115:
#0: ffffffff8fcf14b0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 net/netlink/genetlink.c:1218
#1: ffffffff8fcf1368 (genl_mutex){+.+.}-{3:3}, at: genl_lock net/netlink/genetlink.c:35 [inline]
#1: ffffffff8fcf1368 (genl_mutex){+.+.}-{3:3}, at: genl_op_lock net/netlink/genetlink.c:60 [inline]
#1: ffffffff8fcf1368 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg+0x121/0xec0 net/netlink/genetlink.c:1209
#2: ffff888028c10e98 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1607 [inline]
#2: ffff888028c10e98 (sk_lock-AF_INET6){+.+.}-{0:0}, at: mptcp_nl_remove_addrs_list net/mptcp/pm_netlink.c:1718 [inline]
#2: ffff888028c10e98 (sk_lock-AF_INET6){+.+.}-{0:0}, at: mptcp_pm_nl_flush_addrs_doit+0x4d0/0xd80 net/mptcp/pm_netlink.c:1760
#3: ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
#3: ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: mptcp_pm_remove_addrs_and_subflows net/mptcp/pm_netlink.c:1682 [inline]
#3: ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: mptcp_nl_remove_addrs_list net/mptcp/pm_netlink.c:1719 [inline]
#3: ffff888028c116a0 (&msk->pm.lock){+.-.}-{2:2}, at: mptcp_pm_nl_flush_addrs_doit+0x509/0xd80 net/mptcp/pm_netlink.c:1760
stack backtrace:
CPU: 0 UID: 0 PID: 6115 Comm: syz.1.16 Not tainted 6.11.0-rc6-syzkaller-00019-g67784a74e258-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:93 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
check_deadlock kernel/locking/lockdep.c:3061 [inline]
validate_chain+0x15d3/0x5900 kernel/locking/lockdep.c:3855
__lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
_raw_spin_lock_bh+0x35/0x50 kernel/locking/spinlock.c:178
spin_lock_bh include/linux/spinlock.h:356 [inline]
mptcp_pm_del_add_timer net/mptcp/pm_netlink.c:338 [inline]
remove_anno_list_by_saddr+0x24/0x190 net/mptcp/pm_netlink.c:1464
mptcp_pm_remove_addrs_and_subflows net/mptcp/pm_netlink.c:1689 [inline]
mptcp_nl_remove_addrs_list net/mptcp/pm_netlink.c:1719 [inline]
mptcp_pm_nl_flush_addrs_doit+0x689/0xd80 net/mptcp/pm_netlink.c:1760
genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline]
genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline]
genl_rcv_msg+0xb14/0xec0 net/netlink/genetlink.c:1210
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219
netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:745
____sys_sendmsg+0x525/0x7d0 net/socket.c:2597
___sys_sendmsg net/socket.c:2651 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680
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:0x7fb336579eb9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb3372d5038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fb336715f80 RCX: 00007fb336579eb9
RDX: 0000000001000000 RSI: 0000000020000300 RDI: 0000000000000003
RBP: 00007fb3365e793e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fb336715f80 R15: 00007fb33683fa28
</TASK>
Tested on:
commit: 67784a74 Merge tag 'ata-6.11-rc7' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13ab2a8f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=660f6eb11f9c7dc5
dashboard link: https://syzkaller.appspot.com/bug?extid=f3a31fb909db9b2a5c4d
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=1377f28f980000
next prev parent reply other threads:[~2024-09-03 14:24 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 13:13 [syzbot] [mptcp?] KASAN: slab-use-after-free Read in __timer_delete_sync syzbot
2024-09-03 13:43 ` Edward Adam Davis
2024-09-03 14:09 ` syzbot
2024-09-03 13:52 ` Edward Adam Davis
2024-09-03 14:24 ` syzbot [this message]
2024-09-03 15:09 ` [PATCH] mptcp: pm: Fix uaf " Edward Adam Davis
2024-09-03 15:18 ` Eric Dumazet
2024-09-04 0:52 ` Edward Adam Davis
2024-09-04 1:01 ` [PATCH V2] " Edward Adam Davis
2024-09-04 1:52 ` MPTCP CI
2024-09-04 20:39 ` Matthieu Baerts
2024-09-05 12:27 ` [PATCH net v3] " Edward Adam Davis
2024-09-05 13:20 ` MPTCP CI
2024-09-05 14:52 ` MPTCP CI
2024-09-06 18:55 ` Matthieu Baerts
2024-09-06 22:02 ` Jakub Kicinski
2024-09-09 7:01 ` Matthieu Baerts
2024-09-09 13:07 ` Paolo Abeni
2024-09-10 3:59 ` Edward Adam Davis
2024-09-10 9:58 ` [PATCH V4] " Edward Adam Davis
2024-09-10 10:54 ` MPTCP CI
2024-09-10 9:58 ` [PATCH net " Edward Adam Davis
2024-09-10 10:51 ` MPTCP CI
2024-09-10 11:27 ` Paolo Abeni
2024-09-10 14:29 ` Matthieu Baerts
2024-09-11 23:20 ` patchwork-bot+netdevbpf
2024-09-05 12:35 ` [PATCH V2] " Edward Adam Davis
2024-09-03 16:03 ` [PATCH] " MPTCP CI
2024-09-04 0:20 ` [syzbot] [mptcp?] KASAN: slab-use-after-free Read " Edward Adam Davis
2024-09-04 0:42 ` syzbot
2024-09-04 17:05 ` [PATCH net] mptcp: pm: Fix uaf " Matthieu Baerts (NGI0)
2024-09-05 0:46 ` [syzbot] [mptcp?] KASAN: slab-use-after-free Read " syzbot
2024-09-04 17:45 ` [PATCH net v2] mptcp: pm: Fix uaf " Matthieu Baerts (NGI0)
2024-09-05 1:10 ` [syzbot] [mptcp?] KASAN: slab-use-after-free Read " syzbot
2024-09-10 3:54 ` Edward Adam Davis
2024-09-10 6:56 ` syzbot
2024-09-10 7:10 ` Edward Adam Davis
2024-09-10 7:43 ` syzbot
2024-09-10 8:03 ` Edward Adam Davis
2024-09-10 8:32 ` syzbot
2024-09-10 9:32 ` Edward Adam Davis
2024-09-10 9:57 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00000000000037c3da062137cf02@google.com \
--to=syzbot+f3a31fb909db9b2a5c4d@syzkaller.appspotmail.com \
--cc=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.