Skip to content

Commit 88fae87

Browse files
mstsirkindavem330
authored andcommitted
tap: fix use-after-free
Lockless access to __ptr_ring_full is only legal if ring is never resized, otherwise it might cause use-after free errors. Simply drop the lockless test, we'll drop the packet a bit later when produce fails. Fixes: 362899b ("macvtap: switch to use skb array") Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a259df3 commit 88fae87

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎drivers/net/tap.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,6 @@ rx_handler_result_t tap_handle_frame(struct sk_buff **pskb)
330330
if (!q)
331331
return RX_HANDLER_PASS;
332332

333-
if (__ptr_ring_full(&q->ring))
334-
goto drop;
335-
336333
skb_push(skb, ETH_HLEN);
337334

338335
/* Apply the forward feature mask so that we perform segmentation

0 commit comments

Comments
 (0)