{"id":"CVE-2025-68245","summary":"net: netpoll: fix incorrect refcount handling causing incorrect cleanup","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: netpoll: fix incorrect refcount handling causing incorrect cleanup\n\ncommit efa95b01da18 (\"netpoll: fix use after free\") incorrectly\nignored the refcount and prematurely set dev-\u003enpinfo to NULL during\nnetpoll cleanup, leading to improper behavior and memory leaks.\n\nScenario causing lack of proper cleanup:\n\n1) A netpoll is associated with a NIC (e.g., eth0) and netdev-\u003enpinfo is\n   allocated, and refcnt = 1\n   - Keep in mind that npinfo is shared among all netpoll instances. In\n     this case, there is just one.\n\n2) Another netpoll is also associated with the same NIC and\n   npinfo-\u003erefcnt += 1.\n   - Now dev-\u003enpinfo-\u003erefcnt = 2;\n   - There is just one npinfo associated to the netdev.\n\n3) When the first netpolls goes to clean up:\n   - The first cleanup succeeds and clears np-\u003edev-\u003enpinfo, ignoring\n     refcnt.\n     - It basically calls `RCU_INIT_POINTER(np-\u003edev-\u003enpinfo, NULL);`\n   - Set dev-\u003enpinfo = NULL, without proper cleanup\n   - No -\u003endo_netpoll_cleanup() is either called\n\n4) Now the second target tries to clean up\n   - The second cleanup fails because np-\u003edev-\u003enpinfo is already NULL.\n     * In this case, ops-\u003endo_netpoll_cleanup() was never called, and\n       the skb pool is not cleaned as well (for the second netpoll\n       instance)\n  - This leaks npinfo and skbpool skbs, which is clearly reported by\n    kmemleak.\n\nRevert commit efa95b01da18 (\"netpoll: fix use after free\") and adds\nclarifying comments emphasizing that npinfo cleanup should only happen\nonce the refcount reaches zero, ensuring stable and correct netpoll\nbehavior.","modified":"2026-04-16T04:33:43.580436118Z","published":"2025-12-16T14:21:22.348Z","related":["SUSE-SU-2026:0447-1","SUSE-SU-2026:0472-1","SUSE-SU-2026:0473-1","SUSE-SU-2026:0587-1","SUSE-SU-2026:20477-1","SUSE-SU-2026:20498-1","SUSE-SU-2026:20555-1","SUSE-SU-2026:20599-1","SUSE-SU-2026:20615-1","SUSE-SU-2026:20845-1","SUSE-SU-2026:20876-1","openSUSE-SU-2026:20287-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68245.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/49c8d2c1f94cc2f4d1a108530d7ba52614b874c2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4afd4ebbad52aa146838ec23082ba393e426a2bb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/890472d6fbf062e6de7fdd56642cb305ab79d669"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8e6a50edad11e3e1426e4c29e7aa6201f3468ac2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9a51b5ccd1c79afec1c03a4e1e6688da52597556"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9b0bb18b4b9dc017c1825a2c5e763615e34a1593"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c645693180a98606c430825223d2029315d85e9d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c79a6d9da29219616b118a3adce9a14cd30f9bd0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68245.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68245"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"efa95b01da18ad22af62f6d99a3243f3be8fd264"},{"fixed":"8e6a50edad11e3e1426e4c29e7aa6201f3468ac2"},{"fixed":"9b0bb18b4b9dc017c1825a2c5e763615e34a1593"},{"fixed":"890472d6fbf062e6de7fdd56642cb305ab79d669"},{"fixed":"4afd4ebbad52aa146838ec23082ba393e426a2bb"},{"fixed":"c645693180a98606c430825223d2029315d85e9d"},{"fixed":"c79a6d9da29219616b118a3adce9a14cd30f9bd0"},{"fixed":"9a51b5ccd1c79afec1c03a4e1e6688da52597556"},{"fixed":"49c8d2c1f94cc2f4d1a108530d7ba52614b874c2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68245.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.17.0"},{"fixed":"5.4.302"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.247"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.197"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.159"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.59"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.17.9"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68245.json"}}],"schema_version":"1.7.5"}