[Cake] [PATCH net] sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb

Toke Høiland-Jørgensen toke at toke.dk
Wed Aug 31 17:31:38 EDT 2022


Eric Dumazet <edumazet at google.com> writes:

> On Wed, Aug 31, 2022 at 2:25 AM Toke Høiland-Jørgensen <toke at toke.dk> wrote:
>>
>> When the GSO splitting feature of sch_cake is enabled, GSO superpackets
>> will be broken up and the resulting segments enqueued in place of the
>> original skb. In this case, CAKE calls consume_skb() on the original skb,
>> but still returns NET_XMIT_SUCCESS. This can confuse parent qdiscs into
>> assuming the original skb still exists, when it really has been freed. Fix
>> this by adding the __NET_XMIT_STOLEN flag to the return value in this case.
>>
>
> I think you forgot to give credits to the team who discovered this issue.
>
> Something like this
>
> Reported-by: zdi-disclosures at trendmicro.com # ZDI-CAN-18231

Ah, right; apologies, will respin!

It also looks like fixing it this way will actually break other things
(most notably sch_cake as a child of sch_htb), so will send a different
patch as v2...

-Toke


More information about the Cake mailing list