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  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, 17 Jun 2022 16:39:21 +0000
From:   Carlos Llamas <>
To:     Riccardo Paolo Bestetti <>
Cc:     "David S . Miller" <>,
        Hideaki YOSHIFUJI <>,
        David Ahern <>,
        Eric Dumazet <>,
        Jakub Kicinski <>,
        Paolo Abeni <>,,,,
        Miaohe Lin <>,
        Maciej ┼╗enczykowski <>
Subject: Re: [PATCH v2] ipv4: ping: fix bind address validity check

On Fri, Jun 17, 2022 at 10:54:35AM +0200, Riccardo Paolo Bestetti wrote:
> Commit 8ff978b8b222 ("ipv4/raw: support binding to nonlocal addresses")
> introduced a helper function to fold duplicated validity checks of bind
> addresses into inet_addr_valid_or_nonlocal(). However, this caused an
> unintended regression in ping_check_bind_addr(), which previously would
> reject binding to multicast and broadcast addresses, but now these are
> both incorrectly allowed as reported in [1].
> This patch restores the original check. A simple reordering is done to
> improve readability and make it evident that multicast and broadcast
> addresses should not be allowed. Also, add an early exit for INADDR_ANY
> which replaces lost behavior added by commit 0ce779a9f501 ("net: Avoid
> unnecessary inet_addr_type() call when addr is INADDR_ANY").
> Furthermore, this patch introduces regression selftests to catch these
> specific cases.
> [1]
> Fixes: 8ff978b8b222 ("ipv4/raw: support binding to nonlocal addresses")
> Cc: Miaohe Lin <>
> Reported-by: Maciej ┼╗enczykowski <>
> Signed-off-by: Carlos Llamas <>
> Signed-off-by: Riccardo Paolo Bestetti <>
> ---
> This patch is sent as a follow-up to the discussion on the v1 by Carlos
> Llamas.
> Original thread:

Reviewed-by: Carlos Llamas <>

Thanks Riccardo for adding the test cases. I would appreciate it if next
time you add a co-developed tag or maybe a separate commit as opposed to
overriding the original author. This is fine though.

Carlos Llamas

Powered by blists - more mailing lists