Re: [PATCH net] tun: Fix use-after-free on XDP_TX

2018-07-16 Thread David Miller
From: Toshiaki Makita Date: Fri, 13 Jul 2018 13:24:38 +0900 > On XDP_TX we need to free up the frame only when tun_xdp_tx() returns a > negative value. A positive value indicates that the packet is > successfully enqueued to the ptr_ring, so freeing the page causes > use-after-free. > > Fixes: 7

Re: [PATCH net] tun: Fix use-after-free on XDP_TX

2018-07-12 Thread Jesper Dangaard Brouer
On Fri, 13 Jul 2018 13:05:04 +0800 Jason Wang wrote: > On 2018年07月13日 12:24, Toshiaki Makita wrote: > > On XDP_TX we need to free up the frame only when tun_xdp_tx() returns a > > negative value. A positive value indicates that the packet is > > successfully enqueued to the ptr_ring, so freeing t

Re: [PATCH net] tun: Fix use-after-free on XDP_TX

2018-07-12 Thread Jason Wang
On 2018年07月13日 12:24, Toshiaki Makita wrote: On XDP_TX we need to free up the frame only when tun_xdp_tx() returns a negative value. A positive value indicates that the packet is successfully enqueued to the ptr_ring, so freeing the page causes use-after-free. Fixes: 735fc4054b3a ("xdp: chang

[PATCH net] tun: Fix use-after-free on XDP_TX

2018-07-12 Thread Toshiaki Makita
On XDP_TX we need to free up the frame only when tun_xdp_tx() returns a negative value. A positive value indicates that the packet is successfully enqueued to the ptr_ring, so freeing the page causes use-after-free. Fixes: 735fc4054b3a ("xdp: change ndo_xdp_xmit API to support bulking") Signed-off