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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47987a0e-0626-04f8-b181-ff3bc257a269@kernel.org>
Date:   Thu, 31 Mar 2022 08:13:24 -0600
From:   David Ahern <dsahern@...nel.org>
To:     "Pudak, Filip" <Filip.Pudak@...driver.com>,
        "Xiao, Jiguang" <Jiguang.Xiao@...driver.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "yoshfuji@...ux-ipv6.org" <yoshfuji@...ux-ipv6.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: This counter "ip6InNoRoutes" does not follow the RFC4293
 specification implementation

On 3/31/22 3:13 AM, Pudak, Filip wrote:
> Hi David,
> 
> So we end up in ip6_pkt_discard -> ip6_pkt_drop :
> 
> ---
> if (netif_is_l3_master(skb->dev) &&
> 	    dst->dev == net->loopback_dev)

That's a bug. I can not think of a case where those 2 conditions will
ever be true at the same time. I think that should '||'


> 		idev = __in6_dev_get_safely(dev_get_by_index_rcu(net, IP6CB(skb)->iif));
> 	else
> 		idev = ip6_dst_idev(dst);
> 
> 	switch (ipstats_mib_noroutes) {
> 	case IPSTATS_MIB_INNOROUTES:
> 		type = ipv6_addr_type(&ipv6_hdr(skb)->daddr);
> 		if (type == IPV6_ADDR_ANY) {
> 			IP6_INC_STATS(net, idev, IPSTATS_MIB_INADDRERRORS);
> 			break;
> 		}
> 		fallthrough;
> 	case IPSTATS_MIB_OUTNOROUTES:
> 		IP6_INC_STATS(net, idev, ipstats_mib_noroutes);
> 		break;
> 	}
> 
> ---
> What happens in the case where the l3mdev is not used, is that we go into the else branch(idev = ip6_dst_idev(dst);) and then we can see that the counter is incremented on the loopback IF.
> 
> So is the only option that l3mdev should be used or is it strange to expect that the idev where the INNOROUTES should increment is the ingress device by default in this case?
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ