From: Pavel Machek <pavel@denx.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Pavel Machek <pavel@denx.de>,
stable@kernel.org, kernel list <linux-kernel@vger.kernel.org>,
gustavo@embeddedor.com, davem@davemloft.net
Subject: Re: net: atm: Spectre v1 fix introduced bug in bcb964012d1b in -stable
Date: Mon, 20 May 2019 18:15:42 +0200 [thread overview]
Message-ID: <20190520161541.GA25789@amd> (raw)
In-Reply-To: <20190520140007.GA6397@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
On Mon 2019-05-20 16:00:07, Greg KH wrote:
> On Mon, May 20, 2019 at 02:40:14PM +0200, Pavel Machek wrote:
> >
> > 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;
> >
>
> Why is this only for 4.19.y? What is different in Linus's tree that
> makes this not needed there?
Mainline sanitizes "arg", 4.19 copies "arg" into "i" then sanitizes
it. Take a look, it is local to the function.
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2019-05-20 16:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190520161541.GA25789@amd \
--to=pavel@denx.de \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo@embeddedor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.