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>] [day] [month] [year] [list]
Date:   Thu, 29 Sep 2022 13:11:53 +0200
From:   Rasmus Villemoes <linux@...musvillemoes.dk>
To:     Network Development <netdev@...r.kernel.org>
Cc:     Lorenzo Colitti <lorenzo@...gle.com>,
        Vasiliy Kulikov <segoon@...nwall.com>
Subject: purpose of ping_hash() in net/ipv4/ping.c

Hi

I'm wondering about the purpose of the function ping_hash() in
net/ipv4/ping.c. It only contains an unconditional BUG(), with a comment
that doesn't help much.

It was there with the original commit c319b4d76b9e (net: ipv4: add
IPPROTO_ICMP socket kind), but then renamed and made non-static for
"use" by IPv6 in 6d0bfe226116 (net: ipv6: Add IPv6 support to the ping
socket.)

The latter commit also added the 'EXPORT_SYMBOL_GPL(ping_hash);' in a
somewhat non-standard location (namely, after the the similarly named
ping_hashfn()), which is why I stumbled on this oddity.

Can we just remove ping_hash() and stop setting .hash of in ping_prot
and pingv6_prot? I don't think there's much difference between a NULL
deref and an explicit BUG a few instructions later.

And if we can't, can someone perhaps improve the comment and move the
export to the right place?

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ