From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+5fe14f2ff4ccbace9a26@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] KASAN: slab-use-after-free Read in __ethtool_get_link_ksettings
Date: Sat, 28 Sep 2024 16:22:05 +0800 [thread overview]
Message-ID: <20240928082205.1318-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000657ecd0614456af8@google.com>
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: d505d3593b52 net: wwan: qcom_bam_dmux: Fix missing pm_runt..
> git tree: net
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=150d959f980000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 61387b8dcf1d
--- l/drivers/infiniband/core/verbs.c
+++ v/drivers/infiniband/core/verbs.c
@@ -1976,15 +1976,14 @@ int ib_get_eth_speed(struct ib_device *d
if (rdma_port_get_link_layer(dev, port_num) != IB_LINK_LAYER_ETHERNET)
return -EINVAL;
- netdev = ib_device_get_netdev(dev, port_num);
- if (!netdev)
- return -ENODEV;
-
rtnl_lock();
- rc = __ethtool_get_link_ksettings(netdev, &lksettings);
+ netdev = ib_device_get_netdev(dev, port_num);
+ if (netdev)
+ rc = __ethtool_get_link_ksettings(netdev, &lksettings);
rtnl_unlock();
- dev_put(netdev);
+ if (!netdev)
+ return -ENODEV;
if (!rc && lksettings.base.speed != (u32)SPEED_UNKNOWN) {
netdev_speed = lksettings.base.speed;
@@ -1995,6 +1994,7 @@ int ib_get_eth_speed(struct ib_device *d
netdev->name, netdev_speed);
}
+ dev_put(netdev);
ib_get_width_and_speed(netdev_speed, lksettings.lanes,
speed, width);
--
next prev parent reply other threads:[~2024-09-28 8:22 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 20:10 syzbot
2024-03-25 12:09 ` Denis Kirjanov
2024-03-25 13:08 ` Eric Dumazet
2024-09-28 12:21 ` Hillf Danton
2024-09-29 11:46 ` Hillf Danton
2024-09-30 8:32 ` Eric Dumazet
2024-09-30 12:27 ` Hillf Danton
2024-09-27 18:26 ` syzbot
2024-09-28 8:22 ` Hillf Danton [this message]
2024-09-28 9:08 ` syzbot
2024-09-29 10:38 ` Hillf Danton
2024-09-29 11:17 ` syzbot
2024-10-08 1:44 ` syzbot
2024-10-08 11:44 ` [syzbot] " syzbot
2024-10-08 11:51 ` syzbot
2024-10-10 8:25 ` syzbot
2024-10-10 9:12 ` syzbot
2024-10-10 13:27 ` syzbot
2024-10-10 13:46 ` syzbot
2024-10-13 10:54 ` syzbot
2024-10-13 11:44 ` syzbot
2024-10-13 15:45 ` syzbot
2024-10-16 12:24 ` syzbot
2024-10-16 20:28 ` syzbot
2024-10-19 17:04 ` syzbot
2024-10-20 6:49 ` syzbot
2024-10-20 6:54 ` syzbot
2024-10-21 10:09 ` syzbot
[not found] <20241008114406.GD25819@unreal>
2024-10-08 12:02 ` syzbot
[not found] <20241008115126.GE25819@unreal>
2024-10-08 12:24 ` syzbot
[not found] <53e285ce-2977-467a-ae0e-8d54f6835c09@nvidia.com>
2024-10-10 13:30 ` syzbot
[not found] <45071abc-d5fd-4c24-9e36-e8164eca3867@nvidia.com>
2024-10-10 13:30 ` syzbot
[not found] <397b6a20-036f-404b-bdd1-82cc07d05296@nvidia.com>
2024-10-10 14:02 ` syzbot
[not found] <181d9e88-ae98-4b4c-bd99-1e0e99da8588@nvidia.com>
2024-10-10 14:26 ` syzbot
[not found] <68d66e2d-78f8-4a7c-890e-ca81af38984a@nvidia.com>
2024-10-13 11:29 ` syzbot
[not found] <170d194b-686e-482d-a2f0-151a12887545@nvidia.com>
2024-10-13 12:05 ` syzbot
[not found] <d21ac7f8-ab23-4b37-80f6-43836bbdbf12@nvidia.com>
2024-10-13 16:08 ` syzbot
[not found] <53cfa80b-e1f9-4784-b725-e4e7b5c0cb4c@nvidia.com>
2024-10-16 20:02 ` syzbot
[not found] <db9cbaed-a5a6-419b-8a46-0a9ce4ed4a5f@nvidia.com>
2024-10-16 20:57 ` syzbot
[not found] <2deb0631-ce6c-4b18-8c34-9401198c9d39@nvidia.com>
2024-10-19 18:55 ` syzbot
[not found] <605a7a92-5e06-42b6-a44c-6529cfa86d47@nvidia.com>
2024-10-20 8:33 ` syzbot
[not found] <27386470-ef9f-49dc-a3d6-6c7f428737ad@nvidia.com>
2024-10-20 8:54 ` syzbot
[not found] <a9414b93-0179-4d20-b619-3ef736f223f0@nvidia.com>
2024-10-21 13:32 ` 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=20240928082205.1318-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+5fe14f2ff4ccbace9a26@syzkaller.appspotmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome