[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190520124014.GA5205@amd>
Date: Mon, 20 May 2019 14:40:14 +0200
From: Pavel Machek <pavel@...x.de>
To: stable@...nel.org, kernel list <linux-kernel@...r.kernel.org>,
gustavo@...eddedor.com, davem@...emloft.net,
gregkh@...uxfoundation.org
Subject: net: atm: Spectre v1 fix introduced bug in bcb964012d1b in -stable
In lecd_attach, if arg is < 0, it was treated as 0. Spectre v1 fix
changed that. Bug does not exist in mainline AFAICT.
Signed-off-by: Pavel Machek <pavel@...x.de>
# for 4.19.y
diff --git a/net/atm/lec.c b/net/atm/lec.c
index ad4f829193f0..ed279cd912f4 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -731,7 +731,7 @@ static int lecd_attach(struct atm_vcc *vcc, int arg)
i = arg;
if (arg >= MAX_LEC_ITF)
return -EINVAL;
- i = array_index_nospec(arg, MAX_LEC_ITF);
+ i = array_index_nospec(i, MAX_LEC_ITF);
if (!dev_lec[i]) {
int size;
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists