[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180730185408.hl6omiitkqpac5d3@treble>
Date: Mon, 30 Jul 2018 13:54:08 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Jeremy Cline <jcline@...hat.com>
Cc: Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v2] ext4: mballoc: Fix spectre gadget in
ext4_mb_regular_allocator
On Mon, Jul 30, 2018 at 06:07:47PM +0000, Jeremy Cline wrote:
> 'ac->ac_g_ex.fe_len' is a user-controlled value which is used in the
> derivation of 'ac->ac_2order'. 'ac->ac_2order', in turn, is used to
> index arrays which makes it a potential spectre gadget. Fix this by
> sanitizing the value assigned to 'ac->ac2_order'. This covers the
> following accesses found with the help of smatch:
>
> * fs/ext4/mballoc.c:1896 ext4_mb_simple_scan_group() warn: potential
> spectre issue 'grp->bb_counters' [w] (local cap)
>
> * fs/ext4/mballoc.c:445 mb_find_buddy() warn: potential spectre issue
> 'EXT4_SB(e4b->bd_sb)->s_mb_offsets' [r] (local cap)
>
> * fs/ext4/mballoc.c:446 mb_find_buddy() warn: potential spectre issue
> 'EXT4_SB(e4b->bd_sb)->s_mb_maxs' [r] (local cap)
>
> Cc: Josh Poimboeuf <jpoimboe@...hat.com>
> Cc: stable@...r.kernel.org
> Suggested-by: 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