{"id":"CVE-2026-98629","state":"PUBLISHED","title":"net/sched: cls_u32: fix manual hash table handle IDR aliasing","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/sched: cls_u32: fix manual hash table handle IDR aliasing\n\nA u32 hash table created with an explicit handle ('tc filter add ...\nhandle 801: u32 divisor N') keys its IDR entry on the raw handle, while\nthe destroy paths free it under handle2id(handle). The two key domains\ndisagree for handles in the 0x800..0xFFF htid range:\nhandle2id() folds them back into the auto-allocated id space (1..0x7FF).\n\nA manual table therefore leaves its raw-keyed IDR entry unreachable on\ndelete (a permanent leak), and its delete can drop the idr entry of an\nunrelated live auto table. A later auto allocation can then hand out a\nhandle that aliases the live manual table; u32_lookup_ht() first-match\nroutes lookups and TCA_U32_LINK for that htid to the wrong table.\n\nKey the divisor-path alloc on handle2id(handle) so allocation and\nremoval share one key domain. A manual handle that maps onto an id\nalready in use is rejected with -ENOSPC, and auto allocation skips ids\nheld by live manual tables.\n\nConditions to recreate:\n  ip link add test0 type dummy\n  tc qdisc add dev test0 clsact\n  tc filter add dev test0 ingress protocol ip pref 1 \\\n          handle 801: u32 divisor 16\n  tc filter add dev test0 ingress protocol ip pref 2 u32 divisor 16\n  tc -d filter show dev test0 ingress | grep 'fh 801:'\n  # unpatched: two live tables with handle 0x80100000 (the pref 2 root\n  # hnode is auto-allocated id 1); patched: the auto hnode takes id 2.\n\nAlso tested with a poc with a live u32 table on the block, add/delete a manual\ntable 'handle 901: u32 divisor 1' twice; unpatched, the re-add fails with\n-ENOSPC because the raw key leaked on the first delete.","publishedAt":"2026-10-18T15:19:50.589Z","updatedAt":"2026-10-19T09:22:57.219Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9b2c3184e126b941dfa716b8128ed6db92a64e2f","status":"affected","lessThan":"21fc07924e996e1e661268ca269c86b8d59d25b3","versionType":"git"},{"version":"789f9963bd031c3a185605665b744912df8e7eda","status":"affected","lessThan":"0fac292d93fdb313099e98cce928b3a524c92c94","versionType":"git"},{"version":"73af53d82076bbe184d9ece9e14b0dc8599e6055","status":"affected","lessThan":"54a454c5e41f5e2cb70c8163140ce095c5d5eefd","versionType":"git"},{"version":"73af53d82076bbe184d9ece9e14b0dc8599e6055","status":"affected","lessThan":"f6696481eedfd5752b4b56eed715d0b0fe48b9c5","versionType":"git"},{"version":"73af53d82076bbe184d9ece9e14b0dc8599e6055","status":"affected","lessThan":"2f898f9ec7c73c5697ee462681e7ea6984ee1f3d","versionType":"git"},{"version":"73af53d82076bbe184d9ece9e14b0dc8599e6055","status":"affected","lessThan":"0a5f5d9e94dead312d32c366b917c64e552b72f7","versionType":"git"},{"version":"4403f9293ce9ecc2a55c688d84ee37e3ba0fc1a8","status":"affected","versionType":"git"},{"version":"6.1.119","status":"affected","lessThan":"6.1.189","versionType":"semver"},{"version":"6.6.63","status":"affected","lessThan":"6.6.158","versionType":"semver"},{"version":"6.11.10","status":"affected","lessThan":"6.12","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/cls_u32.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.1.189","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.158","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.112","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.55","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.9","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/cls_u32.c"]}],"references":["https://git.kernel.org/stable/c/21fc07924e996e1e661268ca269c86b8d59d25b3","https://git.kernel.org/stable/c/0fac292d93fdb313099e98cce928b3a524c92c94","https://git.kernel.org/stable/c/54a454c5e41f5e2cb70c8163140ce095c5d5eefd","https://git.kernel.org/stable/c/f6696481eedfd5752b4b56eed715d0b0fe48b9c5","https://git.kernel.org/stable/c/2f898f9ec7c73c5697ee462681e7ea6984ee1f3d","https://git.kernel.org/stable/c/0a5f5d9e94dead312d32c366b917c64e552b72f7"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:43.249Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/98xxx/CVE-2026-98629.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-98629","state":"PUBLISHED","datePublished":"2026-10-18T15:19:50.589Z","dateUpdated":"2026-10-19T09:22:57.219Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.361Z"},"containers":{"cna":{"title":"net/sched: cls_u32: fix manual hash table handle IDR aliasing","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/sched: cls_u32: fix manual hash table handle IDR aliasing\n\nA u32 hash table created with an explicit handle ('tc filter add ...\nhandle 801: u32 divisor N') keys its IDR entry on the raw handle, while\nthe destroy paths free it under handle2id(handle). The two key domains\ndisagree for handles in the 0x800..0xFFF htid range:\nhandle2id() folds them back into the auto-allocated id space (1..0x7FF).\n\nA manual table therefore leaves its raw-keyed IDR entry unreachable on\ndelete (a permanent leak), and its delete can drop the idr entry of an\nunrelated live auto table. A later auto allocation can then hand out a\nhandle that aliases the live manual table; u32_lookup_ht() first-match\nroutes lookups and TCA_U32_LINK for that htid to the wrong table.\n\nKey the divisor-path alloc on handle2id(handle) so allocation and\nremoval share one key domain. A manual handle that maps onto an id\nalready in use is rejected with -ENOSPC, and auto allocation skips ids\nheld by live manual tables.\n\nConditions to recreate:\n  ip link add test0 type dummy\n  tc qdisc add dev test0 clsact\n  tc filter add dev test0 ingress protocol ip pref 1 \\\n          handle 801: u32 divisor 16\n  tc filter add dev test0 ingress protocol ip pref 2 u32 divisor 16\n  tc -d filter show dev test0 ingress | grep 'fh 801:'\n  # unpatched: two live tables with handle 0x80100000 (the pref 2 root\n  # hnode is auto-allocated id 1); patched: the auto hnode takes id 2.\n\nAlso tested with a poc with a live u32 table on the block, add/delete a manual\ntable 'handle 901: u32 divisor 1' twice; unpatched, the re-add fails with\n-ENOSPC because the raw key leaked on the first delete."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9b2c3184e126b941dfa716b8128ed6db92a64e2f","status":"affected","lessThan":"21fc07924e996e1e661268ca269c86b8d59d25b3","versionType":"git"},{"version":"789f9963bd031c3a185605665b744912df8e7eda","status":"affected","lessThan":"0fac292d93fdb313099e98cce928b3a524c92c94","versionType":"git"},{"version":"73af53d82076bbe184d9ece9e14b0dc8599e6055","status":"affected","lessThan":"54a454c5e41f5e2cb70c8163140ce095c5d5eefd","versionType":"git"},{"version":"73af53d82076bbe184d9ece9e14b0dc8599e6055","status":"affected","lessThan":"f6696481eedfd5752b4b56eed715d0b0fe48b9c5","versionType":"git"},{"version":"73af53d82076bbe184d9ece9e14b0dc8599e6055","status":"affected","lessThan":"2f898f9ec7c73c5697ee462681e7ea6984ee1f3d","versionType":"git"},{"version":"73af53d82076bbe184d9ece9e14b0dc8599e6055","status":"affected","lessThan":"0a5f5d9e94dead312d32c366b917c64e552b72f7","versionType":"git"},{"version":"4403f9293ce9ecc2a55c688d84ee37e3ba0fc1a8","status":"affected","versionType":"git"},{"version":"6.1.119","status":"affected","lessThan":"6.1.189","versionType":"semver"},{"version":"6.6.63","status":"affected","lessThan":"6.6.158","versionType":"semver"},{"version":"6.11.10","status":"affected","lessThan":"6.12","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/cls_u32.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.1.189","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.158","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.112","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.55","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.9","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/cls_u32.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/21fc07924e996e1e661268ca269c86b8d59d25b3"},{"url":"https://git.kernel.org/stable/c/0fac292d93fdb313099e98cce928b3a524c92c94"},{"url":"https://git.kernel.org/stable/c/54a454c5e41f5e2cb70c8163140ce095c5d5eefd"},{"url":"https://git.kernel.org/stable/c/f6696481eedfd5752b4b56eed715d0b0fe48b9c5"},{"url":"https://git.kernel.org/stable/c/2f898f9ec7c73c5697ee462681e7ea6984ee1f3d"},{"url":"https://git.kernel.org/stable/c/0a5f5d9e94dead312d32c366b917c64e552b72f7"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-19T09:22:57.219Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.119","versionEndExcluding":"6.1.189"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.63","versionEndExcluding":"6.6.158"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.12.112"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.18.55"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"7.2.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"7.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}