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]
Message-ID: <44d9b02c-becc-4578-ba06-d4d9fa77b493@kernel.org>
Date: Sun, 19 Jan 2025 16:21:47 -0700
From: David Ahern <dsahern@...nel.org>
To: Shiming Cheng (成诗明)
 <Shiming.Cheng@...iatek.com>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
 "horms@...nel.org" <horms@...nel.org>, "kuba@...nel.org" <kuba@...nel.org>,
 "pabeni@...hat.com" <pabeni@...hat.com>,
 "edumazet@...gle.com" <edumazet@...gle.com>,
 "willemdebruijn.kernel@...il.com" <willemdebruijn.kernel@...il.com>,
 "linux-arm-kernel@...ts.infradead.org"
 <linux-arm-kernel@...ts.infradead.org>,
 "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
 "davem@...emloft.net" <davem@...emloft.net>,
 AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
 Lena Wang (王娜) <Lena.Wang@...iatek.com>
Subject: Re: [PATCH net v2] ipv6: socket SO_BINDTODEVICE lookup routing fail
 without IPv6 rule.

On 1/13/25 8:11 PM, Shiming Cheng (成诗明) wrote:
> 
>   ip -6 -netns test1 rule add from all unreachable pri 1
>   ip -netns test1 rule add from all unreachable pri 1

The bug is in ipv4, ip_route_output_key_hash_rc():

   err = fib_lookup(net, fl4, res, 0);
   if (err) {
        res->fi = NULL;
        res->table = NULL;
        if (fl4->flowi4_oif &&
           (ipv4_is_multicast(fl4->daddr) || !fl4->flowi4_l3mdev)) {
...

The fib lookup should fail because of the unreachable rule, but the
output side is overlooking it for this legacy reason.

ip6_route_output_flags does not have this exception and so it is rightly
failing.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ