Description
In the Linux kernel, the following vulnerability has been resolved: net/sched: cls_api: Handle TC_ACT_CONSUMED in tcf_qevent_handle tcf_classify() can return TC_ACT_CONSUMED while the skb is held by the defragmentation engine (e.g. act_ct on out-of-order fragments). When that happens the skb is no longer owned by the caller and must not be touched again. tcf_qevent_handle() did not handle TC_ACT_CONSUMED: it fell through the switch and returned the skb to the caller as if classification had passed. The only qdisc that wires up qevents today is RED, via three call sites (qe_mark on RED_PROB_MARK/HARD_MARK, qe_early_drop on congestion_drop) red_enqueue() was continuing to operate on an skb it no longer owns in this case -- enqueueing it, dropping it, or updating statistics. Resulting in a UAF. tc qdisc add dev eth0 root handle 1: red ... qevent early_drop block 10 tc filter add block 10 ... action ct (with ct defrag enabled and traffic that produces out-of-order fragments, e.g. a fragmented UDP stream) Handle TC_ACT_CONSUMED in tcf_qevent_handle() the same way the ingress and egress fast paths do: treat it as stolen and return NULL without touching the skb. Unlike the TC_ACT_STOLEN case, the skb must not be dropped/freed here, as it is no longer owned by us.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
172ba7d46c202e679f3ccb10264c67416aaeb1c4 to < 5ed3d6f85991656667059d3fa5a1d683ac58c447affected0b5b831122fc3789fff75be433ba3e4dd7b779d4 to < f42e8134a3a1074b834a574d404352f867ba994aaffected73f7da5fd124f2cda9161e2e46114915e6e82e97 to < 447d493034a9cf7bf13a2abac86d0573d907ec2faffected3f14b377d01d8357eba032b4cabc8c1149b458b6 to < e1270e69dcf2c3512c453484178f2e9dc0db3f05affected3f14b377d01d8357eba032b4cabc8c1149b458b6 to < 2140c2f3f2e7b066e1ae616ede8856cafd8015e9affected3f14b377d01d8357eba032b4cabc8c1149b458b6 to < e28aedab9488343924d227b5a896faed67ce84d5affected3f14b377d01d8357eba032b4cabc8c1149b458b6 to < a8a02897f2b479127db261de05cbf0c28b98d159affectedf5346df0591d10bc948761ca854b1fae6d2ef441affected5.15.148 to < 5.15.212affected6.1.75 to < 6.1.178affected6.6.14 to < 6.6.145affected6.7.2 to < 6.8affected
Linux Linux
Default version status: affected
6.8affected0 to < 6.8unaffected5.15.212 to ≤ 5.15.*unaffected6.1.178 to ≤ 6.1.*unaffected6.6.145 to ≤ 6.6.*unaffected6.12.97 to ≤ 6.12.*unaffected6.18.40 to ≤ 6.18.*unaffected7.1.5 to ≤ 7.1.*unaffected7.2 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/5ed3d6f85991656667059d3fa5a1d683ac58c447 ↗
- https://git.kernel.org/stable/c/f42e8134a3a1074b834a574d404352f867ba994a ↗
- https://git.kernel.org/stable/c/447d493034a9cf7bf13a2abac86d0573d907ec2f ↗
- https://git.kernel.org/stable/c/e1270e69dcf2c3512c453484178f2e9dc0db3f05 ↗
- https://git.kernel.org/stable/c/2140c2f3f2e7b066e1ae616ede8856cafd8015e9 ↗
- https://git.kernel.org/stable/c/e28aedab9488343924d227b5a896faed67ce84d5 ↗
- https://git.kernel.org/stable/c/a8a02897f2b479127db261de05cbf0c28b98d159 ↗