* [syzbot] [net?] possible deadlock in gtp_encap_enable_socket
@ 2024-09-23 15:46 syzbot
2024-10-01 0:57 ` [syzbot] test syzbot
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: syzbot @ 2024-09-23 15:46 UTC (permalink / raw)
To: davem, edumazet, kuba, laforge, linux-kernel, netdev,
osmocom-net-gprs, pabeni, pablo, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 9410645520e9 Merge tag 'net-next-6.12' of git://git.kernel..
git tree: net-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=15d39e9f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=37c006d80708398d
dashboard link: https://syzkaller.appspot.com/bug?extid=e953a8f3071f5c0a28fd
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16215ca9980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=110c6c27980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/80466d230dfb/disk-94106455.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ba253eabab42/vmlinux-94106455.xz
kernel image: https://storage.googleapis.com/syzbot-assets/569982fb6c88/bzImage-94106455.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
IPVS: Unknown mcast interface: macvlan0
netlink: 8 bytes leftover after parsing attributes in process `syz-executor297'.
netlink: 24 bytes leftover after parsing attributes in process `syz-executor297'.
======================================================
WARNING: possible circular locking dependency detected
6.11.0-syzkaller-01458-g9410645520e9 #0 Not tainted
------------------------------------------------------
syz-executor297/5243 is trying to acquire lock:
ffff88801cf99158 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1609 [inline]
ffff88801cf99158 (sk_lock-AF_INET){+.+.}-{0:0}, at: gtp_encap_enable_socket+0x2ce/0x5c0 drivers/net/gtp.c:1674
but task is already holding lock:
ffffffff8fc88588 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
ffffffff8fc88588 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6643
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (rtnl_mutex){+.+.}-{3:3}:
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
__mutex_lock_common kernel/locking/mutex.c:608 [inline]
__mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
start_sync_thread+0xdc/0x2dc0 net/netfilter/ipvs/ip_vs_sync.c:1761
do_ip_vs_set_ctl+0x442/0x13d0 net/netfilter/ipvs/ip_vs_ctl.c:2732
nf_setsockopt+0x295/0x2c0 net/netfilter/nf_sockopt.c:101
smc_setsockopt+0x275/0xe50 net/smc/af_smc.c:3064
do_sock_setsockopt+0x3af/0x720 net/socket.c:2330
__sys_setsockopt+0x1ae/0x250 net/socket.c:2353
__do_sys_setsockopt net/socket.c:2362 [inline]
__se_sys_setsockopt net/socket.c:2359 [inline]
__x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2359
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
-> #1 (&smc->clcsock_release_lock){+.+.}-{3:3}:
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
__mutex_lock_common kernel/locking/mutex.c:608 [inline]
__mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
smc_switch_to_fallback+0x35/0xdb0 net/smc/af_smc.c:902
smc_sendmsg+0x11f/0x530 net/smc/af_smc.c:2771
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:745
____sys_sendmsg+0x525/0x7d0 net/socket.c:2603
___sys_sendmsg net/socket.c:2657 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2686
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
-> #0 (sk_lock-AF_INET){+.+.}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3133 [inline]
check_prevs_add kernel/locking/lockdep.c:3252 [inline]
validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868
__lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
lock_sock_nested+0x48/0x100 net/core/sock.c:3611
lock_sock include/net/sock.h:1609 [inline]
gtp_encap_enable_socket+0x2ce/0x5c0 drivers/net/gtp.c:1674
gtp_encap_enable drivers/net/gtp.c:1707 [inline]
gtp_newlink+0x589/0xf30 drivers/net/gtp.c:1511
rtnl_newlink_create net/core/rtnetlink.c:3510 [inline]
__rtnl_newlink net/core/rtnetlink.c:3730 [inline]
rtnl_newlink+0x1591/0x20a0 net/core/rtnetlink.c:3743
rtnetlink_rcv_msg+0x73f/0xcf0 net/core/rtnetlink.c:6646
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
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:2603
___sys_sendmsg net/socket.c:2657 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2686
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
other info that might help us debug this:
Chain exists of:
sk_lock-AF_INET --> &smc->clcsock_release_lock --> rtnl_mutex
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(rtnl_mutex);
lock(&smc->clcsock_release_lock);
lock(rtnl_mutex);
lock(sk_lock-AF_INET);
*** DEADLOCK ***
1 lock held by syz-executor297/5243:
#0: ffffffff8fc88588 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
#0: ffffffff8fc88588 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6643
stack backtrace:
CPU: 0 UID: 0 PID: 5243 Comm: syz-executor297 Not tainted 6.11.0-syzkaller-01458-g9410645520e9 #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_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2186
check_prev_add kernel/locking/lockdep.c:3133 [inline]
check_prevs_add kernel/locking/lockdep.c:3252 [inline]
validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868
__lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
lock_sock_nested+0x48/0x100 net/core/sock.c:3611
lock_sock include/net/sock.h:1609 [inline]
gtp_encap_enable_socket+0x2ce/0x5c0 drivers/net/gtp.c:1674
gtp_encap_enable drivers/net/gtp.c:1707 [inline]
gtp_newlink+0x589/0xf30 drivers/net/gtp.c:1511
rtnl_newlink_create net/core/rtnetlink.c:3510 [inline]
__rtnl_newlink net/core/rtnetlink.c:3730 [inline]
rtnl_newlink+0x1591/0x20a0 net/core/rtnetlink.c:3743
rtnetlink_rcv_msg+0x73f/0xcf0 net/core/rtnetlink.c:6646
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
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:2603
___sys_sendmsg net/socket.c:2657 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2686
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:0x7fed198844a9
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RS
---
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 syzkaller@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] test
2024-09-23 15:46 [syzbot] [net?] possible deadlock in gtp_encap_enable_socket syzbot
@ 2024-10-01 0:57 ` syzbot
2024-10-05 2:39 ` [syzbot] patch test syzbot
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-10-01 0:57 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: test
Author: danielyangkang@gmail.com
#syz test
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] [net?] possible deadlock in gtp_encap_enable_socket
[not found] <CAGiJo8TzPyoxUoTV=48uowQPPywbCZ6X1fRRF5KGYFJyhkY5_A@mail.gmail.com>
@ 2024-10-01 1:20 ` syzbot
0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-10-01 1:20 UTC (permalink / raw)
To: danielyangkang, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
Tested-by: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
Tested on:
commit: c824deb1 cxgb4: clip_tbl: Fix spelling mistake "wont" ..
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=17aaf127980000
kernel config: https://syzkaller.appspot.com/x/.config?x=b2d4fdf18a83ec0b
dashboard link: https://syzkaller.appspot.com/bug?extid=e953a8f3071f5c0a28fd
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=10257d07980000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] patch test
2024-09-23 15:46 [syzbot] [net?] possible deadlock in gtp_encap_enable_socket syzbot
2024-10-01 0:57 ` [syzbot] test syzbot
@ 2024-10-05 2:39 ` syzbot
2024-10-05 9:28 ` [syzbot] [net?] possible deadlock in gtp_encap_enable_socket Hillf Danton
2024-10-30 12:02 ` Pablo Neira Ayuso
3 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-10-05 2:39 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: patch test
Author: danielyangkang@gmail.com
#syz test
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] [net?] possible deadlock in gtp_encap_enable_socket
[not found] <CAGiJo8QbFa1ygs7e3T8uZbvRb+e-+Eu8UBef1k6ZLkr5eJ3x1Q@mail.gmail.com>
@ 2024-10-05 3:36 ` syzbot
0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-10-05 3:36 UTC (permalink / raw)
To: danielyangkang, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
Tested-by: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
Tested on:
commit: d521db38 Merge branch 'net-switch-back-to-struct-platf..
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=178f1bd0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f95955e3f7b5790c
dashboard link: https://syzkaller.appspot.com/bug?extid=e953a8f3071f5c0a28fd
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=17cb1bd0580000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] [net?] possible deadlock in gtp_encap_enable_socket
2024-09-23 15:46 [syzbot] [net?] possible deadlock in gtp_encap_enable_socket syzbot
2024-10-01 0:57 ` [syzbot] test syzbot
2024-10-05 2:39 ` [syzbot] patch test syzbot
@ 2024-10-05 9:28 ` Hillf Danton
2024-10-05 9:57 ` syzbot
2024-10-30 12:02 ` Pablo Neira Ayuso
3 siblings, 1 reply; 8+ messages in thread
From: Hillf Danton @ 2024-10-05 9:28 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
On Mon, 23 Sep 2024 08:46:24 -0700
> syzbot found the following issue on:
>
> HEAD commit: 9410645520e9 Merge tag 'net-next-6.12' of git://git.kernel..
> git tree: net-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=110c6c27980000
#syz test
--- x/net/smc/af_smc.c
+++ y/net/smc/af_smc.c
@@ -3053,9 +3053,7 @@ int smc_setsockopt(struct socket *sock,
/* generic setsockopts reaching us here always apply to the
* CLC socket
*/
- mutex_lock(&smc->clcsock_release_lock);
if (!smc->clcsock) {
- mutex_unlock(&smc->clcsock_release_lock);
return -EBADF;
}
if (unlikely(!smc->clcsock->ops->setsockopt))
@@ -3067,7 +3065,6 @@ int smc_setsockopt(struct socket *sock,
sk->sk_err = smc->clcsock->sk->sk_err;
sk_error_report(sk);
}
- mutex_unlock(&smc->clcsock_release_lock);
if (optlen < sizeof(int))
return -EINVAL;
@@ -3133,19 +3130,15 @@ int smc_getsockopt(struct socket *sock,
return __smc_getsockopt(sock, level, optname, optval, optlen);
smc = smc_sk(sock->sk);
- mutex_lock(&smc->clcsock_release_lock);
if (!smc->clcsock) {
- mutex_unlock(&smc->clcsock_release_lock);
return -EBADF;
}
/* socket options apply to the CLC socket */
if (unlikely(!smc->clcsock->ops->getsockopt)) {
- mutex_unlock(&smc->clcsock_release_lock);
return -EOPNOTSUPP;
}
rc = smc->clcsock->ops->getsockopt(smc->clcsock, level, optname,
optval, optlen);
- mutex_unlock(&smc->clcsock_release_lock);
return rc;
}
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] [net?] possible deadlock in gtp_encap_enable_socket
2024-10-05 9:28 ` [syzbot] [net?] possible deadlock in gtp_encap_enable_socket Hillf Danton
@ 2024-10-05 9:57 ` syzbot
0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-10-05 9:57 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
Tested-by: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
Tested on:
commit: d521db38 Merge branch 'net-switch-back-to-struct-platf..
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=167bd380580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f95955e3f7b5790c
dashboard link: https://syzkaller.appspot.com/bug?extid=e953a8f3071f5c0a28fd
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=13f0bbd0580000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] [net?] possible deadlock in gtp_encap_enable_socket
2024-09-23 15:46 [syzbot] [net?] possible deadlock in gtp_encap_enable_socket syzbot
` (2 preceding siblings ...)
2024-10-05 9:28 ` [syzbot] [net?] possible deadlock in gtp_encap_enable_socket Hillf Danton
@ 2024-10-30 12:02 ` Pablo Neira Ayuso
3 siblings, 0 replies; 8+ messages in thread
From: Pablo Neira Ayuso @ 2024-10-30 12:02 UTC (permalink / raw)
To: syzbot
Cc: davem, edumazet, kuba, laforge, linux-kernel, netdev,
osmocom-net-gprs, pabeni, syzkaller-bugs, wenjia, jaka, alibuda,
tonylu, guwen
Cc'ing SMC maintainers.
syzkaller combining layer is a crazy way to find crashes.
I think this is a false possible lockdep considers smc->clcsock_release_lock
is a lock of the same class sk_lock-AF_INET.
this can be solved with lockdep_set_class in af_smc?
Thanks.
On Mon, Sep 23, 2024 at 08:46:24AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 9410645520e9 Merge tag 'net-next-6.12' of git://git.kernel..
> git tree: net-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=15d39e9f980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=37c006d80708398d
> dashboard link: https://syzkaller.appspot.com/bug?extid=e953a8f3071f5c0a28fd
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16215ca9980000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=110c6c27980000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/80466d230dfb/disk-94106455.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/ba253eabab42/vmlinux-94106455.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/569982fb6c88/bzImage-94106455.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+e953a8f3071f5c0a28fd@syzkaller.appspotmail.com
>
> IPVS: Unknown mcast interface: macvlan0
> netlink: 8 bytes leftover after parsing attributes in process `syz-executor297'.
> netlink: 24 bytes leftover after parsing attributes in process `syz-executor297'.
> ======================================================
> WARNING: possible circular locking dependency detected
> 6.11.0-syzkaller-01458-g9410645520e9 #0 Not tainted
> ------------------------------------------------------
> syz-executor297/5243 is trying to acquire lock:
> ffff88801cf99158 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1609 [inline]
> ffff88801cf99158 (sk_lock-AF_INET){+.+.}-{0:0}, at: gtp_encap_enable_socket+0x2ce/0x5c0 drivers/net/gtp.c:1674
>
> but task is already holding lock:
> ffffffff8fc88588 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
> ffffffff8fc88588 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6643
>
> which lock already depends on the new lock.
>
>
> the existing dependency chain (in reverse order) is:
>
> -> #2 (rtnl_mutex){+.+.}-{3:3}:
> lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
> __mutex_lock_common kernel/locking/mutex.c:608 [inline]
> __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
> start_sync_thread+0xdc/0x2dc0 net/netfilter/ipvs/ip_vs_sync.c:1761
> do_ip_vs_set_ctl+0x442/0x13d0 net/netfilter/ipvs/ip_vs_ctl.c:2732
> nf_setsockopt+0x295/0x2c0 net/netfilter/nf_sockopt.c:101
> smc_setsockopt+0x275/0xe50 net/smc/af_smc.c:3064
> do_sock_setsockopt+0x3af/0x720 net/socket.c:2330
> __sys_setsockopt+0x1ae/0x250 net/socket.c:2353
> __do_sys_setsockopt net/socket.c:2362 [inline]
> __se_sys_setsockopt net/socket.c:2359 [inline]
> __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2359
> 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
>
> -> #1 (&smc->clcsock_release_lock){+.+.}-{3:3}:
> lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
> __mutex_lock_common kernel/locking/mutex.c:608 [inline]
> __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
> smc_switch_to_fallback+0x35/0xdb0 net/smc/af_smc.c:902
> smc_sendmsg+0x11f/0x530 net/smc/af_smc.c:2771
> sock_sendmsg_nosec net/socket.c:730 [inline]
> __sock_sendmsg+0x221/0x270 net/socket.c:745
> ____sys_sendmsg+0x525/0x7d0 net/socket.c:2603
> ___sys_sendmsg net/socket.c:2657 [inline]
> __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2686
> 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
>
> -> #0 (sk_lock-AF_INET){+.+.}-{0:0}:
> check_prev_add kernel/locking/lockdep.c:3133 [inline]
> check_prevs_add kernel/locking/lockdep.c:3252 [inline]
> validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868
> __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
> lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
> lock_sock_nested+0x48/0x100 net/core/sock.c:3611
> lock_sock include/net/sock.h:1609 [inline]
> gtp_encap_enable_socket+0x2ce/0x5c0 drivers/net/gtp.c:1674
> gtp_encap_enable drivers/net/gtp.c:1707 [inline]
> gtp_newlink+0x589/0xf30 drivers/net/gtp.c:1511
> rtnl_newlink_create net/core/rtnetlink.c:3510 [inline]
> __rtnl_newlink net/core/rtnetlink.c:3730 [inline]
> rtnl_newlink+0x1591/0x20a0 net/core/rtnetlink.c:3743
> rtnetlink_rcv_msg+0x73f/0xcf0 net/core/rtnetlink.c:6646
> netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
> 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:2603
> ___sys_sendmsg net/socket.c:2657 [inline]
> __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2686
> 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
>
> other info that might help us debug this:
>
> Chain exists of:
> sk_lock-AF_INET --> &smc->clcsock_release_lock --> rtnl_mutex
>
> Possible unsafe locking scenario:
>
> CPU0 CPU1
> ---- ----
> lock(rtnl_mutex);
> lock(&smc->clcsock_release_lock);
> lock(rtnl_mutex);
> lock(sk_lock-AF_INET);
>
> *** DEADLOCK ***
>
> 1 lock held by syz-executor297/5243:
> #0: ffffffff8fc88588 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
> #0: ffffffff8fc88588 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6643
>
> stack backtrace:
> CPU: 0 UID: 0 PID: 5243 Comm: syz-executor297 Not tainted 6.11.0-syzkaller-01458-g9410645520e9 #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_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2186
> check_prev_add kernel/locking/lockdep.c:3133 [inline]
> check_prevs_add kernel/locking/lockdep.c:3252 [inline]
> validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868
> __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
> lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
> lock_sock_nested+0x48/0x100 net/core/sock.c:3611
> lock_sock include/net/sock.h:1609 [inline]
> gtp_encap_enable_socket+0x2ce/0x5c0 drivers/net/gtp.c:1674
> gtp_encap_enable drivers/net/gtp.c:1707 [inline]
> gtp_newlink+0x589/0xf30 drivers/net/gtp.c:1511
> rtnl_newlink_create net/core/rtnetlink.c:3510 [inline]
> __rtnl_newlink net/core/rtnetlink.c:3730 [inline]
> rtnl_newlink+0x1591/0x20a0 net/core/rtnetlink.c:3743
> rtnetlink_rcv_msg+0x73f/0xcf0 net/core/rtnetlink.c:6646
> netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
> 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:2603
> ___sys_sendmsg net/socket.c:2657 [inline]
> __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2686
> 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:0x7fed198844a9
> Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
> RS
>
>
> ---
> 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 syzkaller@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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-10-30 12:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23 15:46 [syzbot] [net?] possible deadlock in gtp_encap_enable_socket syzbot
2024-10-01 0:57 ` [syzbot] test syzbot
2024-10-05 2:39 ` [syzbot] patch test syzbot
2024-10-05 9:28 ` [syzbot] [net?] possible deadlock in gtp_encap_enable_socket Hillf Danton
2024-10-05 9:57 ` syzbot
2024-10-30 12:02 ` Pablo Neira Ayuso
[not found] <CAGiJo8TzPyoxUoTV=48uowQPPywbCZ6X1fRRF5KGYFJyhkY5_A@mail.gmail.com>
2024-10-01 1:20 ` syzbot
[not found] <CAGiJo8QbFa1ygs7e3T8uZbvRb+e-+Eu8UBef1k6ZLkr5eJ3x1Q@mail.gmail.com>
2024-10-05 3:36 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).