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:   Wed, 12 Jan 2022 05:06:49 -0800
From:   Eric Dumazet <edumazet@...gle.com>
To:     Maxim Mikityanskiy <maximmi@...dia.com>
Cc:     Eric Dumazet <eric.dumazet@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Tariq Toukan <tariqt@...dia.com>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] sch_api: Don't skip qdisc attach on ingress

On Wed, Jan 12, 2022 at 2:28 AM Maxim Mikityanskiy <maximmi@...dia.com> wrote:
>
> The attach callback of struct Qdisc_ops is used by only a few qdiscs:
> mq, mqprio and htb. qdisc_graft() contains the following logic
> (pseudocode):
>
>     if (!qdisc->ops->attach) {
>         if (ingress)
>             do ingress stuff;
>         else
>             do egress stuff;
>     }
>     if (!ingress) {
>         ...
>         if (qdisc->ops->attach)
>             qdisc->ops->attach(qdisc);
>     } else {
>         ...
>     }
>
> unregister_netdevice: waiting for lo to become free. Usage count = 2
>
> This commit addresses the issue by running "do ingress stuff" in the
> ingress flow even in the attach callback is present, which is fine,
> because attach isn't going to be called afterwards.
>
> The bug was found by syzbot and reported by Eric.
>
> Fixes: d03b195b5aa0 ("sch_htb: Hierarchical QoS hardware offload")
> Signed-off-by: Maxim Mikityanskiy <maximmi@...dia.com>
> Reported-by: Eric Dumazet <edumazet@...gle.com>
> ---

Thanks for fixing this issue.

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ