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] [day] [month] [year] [list]
Date:   Tue, 21 Mar 2023 13:49:38 -0700
From:   Saeed Mahameed <saeed@...nel.org>
To:     Jakob Koschel <jkl820.git@...il.com>
Cc:     Boris Pismenny <borisp@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>,
        Leon Romanovsky <leon@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
        Pietro Borrello <borrello@...g.uniroma1.it>,
        Cristiano Giuffrida <c.giuffrida@...nl>,
        "Bos, H.J." <h.j.bos@...nl>
Subject: Re: [PATCH net-next] net/mlx5e: avoid usage of list iterator after
 loop

On 13 Mar 16:26, Jakob Koschel wrote:
>If potentially no valid element is found, 'priv_rx' would contain an
>invalid pointer past the iterator loop. To ensure 'priv_rx' is always
>valid, we only set it if the correct element was found. That allows
>adding a WARN_ON() in case the code works incorrectly, exposing
>currently undetectable potential bugs.
>
>Additionally, Linus proposed to avoid any use of the list iterator
>variable after the loop, in the attempt to move the list iterator
>variable declaration into the macro to avoid any potential misuse after
>the loop [1].
>
>Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
>Signed-off-by: Jakob Koschel <jkl820.git@...il.com>

Applied to net-next-mlx5.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ