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]
Message-ID: <CAJwJo6bXoFN4k5Y58Uz4NiaBs1EuvZQ0EQsjOrH_bKkGQJp2KA@mail.gmail.com>
Date: Thu, 23 Oct 2025 00:53:34 +0100
From: Dmitry Safonov <0x7f454c46@...il.com>
To: Eric Biggers <ebiggers@...nel.org>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>, 
	Neal Cardwell <ncardwell@...gle.com>, Kuniyuki Iwashima <kuniyu@...gle.com>, 
	"David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Simon Horman <horms@...nel.org>, David Ahern <dsahern@...nel.org>, 
	Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [PATCH net-next] tcp: Remove unnecessary null check in tcp_inbound_md5_hash()

On Wed, 22 Oct 2025 at 23:12, Eric Biggers <ebiggers@...nel.org> wrote:
>
> The 'if (!key && hash_location)' check in tcp_inbound_md5_hash() implies
> that hash_location might be null.  However, later code in the function
> dereferences hash_location anyway, without checking for null first.
> Fortunately, there is no real bug, since tcp_inbound_md5_hash() is
> called only with non-null values of hash_location.
>
> Therefore, remove the unnecessary and misleading null check of
> hash_location.  This silences a Smatch static checker warning
> (https://lore.kernel.org/netdev/aPi4b6aWBbBR52P1@stanley.mountain/)
>
> Also fix the related comment at the beginning of the function.
>
> Signed-off-by: Eric Biggers <ebiggers@...nel.org>

Reviewed-by: Dmitry Safonov <0x7f454c46@...il.com>

Yeah, I think it's a left-over from the time when there was only
TCP-MD5 support.

Thanks for cleaning this up,
             Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ