lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 15 Sep 2023 16:40:17 +0200
From:   Eric Dumazet <edumazet@...gle.com>
To:     Ma Ke <make_ruc2021@....com>
Cc:     jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
        davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: sched: htb: dont intepret cls results when asked to drop

On Fri, Sep 15, 2023 at 4:27 PM Ma Ke <make_ruc2021@....com> wrote:
>
> If asked to drop a packet via TC_ACT_SHOT it is unsafe to
> assume that res.class contains a valid pointer.
>
> Signed-off-by: Ma Ke <make_ruc2021@....com>
> ---
>  net/sched/sch_htb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
> index 0d947414e616..7b2e5037b713 100644
> --- a/net/sched/sch_htb.c
> +++ b/net/sched/sch_htb.c
> @@ -243,6 +243,8 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch,
>
>         *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
>         while (tcf && (result = tcf_classify(skb, NULL, tcf, &res, false)) >= 0) {
> +               if (result == TC_ACT_SHOT)
> +                       return NULL;
>  #ifdef CONFIG_NET_CLS_ACT
>                 switch (result) {
>                 case TC_ACT_QUEUED:
> @@ -250,8 +252,6 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch,
>                 case TC_ACT_TRAP:
>                         *qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
>                         fallthrough;
> -               case TC_ACT_SHOT:
> -                       return NULL;
>                 }
>  #endif
>                 cl = (void *)res.class;

Can you please stop sending patches that are not needed,
as already pointed out ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ