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]
Message-ID: <E2595146-5AD0-4030-ABF2-C93B06897123@tencent.com>
Date:   Thu, 14 Apr 2022 01:51:10 +0000
From:   imagedong(董梦龙) <imagedong@...cent.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
CC:     David Ahern <dsahern@...nel.org>, netdev <netdev@...r.kernel.org>,
        "Eric Dumazet" <edumazet@...gle.com>,
        benbjiang(蒋彪) <benbjiang@...cent.com>,
        flyingpeng(彭浩) <flyingpeng@...cent.com>,
        "David S . Miller" <davem@...emloft.net>,
        "Jakub Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next] ipv6: fix NULL deref in ip6_rcv_core()

On 2022/4/14 04:57,“Eric Dumazet”<eric.dumazet@...il.com> write:
> From: Eric Dumazet <edumazet@...gle.com>
> 
> idev can be NULL, as the surrounding code suggests.
> 
> Fixes: 4daf841a2ef3 ("net: ipv6: add skb drop reasons to ip6_rcv_core()")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Menglong Dong <imagedong@...cent.com>
> Cc: Jiang Biao <benbjiang@...cent.com>
> Cc: Hao Peng <flyingpeng@...cent.com>
> ---
>  net/ipv6/ip6_input.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
> index 126ae3aa67e1dc579bc0eecd21416e9d89dcbf08..0322cc86b84eaaed7529a4b65fdfba4c97a38375 100644
> --- a/net/ipv6/ip6_input.c
> +++ b/net/ipv6/ip6_input.c
> @@ -166,7 +166,7 @@ static struct sk_buff *ip6_rcv_core(struct sk_buff *skb, struct net_device *dev,
>  	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL ||
>  	    !idev || unlikely(idev->cnf.disable_ipv6)) {
>  		__IP6_INC_STATS(net, idev, IPSTATS_MIB_INDISCARDS);
> -		if (unlikely(idev->cnf.disable_ipv6))
> +		if (idev && unlikely(idev->cnf.disable_ipv6))
>  			SKB_DR_SET(reason, IPV6DISABLED);
>  		goto drop;
>  	}

Reviewed-by: Menglong Dong <imagedong@...cent.com>

> -- 
> 2.35.1.1178.g4f1659d476-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ