All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "i40e/i40evf: Fix use after free in Rx cleanup path" has been added to the 4.9-stable tree
@ 2018-03-18 16:01 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-03-18 16:01 UTC (permalink / raw)
  To: alexander.h.duyck, alexander.levin, andrewx.bowers, gregkh,
	jeffrey.t.kirsher
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    i40e/i40evf: Fix use after free in Rx cleanup path

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     i40e-i40evf-fix-use-after-free-in-rx-cleanup-path.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Tue, 21 Feb 2017 15:55:41 -0800
Subject: i40e/i40evf: Fix use after free in Rx cleanup path

From: Alexander Duyck <alexander.h.duyck@intel.com>


[ Upstream commit 741b8b832a57402380be79d7d11a59eaf57fff3b ]

We need to reset skb back to NULL when we have freed it in the Rx cleanup
path.  I found one spot where this wasn't occurring so this patch fixes it.

Change-ID: Iaca68934200732cd4a63eb0bd83b539c95f8c4dd
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   |    1 +
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c |    1 +
 2 files changed, 2 insertions(+)

--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1820,6 +1820,7 @@ static int i40e_clean_rx_irq(struct i40e
 		 */
 		if (unlikely(i40e_test_staterr(rx_desc, BIT(I40E_RXD_QW1_ERROR_SHIFT)))) {
 			dev_kfree_skb_any(skb);
+			skb = NULL;
 			continue;
 		}
 
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1262,6 +1262,7 @@ static int i40e_clean_rx_irq(struct i40e
 		 */
 		if (unlikely(i40e_test_staterr(rx_desc, BIT(I40E_RXD_QW1_ERROR_SHIFT)))) {
 			dev_kfree_skb_any(skb);
+			skb = NULL;
 			continue;
 		}
 


Patches currently in stable-queue which might be from alexander.h.duyck@intel.com are

queue-4.9/i40e-i40evf-fix-use-after-free-in-rx-cleanup-path.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-18 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-18 16:01 Patch "i40e/i40evf: Fix use after free in Rx cleanup path" has been added to the 4.9-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.