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-next>] [day] [month] [year] [list]
Date:   Tue, 13 Nov 2018 20:41:22 -0800
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     "Anand H. Krishnan" <anandhkrishnan@...il.com>
Cc:     Network Development <netdev@...r.kernel.org>
Subject: Re: VETH & AF_PACKET problem

On Tue, Nov 13, 2018 at 8:29 PM Anand H. Krishnan
<anandhkrishnan@...il.com> wrote:
>
> skb_scrub_packet calls skb_orphan and from there the destructor is called.

Not since

  commit 9c4c325252c54b34d53b3d0ffd535182b744e03d
  skbuff: preserve sock reference when scrubbing the skb.
  v4.19-rc1~140^2~523^2

But the general issue is valid that the tx_ring slot should not be
released until all users of the pages are freed, not just when the
skb is orphaned (e.g., on skb_set_owner_r).

I think that this can happen even on a transmit to a physical
nic, if a clone is queued for reception on a packet socket. That
clone does not clone the destructor, so if the reader is slow,
the slot may be released from consume_skb on the original
path.

I have not verified this yet. But if correct, then the long term
solution is to use refcounted uarg, similar to msg_zerocopy.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ