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]
Date:   Wed, 20 Mar 2019 21:42:27 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Vakul Garg <vakul.garg@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc:     "borisp@...lanox.com" <borisp@...lanox.com>,
        "aviadye@...lanox.com" <aviadye@...lanox.com>,
        "davejwatson@...com" <davejwatson@...com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "doronrk@...com" <doronrk@...com>
Subject: Re: [PATCH net-next] net/tls: Replace kfree_skb() with consume_skb()



On 03/20/2019 06:51 PM, Vakul Garg wrote:
> To free the skb in normal course of processing, consume_skb() should be
> used. Only for failure paths, skb_free() is intended to be used.
> 
> https://www.kernel.org/doc/htmldocs/networking/API-consume-skb.html
> 
> Signed-off-by: Vakul Garg <vakul.garg@....com>
> ---

...

>  		skb = next_skb;
> @@ -2090,7 +2090,7 @@ void tls_sw_release_resources_rx(struct sock *sk)
>  	struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
>  
>  	if (ctx->aead_recv) {
> -		kfree_skb(ctx->recv_pkt);
> +		consume_skb(ctx->recv_pkt);
>  		ctx->recv_pkt = NULL;
>  		skb_queue_purge(&ctx->rx_list);
>  		crypto_free_aead(ctx->aead_recv);
> 

But skb_queue_purge() will call kfree_skb() anyway.

It looks like the skb is really dropped in this context, it was not consumed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ