usbnet: Run unregister_netdev() before unbind() again
In the Linux kernel, the following vulnerability has been resolved: usbnet: Run unregister_netdev() before unbind() again Commit 2c9d6c2b871d ("usbnet: run unbind() before unregister_netdev()") sought to fix a use-after-free on disconnect of USB Ethernet adapters. It turns out that a different fix is necessary to address the issue: https://lore.kernel.org/netdev/18b3541e5372bc9b9fc733d422f4e698c089077c.1650177997.git.lukas@wunner.de/ So the commit was not necessary. The commit made binding and unbinding of USB Ethernet asymmetrical: Before, usbnet_probe() first invoked the ->bind() callback and then register_netdev(). usbnet_disconnect() mirrored that by first invoking unregister_netdev() and then ->unbind(). Since the commit, the order in usbnet_disconnect() is reversed and no longer mirrors usbnet_probe(). One consequence is that a PHY disconnected (and stopped) in ->unbind() is afterwards stopped once more by unregister_netdev() as it closes the netdev before unregistering. That necessitates a contortion in ->stop() because the PHY may only be stopped if it hasn't already been disconnected. Reverting the commit allows making the call to phy_stop() unconditional in ->stop().
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.15.46, 5.17.14, 5.18.3
- CVEs
- CVE-2022-49501
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 17:35 UTC · Revision 1
Source evidence
usbnet: Run unregister_netdev() before unbind() again
core-osv · Original sourcePublished 26 Feb 2025, 02:13 UTC
In the Linux kernel, the following vulnerability has been resolved: usbnet: Run unregister_netdev() before unbind() again Commit 2c9d6c2b871d ("usbnet: run unbind() before unregister_netdev()") sought to fix a use-after-free on disconnect of USB Ethernet adapters. It turns out that a different fix is necessary to address the issue: https://lore.kernel.org/netdev/18b3541e5372bc9b9fc733d422f4e698c089077c.1650177997.git.lukas@wunner.de/ So the commit was not necessary. The commit made binding and unbinding of USB Ethernet asymmetrical: Before, usbnet_probe() first invoked the ->bind() callback and then register_netdev(). usbnet_disconnect() mirrored that by first invoking unregister_netdev() and then ->unbind(). Since the commit, the order in usbnet_disconnect() is reversed and no longer mirrors usbnet_probe(). One consequence is that a PHY disconnected (and stopped) in ->unbind() is afterwards stopped once more by unregister_netdev() as it closes the netdev before unregistering. That necessitates a contortion in ->stop() because the PHY may only be stopped if it hasn't already been disconnected. Reverting the commit allows making the call to phy_stop() unconditional in ->stop().
osv:CVE-2022-49501
Kernel
Fixed versions: 5.15.46, 5.17.14, 5.18.3
Complete source record
{
"id": "7cd264d6453853a9b95d218b0c99f5d40f724124427e3a494eab49a72dc38f32",
"url": "https://osv.dev/vulnerability/CVE-2022-49501",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "usbnet: Run unregister_netdev() before unbind() again",
"summary": "In the Linux kernel, the following vulnerability has been resolved: usbnet: Run unregister_netdev() before unbind() again Commit 2c9d6c2b871d (\"usbnet: run unbind() before unregister_netdev()\") sought to fix a use-after-free on disconnect of USB Ethernet adapters. It turns out that a different fix is necessary to address the issue: https://lore.kernel.org/netdev/18b3541e5372bc9b9fc733d422f4e698c089077c.1650177997.git.lukas@wunner.de/ So the commit was not necessary. The commit made binding and unbinding of USB Ethernet asymmetrical: Before, usbnet_probe() first invoked the ->bind() callback and then register_netdev(). usbnet_disconnect() mirrored that by first invoking unregister_netdev() and then ->unbind(). Since the commit, the order in usbnet_disconnect() is reversed and no longer mirrors usbnet_probe(). One consequence is that a PHY disconnected (and stopped) in ->unbind() is afterwards stopped once more by unregister_netdev() as it closes the netdev before unregistering. That necessitates a contortion in ->stop() because the PHY may only be stopped if it hasn't already been disconnected. Reverting the commit allows making the call to phy_stop() unconditional in ->stop().",
"evidence": "osv:CVE-2022-49501",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.15.46",
"evidence": "/affected/1/ranges"
},
{
"value": "5.17.14",
"evidence": "/affected/1/ranges"
},
{
"value": "5.18.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2022-49501",
"aliases": [
"CVE-2022-49501"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c"
},
{
"fixed": "6d5deb242874d924beccf7eb3cef04c1c3b0da79"
},
{
"fixed": "fbda837107f9bd4ec658d2aa88c6856dba606f06"
},
{
"fixed": "969a1b3ea3cb7d58a16fe12fd1b04bfc0ea40509"
},
{
"fixed": "d1408f6b4dd78fb1b9e26bcf64477984e5f85409"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49501.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.14.0"
},
{
"fixed": "5.15.46"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "5.17.14"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.18.0"
},
{
"fixed": "5.18.3"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49501.json"
}
}
],
"modified": "2026-10-28T02:30:31.375223433Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/6d5deb242874d924beccf7eb3cef04c1c3b0da79",
"https://git.kernel.org/stable/c/969a1b3ea3cb7d58a16fe12fd1b04bfc0ea40509",
"https://git.kernel.org/stable/c/d1408f6b4dd78fb1b9e26bcf64477984e5f85409",
"https://git.kernel.org/stable/c/fbda837107f9bd4ec658d2aa88c6856dba606f06",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49501.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-49501",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49501.json"
}
},
"related_cves": [
{
"value": "CVE-2022-49501",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 497878,
"published_at": "2025-02-26T02:13:34.885+00:00"
}