[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025070231-unrented-sulfate-8b6f@gregkh>
Date: Wed, 2 Jul 2025 07:40:58 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Xiang Mei <xmei5@....edu>
Cc: xiyou.wangcong@...il.com, netdev@...r.kernel.org, jhs@...atatu.com,
jiri@...nulli.us, security@...nel.org
Subject: Re: [PATCH] net/sched: sch_qfq: Fix null-deref in agg_dequeue
On Tue, Jul 01, 2025 at 09:02:28PM -0700, Xiang Mei wrote:
> From: n132 <xmei5@....edu>
>
> To prevent a potential crash in agg_dequeue (net/sched/sch_qfq.c)
> when cl->qdisc->ops->peek(cl->qdisc) returns NULL, we check the return
> value before using it, similar to the existing approach in sch_hfsc.c.
>
> To avoid code duplication, the following changes are made:
>
> 1. Moved qdisc_warn_nonwc to include/net/sch_generic.h and removed
> its EXPORT_SYMBOL declaration, since all users include the header.
>
> 2. Moved qdisc_peek_len from net/sched/sch_hfsc.c to
> include/net/sch_generic.h so that sch_qfq can reuse it.
>
> 3. Applied qdisc_peek_len in agg_dequeue to avoid crashing.
>
> Signed-off-by: n132 <xmei5@....edu>
We need a real name, sorry. Please read the documentation for why.
thanks,
greg k-h
Powered by blists - more mailing lists