From: David Miller <davem@davemloft.net>
To: jcline@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
jpoimboe@redhat.com, konrad.wilk@oracle.com,
jamie.iles@oracle.com, liran.alon@oracle.com,
stable@vger.kernel.org
Subject: Re: [PATCH] net: sock_diag: Fix spectre v1 gadget in __sock_diag_cmd()
Date: Tue, 14 Aug 2018 10:05:03 -0700 (PDT) [thread overview]
Message-ID: <20180814.100503.1519932338963499861.davem@davemloft.net> (raw)
In-Reply-To: <20180813222313.3510-1-jcline@redhat.com>
From: Jeremy Cline <jcline@redhat.com>
Date: Mon, 13 Aug 2018 22:23:13 +0000
> req->sdiag_family is a user-controlled value that's used as an array
> index. Sanitize it after the bounds check to avoid speculative
> out-of-bounds array access.
>
> This also protects the sock_is_registered() call, so this removes the
> sanitize call there.
>
> Fixes: e978de7a6d38 ("net: socket: Fix potential spectre v1 gadget in sock_is_registered")
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> Cc: konrad.wilk@oracle.com
> Cc: jamie.iles@oracle.com
> Cc: liran.alon@oracle.com
> Cc: stable@vger.kernel.org
> Signed-off-by: Jeremy Cline <jcline@redhat.com>
> ---
>
> Since commit e978de7a6d38 didn't apply cleanly to v4.14, this won't
> either since it reverts that change. To apply cleanly there, the change
> to sock_is_registered() needs to be dropped.
Applied, thank you.
prev parent reply other threads:[~2018-08-14 17:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-13 22:23 [PATCH] net: sock_diag: Fix spectre v1 gadget in __sock_diag_cmd() Jeremy Cline
2018-08-14 17:05 ` David Miller [this message]
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=20180814.100503.1519932338963499861.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jamie.iles@oracle.com \
--cc=jcline@redhat.com \
--cc=jpoimboe@redhat.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liran.alon@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.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 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).