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]
Date:   Tue, 17 May 2022 17:10:26 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     dsahern@...nel.org, Ido Schimmel <idosch@...dia.com>
Cc:     Saranya Panjarathina <plsaranya@...il.com>, netdev@...r.kernel.org,
        Saranya_Panjarathina@...l.com, davem@...emloft.net,
        yoshfuji@...ux-ipv6.org, edumazet@...gle.com, pabeni@...hat.com,
        linux-kernel@...r.kernel.org, g_balaji1@...l.com,
        Nikolay Aleksandrov <razor@...ckwall.org>
Subject: Re: [PATCH net-next] net: PIM register decapsulation and
 Forwarding.

On Mon, 16 May 2022 04:29:06 -0700 Saranya Panjarathina wrote:
> PIM register packet is decapsulated but not forwarded in RP
> 
> __pim_rcv decapsulates the PIM register packet and reinjects for forwarding
> after replacing the skb->dev to reg_dev (vif with VIFF_Register)
> 
> Ideally the incoming device should be same as skb->dev where the
> original PIM register packet is received. mcache would not have
> reg_vif as IIF. Decapsulated packet forwarding is failing
> because of IIF mismatch. In RP for this S,G RPF interface would be
> skb->dev vif only, so that would be IIF for the cache entry.
> 
> Signed-off-by: Saranya Panjarathina <plsaranya@...il.com>

Not sure if this can cause any trouble. And why it had become 
a problem now, seems like the code has been this way forever.
David? Ido?

> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
> index 13e6329784fb..7b9586335fb7 100644
> --- a/net/ipv4/ipmr.c
> +++ b/net/ipv4/ipmr.c
> @@ -598,7 +598,7 @@ static int __pim_rcv(struct mr_table *mrt, struct sk_buff *skb,
>  	skb->protocol = htons(ETH_P_IP);
>  	skb->ip_summed = CHECKSUM_NONE;
>  
> -	skb_tunnel_rx(skb, reg_dev, dev_net(reg_dev));
> +	skb_tunnel_rx(skb, skb->dev, dev_net(skb->dev));
>  
>  	netif_rx(skb);
>  
> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
> index 4e74bc61a3db..147e29a818ca 100644
> --- a/net/ipv6/ip6mr.c
> +++ b/net/ipv6/ip6mr.c
> @@ -566,7 +566,7 @@ static int pim6_rcv(struct sk_buff *skb)
>  	skb->protocol = htons(ETH_P_IPV6);
>  	skb->ip_summed = CHECKSUM_NONE;
>  
> -	skb_tunnel_rx(skb, reg_dev, dev_net(reg_dev));
> +	skb_tunnel_rx(skb, skb->dev, net);
>  
>  	netif_rx(skb);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ