{"id":"CVE-2025-38083","state":"PUBLISHED","title":"net_sched: prio: fix a race in prio_tune()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet_sched: prio: fix a race in prio_tune()\n\nGerrard Tai reported a race condition in PRIO, whenever SFQ perturb timer\nfires at the wrong time.\n\nThe race is as follows:\n\nCPU 0                                 CPU 1\n[1]: lock root\n[2]: qdisc_tree_flush_backlog()\n[3]: unlock root\n |\n |                                    [5]: lock root\n |                                    [6]: rehash\n |                                    [7]: qdisc_tree_reduce_backlog()\n |\n[4]: qdisc_put()\n\nThis can be abused to underflow a parent's qlen.\n\nCalling qdisc_purge_queue() instead of qdisc_tree_flush_backlog()\nshould fix the race, because all packets will be purged from the qdisc\nbefore releasing the lock.","publishedAt":"2025-06-20T11:21:51.554Z","updatedAt":"2026-10-15T21:52:07.502Z","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":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"53d11560e957d53ee87a0653d258038ce12361b7","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"4483d8b9127591c60c4eb789d6cab953bc4522a9","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"20f68e6a9e41693cb0e55e5b9ebbcb40983a4b8f","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"3aaa7c01cf19d9b9bb64b88b65c3a6fd05da2eb4","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"46c15c9d0f65c9ba857d63f53264f4b17e8a715f","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"e3f6745006dc9423d2b065b90f191cfa11b1b584","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"93f9eeb678d4c9c1abf720b3615fa8299a490845","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"d35acc1be3480505b5931f17e4ea9b7617fea4d3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_prio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"5.4.295","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.239","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.186","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.142","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.94","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.34","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.3","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","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_prio.c"]}],"references":["https://git.kernel.org/stable/c/53d11560e957d53ee87a0653d258038ce12361b7","https://git.kernel.org/stable/c/4483d8b9127591c60c4eb789d6cab953bc4522a9","https://git.kernel.org/stable/c/20f68e6a9e41693cb0e55e5b9ebbcb40983a4b8f","https://git.kernel.org/stable/c/3aaa7c01cf19d9b9bb64b88b65c3a6fd05da2eb4","https://git.kernel.org/stable/c/46c15c9d0f65c9ba857d63f53264f4b17e8a715f","https://git.kernel.org/stable/c/e3f6745006dc9423d2b065b90f191cfa11b1b584","https://git.kernel.org/stable/c/93f9eeb678d4c9c1abf720b3615fa8299a490845","https://git.kernel.org/stable/c/d35acc1be3480505b5931f17e4ea9b7617fea4d3","https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","https://cert-portal.siemens.com/productcert/html/ssa-082556.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38083.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38083","state":"PUBLISHED","datePublished":"2025-06-20T11:21:51.554Z","dateUpdated":"2026-10-15T21:52:07.502Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.981Z"},"containers":{"cna":{"title":"net_sched: prio: fix a race in prio_tune()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet_sched: prio: fix a race in prio_tune()\n\nGerrard Tai reported a race condition in PRIO, whenever SFQ perturb timer\nfires at the wrong time.\n\nThe race is as follows:\n\nCPU 0                                 CPU 1\n[1]: lock root\n[2]: qdisc_tree_flush_backlog()\n[3]: unlock root\n |\n |                                    [5]: lock root\n |                                    [6]: rehash\n |                                    [7]: qdisc_tree_reduce_backlog()\n |\n[4]: qdisc_put()\n\nThis can be abused to underflow a parent's qlen.\n\nCalling qdisc_purge_queue() instead of qdisc_tree_flush_backlog()\nshould fix the race, because all packets will be purged from the qdisc\nbefore releasing the lock."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"53d11560e957d53ee87a0653d258038ce12361b7","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"4483d8b9127591c60c4eb789d6cab953bc4522a9","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"20f68e6a9e41693cb0e55e5b9ebbcb40983a4b8f","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"3aaa7c01cf19d9b9bb64b88b65c3a6fd05da2eb4","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"46c15c9d0f65c9ba857d63f53264f4b17e8a715f","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"e3f6745006dc9423d2b065b90f191cfa11b1b584","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"93f9eeb678d4c9c1abf720b3615fa8299a490845","versionType":"git"},{"version":"7b8e0b6e659983154c8d7e756cdb833d89a3d4d7","status":"affected","lessThan":"d35acc1be3480505b5931f17e4ea9b7617fea4d3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_prio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"5.4.295","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.239","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.186","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.142","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.94","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.34","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.3","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","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_prio.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/53d11560e957d53ee87a0653d258038ce12361b7"},{"url":"https://git.kernel.org/stable/c/4483d8b9127591c60c4eb789d6cab953bc4522a9"},{"url":"https://git.kernel.org/stable/c/20f68e6a9e41693cb0e55e5b9ebbcb40983a4b8f"},{"url":"https://git.kernel.org/stable/c/3aaa7c01cf19d9b9bb64b88b65c3a6fd05da2eb4"},{"url":"https://git.kernel.org/stable/c/46c15c9d0f65c9ba857d63f53264f4b17e8a715f"},{"url":"https://git.kernel.org/stable/c/e3f6745006dc9423d2b065b90f191cfa11b1b584"},{"url":"https://git.kernel.org/stable/c/93f9eeb678d4c9c1abf720b3615fa8299a490845"},{"url":"https://git.kernel.org/stable/c/d35acc1be3480505b5931f17e4ea9b7617fea4d3"}],"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 vulnerable code is reached only via `RTM_NEWQDISC` netlink messages (`tc qdisc change ... prio bands N`) combined with locally enqueued traffic; no data from a remote peer reaches `prio_tune()`.\nAC:L - The attacker controls both sides of the race — they set the SFQ child's `perturb` period and drop-forcing `flows`/`depth` parameters, choose when to issue the band-shrinking change, and can retry unboundedly until the timer lands in the unlocked window between `sch_tree_unlock()` and `qdisc_put()`.\nPR:L - The tc/qdisc netlink path is gated only by `netlink_net_capable(skb, CAP_NET_ADMIN)` against the netns' own user namespace, so an unprivileged user obtains it with `unshare -Urn` and can also autoload `sch_prio`/`sch_sfq` from that context.\nUI:N - The attacker performs every step themselves — building the prio/SFQ hierarchy, generating the traffic, and triggering the reconfiguration. No victim action is involved.\nS:U - The corrupted `qlen`/`backlog` accounting and any resulting memory corruption stay within the kernel's own security authority; this is standard local kernel privilege escalation with no VM, IOMMU, or sandbox boundary crossed.\nC:H - The double subtraction underflows the unsigned `q.qlen`, desynchronizing the qdisc tree so classes stay on parent active lists after their child qdiscs are freed, yielding a use-after-free on `struct Qdisc`/class objects that can be groomed into an arbitrary kernel-memory read.\nI:H - The same qlen-desync-to-UAF primitive gives control over reallocated heap objects and their function pointers and list heads, enabling arbitrary write and control-flow hijacking — the well-known net/sched local privilege escalation pattern.\nA:H - Even unweaponized, the underflowed `qlen` makes an empty qdisc appear to hold ~4 billion packets, causing dequeue-from-empty warnings, stalled transmit paths, and use-after-free oopses that panic the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:59:21.321Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.4.295"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.10.239"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.15.186"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.1.142"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.6.94"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.12.34"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.15.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T17:33:50.557Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T01:06:30.528Z"},"x_adpType":"supplier"},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-38083","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:47:09.836026Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:52:07.502Z"}}]}}}