Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D124FC352A1 for ; Sat, 3 Dec 2022 13:54:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229796AbiLCNyc (ORCPT ); Sat, 3 Dec 2022 08:54:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbiLCNya (ORCPT ); Sat, 3 Dec 2022 08:54:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6432B2790B for ; Sat, 3 Dec 2022 05:54:29 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1141BB803F4 for ; Sat, 3 Dec 2022 13:54:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40791C433C1; Sat, 3 Dec 2022 13:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1670075666; bh=x4ty8CfEIeQx9YHcY7XrQlCFmT6k32BycbxpDHZowsE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sq8e7ExzRsvo38DzeS0JZhEbJ/e7OEbsrfiyQiAIEqld3lElIzTMlsVmr4EFyOysZ e2fiBmVdE1EArfUiOlPKpb1ZFSe4kbxv2Lv4Nh0RDUJcWnLujV6X6W/IY2oEf3g+1K NUobDofsIxj5Gjm2DMCgvtmuHuY1O0u7dANUxCjg= Date: Sat, 3 Dec 2022 14:54:23 +0100 From: Greg KH To: Ben Hutchings Cc: stable@vger.kernel.org, Ard Biesheuvel , "Jason A. Donenfeld" , Ilias Apalodimas Subject: Re: [PATCH 4.14] efi: random: Properly limit the size of the random seed Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Dec 01, 2022 at 12:47:22AM +0100, Ben Hutchings wrote: > Commit be36f9e7517e ("efi: READ_ONCE rng seed size before munmap") > added a READ_ONCE() and also changed the call to > add_bootloader_randomness() to use the local size variable. Neither > of these changes was actually needed and this was not backported to > the 4.14 stable branch. > > Commit 161a438d730d ("efi: random: reduce seed size to 32 bytes") > reverted the addition of READ_ONCE() and added a limit to the value of > size. This depends on the earlier commit, because size can now differ > from seed->size, but it was wrongly backported to the 4.14 stable > branch by itself. > > Apply the missing change to the add_bootloader_randomness() parameter > (except that here we are still using add_device_randomness()). > > Fixes: 700485f70e50 ("efi: random: reduce seed size to 32 bytes") > Signed-off-by: Ben Hutchings > --- > drivers/firmware/efi/efi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Both now queued up, thanks, greg k-h