[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180731212353.kydep424ncpoht75@treble>
Date: Tue, 31 Jul 2018 16:23:53 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Jeremy Cline <jcline@...hat.com>
Cc: "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netlink: Fix spectre v1 gadget in netlink_create()
On Tue, Jul 31, 2018 at 09:13:16PM +0000, Jeremy Cline wrote:
> 'protocol' is a user-controlled value, so sanitize it after the bounds
> check to avoid using it for speculative out-of-bounds access to arrays
> indexed by it.
>
> This addresses the following accesses detected with the help of smatch:
>
> * net/netlink/af_netlink.c:654 __netlink_create() warn: potential
> spectre issue 'nlk_cb_mutex_keys' [w]
>
> * net/netlink/af_netlink.c:654 __netlink_create() warn: potential
> spectre issue 'nlk_cb_mutex_key_strings' [w]
>
> * net/netlink/af_netlink.c:685 netlink_create() warn: potential spectre
> issue 'nl_table' [w] (local cap)
>
> Cc: Josh Poimboeuf <jpoimboe@...hat.com>
> Signed-off-by: Jeremy Cline <jcline@...hat.com>
Reviewed-by: Josh Poimboeuf <jpoimboe@...hat.com>
--
Josh
Powered by blists - more mailing lists