{"id":"CVE-2025-21971","state":"PUBLISHED","title":"net_sched: Prevent creation of classes with TC_H_ROOT","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet_sched: Prevent creation of classes with TC_H_ROOT\n\nThe function qdisc_tree_reduce_backlog() uses TC_H_ROOT as a termination\ncondition when traversing up the qdisc tree to update parent backlog\ncounters. However, if a class is created with classid TC_H_ROOT, the\ntraversal terminates prematurely at this class instead of reaching the\nactual root qdisc, causing parent statistics to be incorrectly maintained.\nIn case of DRR, this could lead to a crash as reported by Mingi Cho.\n\nPrevent the creation of any Qdisc class with classid TC_H_ROOT\n(0xFFFFFFFF) across all qdisc types, as suggested by Jamal.","publishedAt":"2025-04-01T15:47:04.448Z","updatedAt":"2026-10-15T21:51:56.131Z","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":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"e05d9938b1b0ac40b6054cc5fa0ccbd9afd5ed4c","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"7a82fe67a9f4d7123d8e5ba8f0f0806c28695006","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"003d92c91cdb5a64b25a9a74cb8543aac9a8bb48","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"e5ee00607bbfc97ef1526ea95b6b2458ac9e7cb7","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"78533c4a29ac3aeddce4b481770beaaa4f3bfb67","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"5c3ca9cb48b51bd72bf76b8b05e24f3cd53db5e7","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"94edfdfb9505ab608e86599d1d1e38c83816fc1c","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"0c3057a5a04d07120b3d0ec9c79568fceb9c921e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_api.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.25","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.25","versionType":"semver"},{"version":"5.4.292","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.236","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.180","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.132","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.84","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.20","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.8","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_api.c"]}],"references":["https://git.kernel.org/stable/c/e05d9938b1b0ac40b6054cc5fa0ccbd9afd5ed4c","https://git.kernel.org/stable/c/7a82fe67a9f4d7123d8e5ba8f0f0806c28695006","https://git.kernel.org/stable/c/003d92c91cdb5a64b25a9a74cb8543aac9a8bb48","https://git.kernel.org/stable/c/e5ee00607bbfc97ef1526ea95b6b2458ac9e7cb7","https://git.kernel.org/stable/c/78533c4a29ac3aeddce4b481770beaaa4f3bfb67","https://git.kernel.org/stable/c/5c3ca9cb48b51bd72bf76b8b05e24f3cd53db5e7","https://git.kernel.org/stable/c/94edfdfb9505ab608e86599d1d1e38c83816fc1c","https://git.kernel.org/stable/c/0c3057a5a04d07120b3d0ec9c79568fceb9c921e","https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html","https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:39.238Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/21xxx/CVE-2025-21971.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-21971","state":"PUBLISHED","datePublished":"2025-04-01T15:47:04.448Z","dateUpdated":"2026-10-15T21:51:56.131Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-29T08:45:45.797Z"},"containers":{"cna":{"title":"net_sched: Prevent creation of classes with TC_H_ROOT","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet_sched: Prevent creation of classes with TC_H_ROOT\n\nThe function qdisc_tree_reduce_backlog() uses TC_H_ROOT as a termination\ncondition when traversing up the qdisc tree to update parent backlog\ncounters. However, if a class is created with classid TC_H_ROOT, the\ntraversal terminates prematurely at this class instead of reaching the\nactual root qdisc, causing parent statistics to be incorrectly maintained.\nIn case of DRR, this could lead to a crash as reported by Mingi Cho.\n\nPrevent the creation of any Qdisc class with classid TC_H_ROOT\n(0xFFFFFFFF) across all qdisc types, as suggested by Jamal."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"e05d9938b1b0ac40b6054cc5fa0ccbd9afd5ed4c","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"7a82fe67a9f4d7123d8e5ba8f0f0806c28695006","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"003d92c91cdb5a64b25a9a74cb8543aac9a8bb48","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"e5ee00607bbfc97ef1526ea95b6b2458ac9e7cb7","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"78533c4a29ac3aeddce4b481770beaaa4f3bfb67","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"5c3ca9cb48b51bd72bf76b8b05e24f3cd53db5e7","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"94edfdfb9505ab608e86599d1d1e38c83816fc1c","versionType":"git"},{"version":"066a3b5b2346febf9a655b444567b7138e3bb939","status":"affected","lessThan":"0c3057a5a04d07120b3d0ec9c79568fceb9c921e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_api.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.25","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.25","versionType":"semver"},{"version":"5.4.292","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.236","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.180","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.132","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.84","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.20","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.8","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_api.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e05d9938b1b0ac40b6054cc5fa0ccbd9afd5ed4c"},{"url":"https://git.kernel.org/stable/c/7a82fe67a9f4d7123d8e5ba8f0f0806c28695006"},{"url":"https://git.kernel.org/stable/c/003d92c91cdb5a64b25a9a74cb8543aac9a8bb48"},{"url":"https://git.kernel.org/stable/c/e5ee00607bbfc97ef1526ea95b6b2458ac9e7cb7"},{"url":"https://git.kernel.org/stable/c/78533c4a29ac3aeddce4b481770beaaa4f3bfb67"},{"url":"https://git.kernel.org/stable/c/5c3ca9cb48b51bd72bf76b8b05e24f3cd53db5e7"},{"url":"https://git.kernel.org/stable/c/94edfdfb9505ab608e86599d1d1e38c83816fc1c"},{"url":"https://git.kernel.org/stable/c/0c3057a5a04d07120b3d0ec9c79568fceb9c921e"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached through RTM_NEWTCLASS rtnetlink messages (tc class add) plus locally generated traffic on a local netdev, requiring local system access. Per kernel scoring guidance, tc/netlink qdisc bugs are Local.\nAC:L - Exploitation is a deterministic fixed sequence — create a drr/hfsc/qfq/ets qdisc with handle ffff:, add a class with classid ffff:ffff, direct a packet to it, drop the filter, then delete the class — with no race window or attacker-uncontrollable precondition. Heap grooming to occupy the freed drr_class slab is fully under attacker control.\nPR:L - tc class creation requires only CAP_NET_ADMIN in the network namespace's owning user namespace (netlink_net_capable in rtnetlink_rcv_msg), which any unprivileged user obtains via unshare -Urn, where they can also create a dummy/veth device and generate the traffic needed. No real root in the init namespace is needed.\nUI:N - The attacker performs every step themselves — netlink configuration and packet transmission — with no action required from any other user or administrator.\nS:U - The corruption stays within the kernel's own security authority; there is no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The stale active-list entry produces a use-after-free on a kzalloc'd drr_class object; the attacker can reclaim that slab and have the kernel read pointers and data out of attacker-adjacent memory, and the resulting primitives can be leveraged for arbitrary kernel memory disclosure.\nI:H - The UAF yields both an unlink write (list_del on freed cl->alist) and an indirect call through cl->qdisc->ops->peek read from reclaimed heap memory, giving arbitrary write and control-flow hijack potential, i.e. full kernel integrity loss.\nA:H - Even without full exploitation, the dangling list entry causes a use-after-free oops in softirq context on the next dequeue, and the broken accounting permanently stalls the qdisc (drr_dequeue always returns NULL), halting transmission on the device — a repeatable kernel crash/DoS."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:55:46.501Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"5.4.292"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"5.10.236"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"5.15.180"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.1.132"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.6.84"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.12.20"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.13.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.14"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:40:14.063Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-21971","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:43:55.303520Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:51:56.131Z"}}]}}}