{"id":"CVE-2026-97959","aliases":["CVE-2026-97959"],"related":[],"kind":"vulnerability","state":"published","title":"net/sched: cls_route: free emptied bucket on filter move","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/sched: cls_route: free emptied bucket on filter move\n\nroute4_change can move an existing filter to a different top-level\nbucket: route4_set_parms recomputes the handle from TCA_ROUTE4_TO/\nFROM/IIF, and the handle-mismatch check is gated on the 'new' flag, so\nfor an existing filter the new handle may differ from the old one and\nland in a different bucket. When this happens, the filter is unlinked\nfrom the old bucket, but the bucket itself is never freed once it goes\nempty. The stale empty bucket remains in head->table[], causing\nroute4_delete to report *last=false even after the last live filter is\ngone. That pins the empty tcf_proto and causes a leak.\n\nFix this by refcounting the filters linked to a bucket and freeing the\nbucket when the count drops to zero. The existing scan in route4_delete\ngoes away with it.\n\nThe count is updated at all sites that link or unlink a filter during add,\nchange and delete, and the bucket is dropped from head->table[] as soon as\nit reaches zero.\n\nConditions to recreate the bug:\n  CONFIG_NET_CLS_ROUTE4=y, CONFIG_NET_SCH_INGRESS=y, CONFIG_NET_CLS_ACT=y.\n\n  tc qdisc replace dev lo clsact\n  tc filter add dev lo ingress protocol ip pref 100 route from 1 to 1\n  tc filter change dev lo ingress protocol ip pref 100 handle 0x10001 \\\n    route from 1 to 2\n  tc filter del dev lo ingress protocol ip pref 100 handle 0x10002 \\\n    route from 1 to 2\n  tc filter show dev lo ingress | grep -c 'pref 100 route chain 0 '","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/sched: cls_route: free emptied bucket on filter move\n\nroute4_change can move an existing filter to a different top-level\nbucket: route4_set_parms recomputes the handle from TCA_ROUTE4_TO/\nFROM/IIF, and the handle-mismatch check is gated on the 'new' flag, so\nfor an existing filter the new handle may differ from the old one and\nland in a different bucket. When this happens, the filter is unlinked\nfrom the old bucket, but the bucket itself is never freed once it goes\nempty. The stale empty bucket remains in head->table[], causing\nroute4_delete to report *last=false even after the last live filter is\ngone. That pins the empty tcf_proto and causes a leak.\n\nFix this by refcounting the filters linked to a bucket and freeing the\nbucket when the count drops to zero. The existing scan in route4_delete\ngoes away with it.\n\nThe count is updated at all sites that link or unlink a filter during add,\nchange and delete, and the bucket is dropped from head->table[] as soon as\nit reaches zero.\n\nConditions to recreate the bug:\n  CONFIG_NET_CLS_ROUTE4=y, CONFIG_NET_SCH_INGRESS=y, CONFIG_NET_CLS_ACT=y.\n\n  tc qdisc replace dev lo clsact\n  tc filter add dev lo ingress protocol ip pref 100 route from 1 to 1\n  tc filter change dev lo ingress protocol ip pref 100 handle 0x10001 \\\n    route from 1 to 2\n  tc filter del dev lo ingress protocol ip pref 100 handle 0x10002 \\\n    route from 1 to 2\n  tc filter show dev lo ingress | grep -c 'pref 100 route chain 0 '","source":"cvelist"}],"published":"2026-09-25T10:23:04.348Z","modified":"2026-10-19T10:17:47.253Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1e052be69d045c8d0f82ff1116fd3e5a79661745","fixed":"9e7741b41a25b9d49df4d262fa314342e6f95c50","status":"affected"},{"type":"git","introduced":"1e052be69d045c8d0f82ff1116fd3e5a79661745","fixed":"48d38bf8c22a05fde07ba1f885cde27b851649a2","status":"affected"},{"type":"git","introduced":"1e052be69d045c8d0f82ff1116fd3e5a79661745","fixed":"cc99d26b12431e4e4d0e346ec32764eb42c0aed9","status":"affected"},{"type":"git","introduced":"1e052be69d045c8d0f82ff1116fd3e5a79661745","fixed":"41e94079200aaf0cdbe4594b0af75710b33da124","status":"affected"},{"type":"git","introduced":"1e052be69d045c8d0f82ff1116fd3e5a79661745","fixed":"2e2f130951d34871b0643bf700164d97cff4b427","status":"affected"},{"type":"git","introduced":"1e052be69d045c8d0f82ff1116fd3e5a79661745","fixed":"f8495d67434e1cb7e511297687ca55fdb28e4c20","status":"affected"},{"type":"git","introduced":"1e052be69d045c8d0f82ff1116fd3e5a79661745","fixed":"81dd117c04422c6d0c7974aba9fa6a0ba370959b","status":"affected"},{"type":"git","introduced":"1e052be69d045c8d0f82ff1116fd3e5a79661745","fixed":"1853f30cf5c84971f99788a76207c6f745380896","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.1","status":"unaffected"},{"type":"semver","introduced":"5.10.271","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.222","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.189","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.158","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.111","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.53","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.7","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/9e7741b41a25b9d49df4d262fa314342e6f95c50","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/48d38bf8c22a05fde07ba1f885cde27b851649a2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cc99d26b12431e4e4d0e346ec32764eb42c0aed9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/41e94079200aaf0cdbe4594b0af75710b33da124","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2e2f130951d34871b0643bf700164d97cff4b427","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f8495d67434e1cb7e511297687ca55fdb28e4c20","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/81dd117c04422c6d0c7974aba9fa6a0ba370959b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1853f30cf5c84971f99788a76207c6f745380896","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-97959","url":"https://www.cve.org/CVERecord?id=CVE-2026-97959","licence":"CVE Terms of Use","modified":"2026-10-19T09:11:25.255Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-97959","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97959","licence":"Public domain","modified":"2026-10-19T10:17:47.253Z"}],"updatedAt":"2026-11-25T22:59:41.004Z","epss":{"score":0.00177,"percentile":0.07549,"date":"2026-12-01T12:00:22.000Z"}}