RDMA/core: Reject unregistering netdevs in ib_get_eth_speed
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.1.189, 6.6.158, 6.12.112, 6.18.54, 7.2.8
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: RDMA/core: Reject unregistering netdevs in ib_get_eth_speed ib_device_get_netdev() intentionally returns a referenced net_device even when it is unregistering, so matching and cleanup callers can still find the association. The reference keeps struct net_device allocated, but does not guarantee that the device remains operational. ib_get_eth_speed() uses the returned device operationally by invoking its ethtool callback. Although that call is made under RTNL, the function does not verify the registration state first. An asynchronous RDMA port query can therefore call into a netdev after NETDEV_UNREGISTER and ndo_uninit have completed. Check for NETREG_REGISTERED while holding RTNL and return -ENODEV for a device which is being unregistered. Keeping RTNL across the check and the ethtool operation prevents unregister from starting between them. Keep the speed fallback and warning under RTNL as well, so the warning can safely read netdev->name. Drop the netdev reference before releasing RTNL once all accesses to the device are complete.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From d41861942fc55c14b6280d9568a0d0112037f065 · fixed in be4b44c8b47c67a04c08b1a0aba18006b749ae6a; From d41861942fc55c14b6280d9568a0d0112037f065 · fixed in 45c60ffc79771bad154f224a05753191cf1b37bc; From d41861942fc55c14b6280d9568a0d0112037f065 · fixed in 520cd057f138ed8dbe8e05f0eae3a8ed4c5d3a5e; From d41861942fc55c14b6280d9568a0d0112037f065 · fixed in a219459fbd1b2598e63c81a52847eba6c28b72d2; From d41861942fc55c14b6280d9568a0d0112037f065 · fixed in 5bd42f74ec3b4f4687fb600f367af0828d513b3c; From d41861942fc55c14b6280d9568a0d0112037f065 · fixed in ef9fbe1b93f3b617b96e86d5cd76b3fa44514cb5
- Linux Linux
4.14
- KernelLinux
From 4.14.0 · fixed in 6.1.189; From 6.2.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.54; From 6.19.0 · fixed in 7.2.8