{"id":"CVE-2022-49501","state":"PUBLISHED","title":"usbnet: Run unregister_netdev() before unbind() again","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nusbnet: Run unregister_netdev() before unbind() again\n\nCommit 2c9d6c2b871d (\"usbnet: run unbind() before unregister_netdev()\")\nsought to fix a use-after-free on disconnect of USB Ethernet adapters.\n\nIt turns out that a different fix is necessary to address the issue:\nhttps://lore.kernel.org/netdev/18b3541e5372bc9b9fc733d422f4e698c089077c.1650177997.git.lukas@wunner.de/\n\nSo the commit was not necessary.\n\nThe commit made binding and unbinding of USB Ethernet asymmetrical:\nBefore, usbnet_probe() first invoked the ->bind() callback and then\nregister_netdev().  usbnet_disconnect() mirrored that by first invoking\nunregister_netdev() and then ->unbind().\n\nSince the commit, the order in usbnet_disconnect() is reversed and no\nlonger mirrors usbnet_probe().\n\nOne consequence is that a PHY disconnected (and stopped) in ->unbind()\nis afterwards stopped once more by unregister_netdev() as it closes the\nnetdev before unregistering.  That necessitates a contortion in ->stop()\nbecause the PHY may only be stopped if it hasn't already been\ndisconnected.\n\nReverting the commit allows making the call to phy_stop() unconditional\nin ->stop().","publishedAt":"2025-02-26T02:13:34.885Z","updatedAt":"2026-05-11T19:01:08.248Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c","status":"affected","lessThan":"6d5deb242874d924beccf7eb3cef04c1c3b0da79","versionType":"git"},{"version":"2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c","status":"affected","lessThan":"fbda837107f9bd4ec658d2aa88c6856dba606f06","versionType":"git"},{"version":"2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c","status":"affected","lessThan":"969a1b3ea3cb7d58a16fe12fd1b04bfc0ea40509","versionType":"git"},{"version":"2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c","status":"affected","lessThan":"d1408f6b4dd78fb1b9e26bcf64477984e5f85409","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/usb/asix_devices.c","drivers/net/usb/smsc95xx.c","drivers/net/usb/usbnet.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"5.15.46","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.17.14","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.3","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/usb/asix_devices.c","drivers/net/usb/smsc95xx.c","drivers/net/usb/usbnet.c"]}],"references":["https://git.kernel.org/stable/c/6d5deb242874d924beccf7eb3cef04c1c3b0da79","https://git.kernel.org/stable/c/fbda837107f9bd4ec658d2aa88c6856dba606f06","https://git.kernel.org/stable/c/969a1b3ea3cb7d58a16fe12fd1b04bfc0ea40509","https://git.kernel.org/stable/c/d1408f6b4dd78fb1b9e26bcf64477984e5f85409"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49501.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49501","state":"PUBLISHED","datePublished":"2025-02-26T02:13:34.885Z","dateUpdated":"2026-05-11T19:01:08.248Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T02:08:31.586Z"},"containers":{"cna":{"title":"usbnet: Run unregister_netdev() before unbind() again","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nusbnet: Run unregister_netdev() before unbind() again\n\nCommit 2c9d6c2b871d (\"usbnet: run unbind() before unregister_netdev()\")\nsought to fix a use-after-free on disconnect of USB Ethernet adapters.\n\nIt turns out that a different fix is necessary to address the issue:\nhttps://lore.kernel.org/netdev/18b3541e5372bc9b9fc733d422f4e698c089077c.1650177997.git.lukas@wunner.de/\n\nSo the commit was not necessary.\n\nThe commit made binding and unbinding of USB Ethernet asymmetrical:\nBefore, usbnet_probe() first invoked the ->bind() callback and then\nregister_netdev().  usbnet_disconnect() mirrored that by first invoking\nunregister_netdev() and then ->unbind().\n\nSince the commit, the order in usbnet_disconnect() is reversed and no\nlonger mirrors usbnet_probe().\n\nOne consequence is that a PHY disconnected (and stopped) in ->unbind()\nis afterwards stopped once more by unregister_netdev() as it closes the\nnetdev before unregistering.  That necessitates a contortion in ->stop()\nbecause the PHY may only be stopped if it hasn't already been\ndisconnected.\n\nReverting the commit allows making the call to phy_stop() unconditional\nin ->stop()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c","status":"affected","lessThan":"6d5deb242874d924beccf7eb3cef04c1c3b0da79","versionType":"git"},{"version":"2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c","status":"affected","lessThan":"fbda837107f9bd4ec658d2aa88c6856dba606f06","versionType":"git"},{"version":"2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c","status":"affected","lessThan":"969a1b3ea3cb7d58a16fe12fd1b04bfc0ea40509","versionType":"git"},{"version":"2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c","status":"affected","lessThan":"d1408f6b4dd78fb1b9e26bcf64477984e5f85409","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/usb/asix_devices.c","drivers/net/usb/smsc95xx.c","drivers/net/usb/usbnet.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"5.15.46","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.17.14","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.3","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/usb/asix_devices.c","drivers/net/usb/smsc95xx.c","drivers/net/usb/usbnet.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6d5deb242874d924beccf7eb3cef04c1c3b0da79"},{"url":"https://git.kernel.org/stable/c/fbda837107f9bd4ec658d2aa88c6856dba606f06"},{"url":"https://git.kernel.org/stable/c/969a1b3ea3cb7d58a16fe12fd1b04bfc0ea40509"},{"url":"https://git.kernel.org/stable/c/d1408f6b4dd78fb1b9e26bcf64477984e5f85409"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:01:08.248Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"5.15.46"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"5.17.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"5.18.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"5.19"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2022-49501","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-02-27T18:15:41.764586Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-02-27T18:22:32.026Z"}}]}}}