You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
5 years ago
|
From 9b0c48ef89505f95f495fc1d48ee2f489b657999 Mon Sep 17 00:00:00 2001
|
||
9 years ago
|
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
|
||
|
<marmarek@invisiblethingslab.com>
|
||
|
Date: Wed, 16 Dec 2015 05:22:24 +0100
|
||
6 years ago
|
Subject: [PATCH] xen-netfront: add range check for Tx response id
|
||
9 years ago
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Tx response ID is fetched from shared page, so make sure it is sane
|
||
|
before using it as an array index.
|
||
|
|
||
|
This is part of XSA155.
|
||
|
|
||
|
CC: stable@vger.kernel.org
|
||
|
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
|
||
|
---
|
||
|
drivers/net/xen-netfront.c | 1 +
|
||
|
1 file changed, 1 insertion(+)
|
||
|
|
||
|
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
|
||
5 years ago
|
index 66e972918f5b..a8a5da7461fc 100644
|
||
9 years ago
|
--- a/drivers/net/xen-netfront.c
|
||
|
+++ b/drivers/net/xen-netfront.c
|
||
5 years ago
|
@@ -392,6 +392,7 @@ static void xennet_tx_buf_gc(struct netfront_queue *queue)
|
||
9 years ago
|
continue;
|
||
|
|
||
|
id = txrsp.id;
|
||
|
+ BUG_ON(id >= NET_TX_RING_SIZE);
|
||
|
skb = queue->tx_skbs[id].skb;
|
||
|
if (unlikely(gnttab_query_foreign_access(
|
||
|
queue->grant_tx_ref[id]) != 0)) {
|
||
|
--
|
||
5 years ago
|
2.20.1
|
||
9 years ago
|
|