Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp2053114rdb; Tue, 5 Sep 2023 12:54:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmrE6FIUsR0qCBE+F0S+EyLyt8dlqc9UmEhbV0h00M+hTLofdQLTnDKKKk2x95ySXbrNdz X-Received: by 2002:a17:906:749b:b0:99b:4aa3:6480 with SMTP id e27-20020a170906749b00b0099b4aa36480mr661102ejl.40.1693943660479; Tue, 05 Sep 2023 12:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693943660; cv=none; d=google.com; s=arc-20160816; b=l6pBblJfoQSgROlc/qqKRR0RUyTBy5f1riT8LE3/ualTigIWTaEm1FhGJTt0aisPfa TbjKht+9eDI/UO8j8jk4SuvQnFh+Q0TJwcRQSkiEK1o8F8a0CMAjWVs012kgS5+4VV4+ NE+Z0b8KyVY5bMKEuJU+qDK1b3MpugFKUgU3y9dEr1Jbaqln2Tue54lZ1OIw/okiizjY s1eC+s+Q/C2UL2AIIyl7DRi+7VQvl7lH76OS5j8Z6NQLIE/6LPa73t5TUhJhak3IDGXG r41JWf3q11UiKBXsii1YetFRXlCdiHlYHFHSJdTUm9v13aengAuOARYaQpwLPap7HNdj cC9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mThYv1c/WI3ngnEzjtqtEjf2q7BjLiPOQqRT8IGrZOg=; fh=FPUfE5db70HeB9hVAdNsd9n9/YIuTA+8Tt5W4FI/nnk=; b=gCKp9LSWO0lN1hMgwxa2Dfjfc+7ESedQAuIaJUvcT+7GYNbXicmAC+MtISG09XMmMi l9fOppx40PwnAjkWxlHEQ20XVpuAFC/n9yui2lLLw4FBEnfEgIOyxypoOHJAktyxAK6/ quaCgbNN0wJPBVCfQN+jbBwwW1vZFn2KBSgF4LEdxTlYPnWKIqWJJDPAUQZQpYj7NrEo 0HezmdXkwqcEsyG/mQG9hG6ch3ZylWIeBisEnsJy64Wm7SlNvNGovBzRhxJzTc190UZc /OM9SeYWOmmbbKjbJqqIudnbRaWigGYIJkQVgqh/vm74WLDB83AhB1ZHj+WUoU51JmYK KzCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RcbSxa3j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ew16-20020a170907951000b009889b69c1edsi7422035ejc.697.2023.09.05.12.53.51; Tue, 05 Sep 2023 12:54:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RcbSxa3j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235256AbjIESlf (ORCPT + 99 others); Tue, 5 Sep 2023 14:41:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241742AbjIESk1 (ORCPT ); Tue, 5 Sep 2023 14:40:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8084DCA; Tue, 5 Sep 2023 11:39:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 63522B811F0; Tue, 5 Sep 2023 17:01:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF91EC433C9; Tue, 5 Sep 2023 17:01:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693933317; bh=mThYv1c/WI3ngnEzjtqtEjf2q7BjLiPOQqRT8IGrZOg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RcbSxa3jHO8JUcpi+WHHVSy/m6ZYdQiKimofL7kfdfqHUZ+TrAsRdEGOY3EIFpGjv zMy9pCsxQXD+//9DJ9RvNQcvi7xkruPsSkfuKdL1hRq1aZOjS8CRIIHCbhK28k80s1 fxG+sycfULbyqNQWEm5dXJA/65lQhr0Cp5ldiIyr95BfUoe+SwLhioyMlCSyCk6756 48RTssiFRCztDtkPCjH87wfyHvQ8L5An0w8fLIDb1kp2AWB8mphF03UjNPJJQEl44b Px0RT45NDY7vzyzqTf/XO9THN+m6AngW1SRBLxpbivox+wSl0kI8qQN+9NHaJiiUS3 3bMzZ2LQDCePQ== Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5739965a482so25036eaf.0; Tue, 05 Sep 2023 10:01:57 -0700 (PDT) X-Gm-Message-State: AOJu0Yz1159ubDxukKAZD7OU2Anp3tkFj6eTZ2qEsB8yb6ye02BYEg1p MdwZfumninS0xVAZevV6SpKpry4oiTDiz5EI5+M= X-Received: by 2002:a4a:db95:0:b0:56c:a9fe:f701 with SMTP id s21-20020a4adb95000000b0056ca9fef701mr9856349oou.3.1693933317136; Tue, 05 Sep 2023 10:01:57 -0700 (PDT) MIME-Version: 1.0 References: <20230905095914.1699335-1-konstantin.meskhidze@huawei.com> In-Reply-To: <20230905095914.1699335-1-konstantin.meskhidze@huawei.com> From: Masahiro Yamada Date: Wed, 6 Sep 2023 02:01:20 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kconfig: fix possible buffer overflow To: Konstantin Meskhidze Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, yusongping@huawei.com, artem.kuzin@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 5, 2023 at 6:59=E2=80=AFPM Konstantin Meskhidze wrote: > > Buffer 'new_argv' is accessed without bound check after accessing with > bound check via 'new_argc' index. > > Fixes: e298f3b49def ("kconfig: add built-in function support") > Co-developed-by: Ivanov Mikhail > Signed-off-by: Konstantin Meskhidze > --- Applied to linux-kbuild. Thanks. --=20 Best Regards Masahiro Yamada