linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net: atm: Spectre v1 fix introduced bug in bcb964012d1b in -stable
@ 2019-05-20 12:40 Pavel Machek
  2019-05-20 14:00 ` Greg KH
  2019-05-20 14:15 ` Gustavo A. R. Silva
  0 siblings, 2 replies; 8+ messages in thread
From: Pavel Machek @ 2019-05-20 12:40 UTC (permalink / raw)
  To: stable, kernel list, gustavo, davem, gregkh

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]


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@denx.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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-20 21:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-20 12:40 net: atm: Spectre v1 fix introduced bug in bcb964012d1b in -stable Pavel Machek
2019-05-20 14:00 ` Greg KH
2019-05-20 14:26   ` Gustavo A. R. Silva
2019-05-20 21:00     ` Pavel Machek
2019-05-20 16:15   ` Pavel Machek
2019-05-20 14:15 ` Gustavo A. R. Silva
2019-05-20 16:15   ` Pavel Machek
2019-05-20 16:54     ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).