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:   Mon, 26 Nov 2018 17:32:19 +0100
From:   Paolo Abeni <pabeni@...hat.com>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        netdev@...r.kernel.org
Cc:     davem@...emloft.net, Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net-next v2 1/2] udp: msg_zerocopy

Hi,

Sorry for the long delay...

On Mon, 2018-11-26 at 10:29 -0500, Willem de Bruijn wrote:
> @@ -1109,6 +1128,7 @@ static int __ip_append_data(struct sock *sk,
>  error_efault:
>  	err = -EFAULT;
>  error:
> +	sock_zerocopy_put_abort(uarg);
>  	cork->length -= length;
>  	IP_INC_STATS(sock_net(sk), IPSTATS_MIB_OUTDISCARDS);
>  	refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc);

Out of sheer ignorance on my side, don't we have a bad reference
accounting if e.g.:

- uarg is attached to multiple skbs, each holding a ref, 
- there is a failure on 'getfrag()'

Such failure will release 2 references (1 kfree_skb(), and another in
the above sock_zerocopy_put_abort(), as the count is still positive).

Cheers,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ