{"id":"CVE-2026-53234","aliases":["CVE-2026-53234"],"related":[],"kind":"vulnerability","state":"published","title":"net: ibm: emac: Fix use-after-free during device removal","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: ibm: emac: Fix use-after-free during device removal\n\nThe driver was using devm_register_netdev() which causes unregister_netdev()\nto be deferred until the devres cleanup phase, which runs after emac_remove()\nreturns. This creates a use-after-free window where:\n\n1. emac_remove() is called, which tears down hardware (cancels work, detaches\n   modules, unregisters from MAL)\n2. emac_remove() returns\n3. devres cleanup runs and finally calls unregister_netdev()\n\nDuring step 3, the network stack might still process packets, triggering\nemac_irq(), emac_poll(), or other handlers that access now-freed hardware\nresources (dev->emacp, dev->mal, etc.).\n\nFix this by replacing devm_register_netdev() with manual register_netdev()\nand calling unregister_netdev() at the beginning of emac_remove(), before\nany hardware teardown. This ensures the network device is fully stopped and\nunregistered before hardware resources are released.\n\nThe change is safe because:\n- dev->ndev is assigned very early in probe (before any error paths that\n  could bypass emac_remove)\n- platform_set_drvdata() is only called after successful registration, so\n  emac_remove() only runs for fully registered devices\n- unregister_netdev() is idempotent and safe to call on any registered device","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: ibm: emac: Fix use-after-free during device removal\n\nThe driver was using devm_register_netdev() which causes unregister_netdev()\nto be deferred until the devres cleanup phase, which runs after emac_remove()\nreturns. This creates a use-after-free window where:\n\n1. emac_remove() is called, which tears down hardware (cancels work, detaches\n   modules, unregisters from MAL)\n2. emac_remove() returns\n3. devres cleanup runs and finally calls unregister_netdev()\n\nDuring step 3, the network stack might still process packets, triggering\nemac_irq(), emac_poll(), or other handlers that access now-freed hardware\nresources (dev->emacp, dev->mal, etc.).\n\nFix this by replacing devm_register_netdev() with manual register_netdev()\nand calling unregister_netdev() at the beginning of emac_remove(), before\nany hardware teardown. This ensures the network device is fully stopped and\nunregistered before hardware resources are released.\n\nThe change is safe because:\n- dev->ndev is assigned very early in probe (before any error paths that\n  could bypass emac_remove)\n- platform_set_drvdata() is only called after successful registration, so\n  emac_remove() only runs for fully registered devices\n- unregister_netdev() is idempotent and safe to call on any registered device","source":"cvelist"}],"published":"2026-06-25T08:39:31.852Z","modified":"2026-07-08T19:02:06.450Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"a4dd8535a527061a01f2fd335596fa77ca240a96","fixed":"cf8e14db93eaecc4c0c58299be3b3183b0e53ed5","status":"affected"},{"type":"git","introduced":"a4dd8535a527061a01f2fd335596fa77ca240a96","fixed":"c09c2e236eef6f59e105f38a30f5439e6ccbcad7","status":"affected"},{"type":"git","introduced":"a4dd8535a527061a01f2fd335596fa77ca240a96","fixed":"c12584cd6078085d707266be864e7e1cc91d74e3","status":"affected"},{"type":"git","introduced":"a4dd8535a527061a01f2fd335596fa77ca240a96","fixed":"a0130d682222ae21afc395aead7cd2d87e1a8358","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.12","status":"unaffected"},{"type":"semver","introduced":"6.12.94","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.36","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.13","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.12","fixed":"6.12.94"},{"status":"affected","introduced":"6.13","fixed":"6.18.36"},{"status":"affected","introduced":"6.19","fixed":"7.0.13"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/cf8e14db93eaecc4c0c58299be3b3183b0e53ed5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c09c2e236eef6f59e105f38a30f5439e6ccbcad7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c12584cd6078085d707266be864e7e1cc91d74e3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a0130d682222ae21afc395aead7cd2d87e1a8358","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-53234","url":"https://www.cve.org/CVERecord?id=CVE-2026-53234","licence":"CVE Terms of Use","modified":"2026-06-25T08:39:31.852Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-53234","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53234","licence":"Public domain","modified":"2026-07-08T19:02:06.450Z"}],"updatedAt":"2026-11-25T22:59:26.325Z","epss":{"score":0.00131,"percentile":0.02926,"date":"2026-12-01T12:00:22.000Z"}}