From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Riley <security@copperfault.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] net/sched: etf: propagate dequeue drops to parents
Date: Wed, 04 Nov 2026 16:06:09 -0800 [thread overview]
Message-ID: <87v76cuopa.fsf@intel.com> (raw)
In-Reply-To: <20261104135707.725-1-me@riley.kitchen>
> From: Riley Kitchen <security@copperfault.com>
>
> etf_dequeue_timesortedlist() drops expired packets via
> timesortedlist_drop(), but that path only decrements ETF's own qlen and
> backlog. It never calls qdisc_tree_reduce_backlog(), so a classful
> parent keeps accounting packets that no longer exist.
>
> With ETF installed below QFQ, this leaves QFQ with a nonzero qlen after
> its last active aggregate has drained. qfq_dequeue() then skips its
> empty-queue early return, qfq_choose_next_agg() returns NULL, and
> qfq_peek_skb() dereferences the NULL aggregate, panicking the kernel. An
> unprivileged (uid 1000) process can trigger this deterministically after
> creating user and network namespaces; no race and no modified kernel are
> required.
>
> Count the packets and bytes dropped in timesortedlist_drop() and call
> qdisc_tree_reduce_backlog() once the local queue state is consistent, so
> classful ancestors see the removal.
>
> The issue was found and the fix developed with AI assistance. A
> standalone C reproducer, run as uid 1000 with no kernel changes,
> panicked v7.3 and mainline d135ab453a74 under KASAN; with this fix the
> reproducer exits cleanly and parent and child backlogs both reach zero.
> The reproducer is available privately on request.
>
> Fixes: 25db26a91364 ("net/sched: Introduce the ETF Qdisc")
> Cc: stable@vger.kernel.org
> Signed-off-by: Riley Kitchen <security@copperfault.com>
> ---
It seems that ETF under QFQ won't work well, as ETF can drop packets and
is not work conserving. But the patch looks good:
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cheers,
--
Vinicius
prev parent reply other threads:[~2026-11-05 0:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 13:57 [PATCH net] net/sched: etf: propagate dequeue drops to parents Riley
2026-11-05 0:06 ` Vinicius Costa Gomes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v76cuopa.fsf@intel.com \
--to=vinicius.gomes@intel.com \
--cc=netdev@vger.kernel.org \
--cc=security@copperfault.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox