WARNING: lock held when returning to user space in ethnl_act_cable_test
syzbot
syzbotHello,
syzbot found the following issue on:
HEAD commit: f9db28bb09f4 Merge branch 'net-redundant-judgments' git tree: net-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=115eb015980000 kernel config: https://syzkaller.appspot.com/x/.config?x=df2f0ed7e30a639d dashboard link: https://syzkaller.appspot.com/bug?extid=c641161e97237326ea74 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=17d2d609980000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1741fbf5980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/585e02f7fe7b/disk-f9db28bb.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b9faf5d24900/vmlinux-f9db28bb.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f9df5868ea4f/bzImage-f9db28bb.xz
The issue was bisected to:
commit 3688ff3077d3f334cee1d4b61d8bfb6a9508c2d2
Author: Maxime Chevallier <[email protected]> Date: Wed Aug 21 15:10:05 2024 +0000
net: ethtool: cable-test: Target the command to the requested PHY
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=146fcd8d980000 final oops: https://syzkaller.appspot.com/x/report.txt?x=166fcd8d980000 console output: https://syzkaller.appspot.com/x/log.txt?x=126fcd8d980000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
================================================
WARNING: lock held when returning to user space!
6.11.0-rc4-syzkaller-00565-gf9db28bb09f4 #0 Not tainted
------------------------------------------------
syz-executor124/5240 is leaving the kernel with locks still held!
1 lock held by syz-executor124/5240:
#0: ffffffff8fc84b88 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_act_cable_test+0x187/0x3f0 net/ethtool/cabletest.c:74
---
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 [email protected].
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#bisection
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
syzbot
syzbotFor archival purposes, forwarding an incoming command email to [email protected].
For archival purposes, forwarding an incoming command email to [email protected].
***
Subject: WARNING: lock held when returning to user space in ethnl_act_cable_test
Author: [email protected]
#syz test
Fix an unreleased lock when taking the out_dev_put path.
---
I'm not entirely sure why are there two labels when all paths should release the lock, maybe remove out_dev_put and out_rtnl for a simpler out? I've kept it just in case, but I can make the change if needed.
--- net/ethtool/cabletest.c | 1 + 1 file changed, 1 insertion(+)
net/ethtool/cabletest.c +1 -0
@@ -77,6 +77,7 @@ int ethnl_act_cable_test(struct sk_buff *skb, struct genl_info *info) info->extack);if (IS_ERR_OR_NULL (phydev)) { ret = -EOPNOTSUPP ; +rtnl_unlock (); goto out_dev_put; }
Signature · 1 line
2.43.0
Hello,
Quoted 21 lines · On Mon, 26 Aug 2024 01:50:24 -0700 syzbot…
Hello,
syzbot found the following issue on:
HEAD commit: f9db28bb09f4 Merge branch 'net-redundant-judgments' git tree: net-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=115eb015980000 kernel config: https://syzkaller.appspot.com/x/.config?x=df2f0ed7e30a639d dashboard link: https://syzkaller.appspot.com/bug?extid=c641161e97237326ea74 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=17d2d609980000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1741fbf5980000Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/585e02f7fe7b/disk-f9db28bb.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b9faf5d24900/vmlinux-f9db28bb.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f9df5868ea4f/bzImage-f9db28bb.xzThe issue was bisected to:
commit
3688ff3077d3f334cee1d4b61d8bfb6a9508c2d2
Quoted 8 lines
Author: Maxime Chevallier <[email protected]> Date: Wed Aug 21 15:10:05 2024 +0000net: ethtool: cable-test: Target the command to the requested PHY
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=146fcd8d980000 final oops: https://syzkaller.appspot.com/x/report.txt?x=166fcd8d980000 console output: https://syzkaller.appspot.com/x/log.txt?x=126fcd8d980000
Looks like there's indeed a mistake in the error path for that command, I'll send a fix for that.
Thanks,
Maxime