{"id":"CVE-2026-99638","aliases":[],"cve":{"records":[{"id":"CVE-2026-99638","source":"Linux","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-09-25T10:25:14.426Z","published":"2026-11-20T05:49:54.656Z","modified":"2026-11-20T05:49:54.656Z"}],"publishers":[{"name":"Linux","role":"CNA","organizationId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","modified":"2026-11-20T05:49:54.656Z"}],"references":[{"url":"https://git.kernel.org/stable/c/8182ba13500b39d75b66fe9f37e13cb325c4b17e","tags":[],"source":"Linux"},{"url":"https://git.kernel.org/stable/c/7445eccce376f7adb876c9f466d7d893344af7ce","tags":[],"source":"Linux"},{"url":"https://git.kernel.org/stable/c/7327092a678bfcb1bae033acb1be1006a1399e30","tags":[],"source":"Linux"},{"url":"https://git.kernel.org/stable/c/f19f2b308beb158d0e6f6eb806ced636e4ebf6ce","tags":[],"source":"Linux"}],"weaknesses":[],"applicability":[{"source":"Linux","statements":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.12.118"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.18.64"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"7.3.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"7.4-rc2"}]}]}]}],"prioritization":[]},"title":"net/sched: clamp skb->queue_mapping before indexing the tx queue","titleSource":"Linux","descriptionSource":"Linux","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/sched: clamp skb->queue_mapping before indexing the tx queue\n\nThis issue was caught by Sashiko (nipa). A producer-side path cap is\nalready merged (ea4d4b5dddb5); this patch adds the matching consumer-side\ncaps.\n\nThe issue:\nThe tx queue is picked and capped in netdev_core_pick_tx() before the\n__dev_xmit_skb() qdisc enqueue path. A tc BPF program running inside an\negress qdisc (not clsact) can then change __sk_buff->queue_mapping; that\nstore is never re-checked. bpf_convert_ctx_access() bounds it only by\nNO_QUEUE_MAPPING, not by the device's queue count.\n\nTwo consumers read the stale value:\n\n  - On dequeue, qdisc_restart() calls netdev_get_tx_queue(), which\n    indexes dev->_tx[]. netdev_get_tx_queue() guards it with just a\n    DEBUG_NET_WARN_ON_ONCE, so sch_direct_xmit() takes the out-of-bounds\n    txq->_xmit_lock and writes txq->xmit_lock_owner past the end of the\n    allocation on non-lltx devices such as ifb. Drivers that index their\n    rings from skb_get_queue_mapping() (ex: ifb) go out of range the same\n    way.\n\n  - On enqueue, taprio_enqueue() indexes q->qdiscs[] with the same value;\n    the array is sized dev->num_tx_queues. A duplicating netem on a child\n    qdisc clones the skb and re-enqueues the clone at the taprio root\n    (qdisc_root_bh()) through a direct rootq->enqueue() call, so the value\n    reaches taprio_enqueue() before any dequeue cap runs.\n\nThe Fix:\nCap the mapping at the consumers and write the capped value back, so the\nqdisc's _tx[] lookup, the taprio q->qdiscs[] lookup and any later driver\nread stay in range.\n\nOn the dequeue side the cap folds into the dequeue path instead of a\nseparate walk over the returned list: dequeue_skb() caps the head, and\neach bulk helper caps the element it appends. For a qdisc that is not\nTCQ_F_ONETXQUEUE, netdev_cap_txqueue() logs a ratelimited notice and\nselects queue 0.\n\nA TCQ_F_ONETXQUEUE qdisc is bound to a single tx queue: dequeue_skb() uses\nq->dev_queue for the frozen check, the BQL limit and the trace point, while\nqdisc_restart() transmits on the skb's queue. Capping an out-of-range\nmapping to queue 0 would therefore send a per-queue child's skb through a\ndifferent queue than the one it was dequeued for. On mq, mqprio, taprio and\nhtb offload children, a stopped queue 0 could then park the list in\nq->gso_skb, and the later wake would schedule queue 0's own child instead\nof this qdisc. Pin a TCQ_F_ONETXQUEUE mapping to the qdisc's own queue to\nkeep the documented invariant.\n\nThe pin covers every mapping, not only an out-of-range one: an in-range\nmapping that a filter sets on one of those per-queue children is rewritten\nto the child's own queue, and this path does not call netdev_cap_txqueue(),\nso it logs no notice. On a single-queue device qdisc_create() sets\nTCQ_F_ONETXQUEUE, so the one-queue trigger described below also takes this\nbranch and is corrected without a notice.\n\nThat also keeps a bulk list on one queue by construction: every element of\na TCQ_F_ONETXQUEUE qdisc, including a follower changed by a filter, is\npinned to q->dev_queue before it is appended. The fast bulk helper\ntherefore needs no head comparison and no skb_bad_txq requeue; the slow\nhelper, used only by non-ONETXQUEUE qdiscs, still compares and requeues a\nmismatched follower, where a wake on any queue reschedules q.\n\nOn the enqueue side taprio_enqueue() caps the mapping against\nreal_num_tx_queues and writes it back before selecting q->qdiscs[queue], so\na duplicating child cannot steer the clone out of the array.\n\nConditions to recreate the bug:\nThe dequeue path: load a SCHED_CLS or SCHED_ACT program that stores\n__sk_buff->queue_mapping (a tc BPF action is enough), attach it to a\ntransmit qdisc (for example a matchall filter on a prio root), and send a\npacket. With a 1-queue device a store of 1 indexes one past dev->_tx[].\nUnder KASAN with panic_on_warn=1 the unfixed kernel faults with \"BUG:\nKASAN: slab-out-\n---truncated---","score":null,"severity":"unknown","published":"2026-11-20T05:49:54.656Z","modified":"2026-11-20T05:49:54.656Z","withdrawn":false,"knownExploited":false,"affected":[],"products":[{"vendor":"Linux","name":"Linux","platforms":[],"versions":[{"version":"74e31ca850c1cddeca03503171dd145b6ce293b6","status":"affected","lessThan":"8182ba13500b39d75b66fe9f37e13cb325c4b17e","versionType":"git"},{"version":"74e31ca850c1cddeca03503171dd145b6ce293b6","status":"affected","lessThan":"7445eccce376f7adb876c9f466d7d893344af7ce","versionType":"git"},{"version":"74e31ca850c1cddeca03503171dd145b6ce293b6","status":"affected","lessThan":"7327092a678bfcb1bae033acb1be1006a1399e30","versionType":"git"},{"version":"74e31ca850c1cddeca03503171dd145b6ce293b6","status":"affected","lessThan":"f19f2b308beb158d0e6f6eb806ced636e4ebf6ce","versionType":"git"}],"defaultStatus":"unaffected","cpes":[],"source":"Linux","url":"https://www.cve.org/CVERecord?id=CVE-2026-99638"},{"vendor":"Linux","name":"Linux","platforms":[],"versions":[{"version":"5.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.1","versionType":"semver"},{"version":"6.12.118","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.64","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.5","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"defaultStatus":"affected","cpes":[],"source":"Linux","url":"https://www.cve.org/CVERecord?id=CVE-2026-99638"}],"remediation":[],"references":["https://git.kernel.org/stable/c/8182ba13500b39d75b66fe9f37e13cb325c4b17e","https://git.kernel.org/stable/c/7445eccce376f7adb876c9f466d7d893344af7ce","https://git.kernel.org/stable/c/7327092a678bfcb1bae033acb1be1006a1399e30","https://git.kernel.org/stable/c/f19f2b308beb158d0e6f6eb806ced636e4ebf6ce"],"sources":[{"name":"CVE","id":"CVE-2026-99638","modified":"2026-11-20T05:49:54.656Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-99638"}],"assessments":[],"sourceAffected":[],"observedAt":"2026-11-20T06:06:03.609Z","kev":{"status":"not-listed","checkedAt":"2026-11-22T13:20:32.081Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-11-21T12:55:35.605Z","attemptedAt":"2026-11-21T12:55:35.605Z"},{"source":"GHSA","status":"available","checkedAt":"2026-11-21T12:15:33.189Z","attemptedAt":"2026-11-21T12:15:33.189Z"},{"source":"EUVD","status":"available","checkedAt":"2026-11-21T11:35:36.877Z","attemptedAt":"2026-11-21T11:35:36.877Z"},{"source":"EPSS","status":"available","checkedAt":"2026-11-21T11:15:34.943Z","attemptedAt":"2026-11-21T11:15:34.943Z"}],"evidence":[{"source":"FIRST EPSS","id":"CVE-2026-99638","url":"https://www.first.org/epss/","probability":0.00176,"percentile":0.07264,"date":"2026-11-20","checkedAt":"2026-11-21T11:15:34.943Z"},{"source":"ENISA EUVD","id":"EUVD-2026-130931","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-130931","modified":"Nov 20, 2026, 5:49:54 AM","checkedAt":"2026-11-21T11:35:36.877Z"},{"source":"GitHub Advisory Database","id":"GHSA-mc2m-r8cg-frfw","url":"https://github.com/advisories/GHSA-mc2m-r8cg-frfw","modified":"2026-11-20T06:32:06Z","checkedAt":"2026-11-21T12:15:33.189Z"},{"source":"NVD","id":"CVE-2026-99638","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99638","modified":"2026-11-20T06:17:57.087","checkedAt":"2026-11-21T12:55:35.605Z"}],"aiSummary":null}