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, 18 Jul 2022 10:48:06 -0700
From:   Tony Nguyen <>
Cc:     Przemyslaw Patynowski <>,,,
        Jesse Brandeburg <>,
        Konrad Jankowski <>
Subject: [PATCH net v2 3/4] iavf: Fix handling of dummy receive descriptors

From: Przemyslaw Patynowski <>

Fix memory leak caused by not handling dummy receive descriptor properly.
iavf_get_rx_buffer now sets the rx_buffer return value for dummy receive
descriptors. Without this patch, when the hardware writes a dummy
descriptor, iavf would not free the page allocated for the previous receive
buffer. This is an unlikely event but can still happen.

[Jesse: massaged commit message]

Fixes: efa14c398582 ("iavf: allow null RX descriptors")
Signed-off-by: Przemyslaw Patynowski <>
Signed-off-by: Jesse Brandeburg <>
Tested-by: Konrad Jankowski <>
Signed-off-by: Tony Nguyen <>
 drivers/net/ethernet/intel/iavf/iavf_txrx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_txrx.c b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
index 7bf8c25dc824..06d18797d25a 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
@@ -1285,11 +1285,10 @@ static struct iavf_rx_buffer *iavf_get_rx_buffer(struct iavf_ring *rx_ring,
 	struct iavf_rx_buffer *rx_buffer;
-	if (!size)
-		return NULL;
 	rx_buffer = &rx_ring->rx_bi[rx_ring->next_to_clean];
+	if (!size)
+		return rx_buffer;
 	/* we are reusing so sync this buffer for CPU use */

Powered by blists - more mailing lists