[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1432805482-24129-7-git-send-email-dmitry.kalinkin@gmail.com>
Date: Thu, 28 May 2015 12:31:12 +0300
From: Dmitry Kalinkin <dmitry.kalinkin@...il.com>
To: linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Cc: Martyn Welch <martyn.welch@...com>,
Manohar Vanga <manohar.vanga@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Igor Alekseev <igor.alekseev@...p.ru>,
Dmitry Kalinkin <dmitry.kalinkin@...il.com>
Subject: [PATCHv2 06/16] vme: check for A64 overflow in vme_check_window()
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@...il.com>
Cc: Igor Alekseev <igor.alekseev@...p.ru>
---
drivers/vme/vme.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c
index 6bab2c4..1b78d27 100644
--- a/drivers/vme/vme.c
+++ b/drivers/vme/vme.c
@@ -199,10 +199,8 @@ static int vme_check_window(u32 aspace, unsigned long long vme_base,
retval = -EFAULT;
break;
case VME_A64:
- /*
- * Any value held in an unsigned long long can be used as the
- * base
- */
+ if ((size != 0) && (vme_base > U64_MAX + 1 - size))
+ retval = -EFAULT;
break;
case VME_CRCSR:
if (((vme_base + size) > VME_CRCSR_MAX) ||
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists