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  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]
Date:   Tue, 19 May 2020 15:39:07 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     boris.sukholitko@...adcom.com
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net v2] __netif_receive_skb_core: pass skb by reference

From: Boris Sukholitko <boris.sukholitko@...adcom.com>
Date: Tue, 19 May 2020 10:32:37 +0300

> __netif_receive_skb_core may change the skb pointer passed into it (e.g.
> in rx_handler). The original skb may be freed as a result of this
> operation.
> 
> The callers of __netif_receive_skb_core may further process original skb
> by using pt_prev pointer returned by __netif_receive_skb_core thus
> leading to unpleasant effects.
> 
> The solution is to pass skb by reference into __netif_receive_skb_core.
> 
> v2: Added Fixes tag and comment regarding ppt_prev and skb invariant.
> 
> Fixes: 88eb1944e18c ("net: core: propagate SKB lists through packet_type lookup")
> Signed-off-by: Boris Sukholitko <boris.sukholitko@...adcom.com>

Applied and queued up for -stable.

> @@ -4997,6 +4997,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc,
>  	bool deliver_exact = false;
>  	int ret = NET_RX_DROP;
>  	__be16 type;
> +	struct sk_buff *skb = *pskb;

I fixed up the reverse christmas tree variable ordering here, please take
care in this area next time.

Thank you.

Powered by blists - more mailing lists