From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5343C388F9 for ; Tue, 27 Oct 2020 13:41:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 575C421D24 for ; Tue, 27 Oct 2020 13:41:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603806103; bh=5kiN68s+oA2+/lGYUImSBswROvtagOeM1QaDKdkTXpM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=o472yom/PKvi1bffVKWRCafGD75Q6iD23ghgaS1MRwPzWoqvTXoc1ZvihtFT1E/dr K0Q6TZ4m/YXOkUAQMHtp+Kq5mFtR29n4EB/mhecjQQP2YWGcgZoTiN5EMhc6vd/hap EWdtSO2Na2yX8oiBtpLn6PfIA4SZ7V7A1//MNTcA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752405AbgJ0Nlm (ORCPT ); Tue, 27 Oct 2020 09:41:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:38600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbgJ0Nlm (ORCPT ); Tue, 27 Oct 2020 09:41:42 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 44E1F218AC; Tue, 27 Oct 2020 13:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603806101; bh=5kiN68s+oA2+/lGYUImSBswROvtagOeM1QaDKdkTXpM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JC22Cxn+BMHjZuITrSLBY1oOer3X8cHiHeUK2QFI+yp48n4R51iPDk81BAOID3FMa bd6VLg80HQEvtta2fEn+IQ2RL4YBn0oXgeH0Tel770K0t7YiZIRYrYFur3Mjvsu2aR 6P4T7FVHIDiJMEgZfc0wFvb6ww5alzije0Ulpzfk= Date: Tue, 27 Oct 2020 14:42:24 +0100 From: Greg KH To: Matteo Croce Cc: linux-kernel@vger.kernel.org, Guenter Roeck , Petr Mladek , Arnd Bergmann , Mike Rapoport , Kees Cook , Pavel Tatashin , Robin Holt , Fabian Frederick , stable@vger.kernel.org Subject: Re: [PATCH v2 0/2] fix parsing of reboot= cmdline Message-ID: <20201027134224.GA991306@kroah.com> References: <20201027133545.58625-1-mcroce@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201027133545.58625-1-mcroce@linux.microsoft.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2020 at 02:35:43PM +0100, Matteo Croce wrote: > From: Matteo Croce > > The parsing of the reboot= cmdline has two major errors: > - a missing bound check can crash the system on reboot > - parsing of the cpu number only works if specified last > > Fix both, along with a small code refactor. > > v1->v2: > As Petr suggested, don't force base 10 in simple_strtoul(), > so hex values are accepted as well. > > Matteo Croce (2): > reboot: fix overflow parsing reboot cpu number > reboot: fix parsing of reboot cpu number > > kernel/reboot.c | 24 +++++++++++++----------- > 1 file changed, 13 insertions(+), 11 deletions(-) > > -- > 2.28.0 > This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.