Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp611407lqs; Tue, 5 Mar 2024 10:56:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVTYUUeX2j90aykDtpggvxswD44u/vSiA3GD+pnxLwcIvjjCFyqk2XBEYT2dFa4E/GFQdZ5EXDe7dptp6PkoKSpppW/xJaTBQ5CxgLevA== X-Google-Smtp-Source: AGHT+IFXCw2tpQneQ9gqeLdHyX5/xV838w+3kIzc3jgWLqyctcXO4utpFbxrVZJk6uo6FNVvOhNd X-Received: by 2002:a17:902:d385:b0:1dc:4bc2:4923 with SMTP id e5-20020a170902d38500b001dc4bc24923mr2380794pld.65.1709664989096; Tue, 05 Mar 2024 10:56:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709664989; cv=pass; d=google.com; s=arc-20160816; b=rSafvzj4dr4QPZndANBICvxME+jCQH3Jc91wijQ/YBBUCBWw8W4bBOfJi8GAIrT6Ph PKOKGRYEvkSulytQVpRsdcD5Mipsc5ctw0D/OPVR6tmLUmOU9kpHaRWf9zpFJK9moybq H6HG2/v7aBNI1DXCtzrxn0IqhMXw0Yl/x9/A3L4/PDjeJZwQIHMScqN/Dlnhy9jg+SNz ef8OBOsJy0DEDINqNRlUKP15+kzDg7k1aFQvXTA+uXIAhSXjYZeQvhnb2FaMVo4/5BKR +5KbDx/JcUNrBoqCi9brR70u8o7EGrNaYFodYypUVApf7UOvJ/g3w531HhOeTd5UXa1l atSg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:user-agent:cc:to:references:in-reply-to:from :subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=eyktKQIPx/0gGZnmQjU6js923O1Le3qqQBKW6xSCpjw=; fh=HPLXO1bjdb7N3Nw+zd2N4bROIm/0RkiWisZJJG7kK4I=; b=DPvIRyX6LWjvRLkA5O0PcJ8vJNiA7wUqfzMP+MbC1SzzSu169mZT+wjprarWEjj/x9 E98+yfDIM8lTColTf1iVjW2YBOvY7fq+IbAfaYHhxK7HnjlMzsK2dvQP3kDSm3kl/5GZ NueN1E5UNSIkGDm2RPkjdzFRNO8s2WMN+o8WE0Nvj7A0sClhS1sctCgxEo9wRnX/crIl jBmXLhYjq2umk8cqCQwP+FgLLXxnV1rkBb1zGdv6xy87PVR1+QPB2XiDAZLx0h3Dg2sW LFRf4sIqp4/LCIUeNaDn01vvkVV+hbri15XddEKESbWXgRoWTRhB0DweauPUkZR2pNy0 CACw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="qd/ZLRij"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4399-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n7-20020a170902f60700b001dbede97219si10843676plg.251.2024.03.05.10.56.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 10:56:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4399-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="qd/ZLRij"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4399-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 079B028BF49 for ; Tue, 5 Mar 2024 18:56:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1384B1B7FC; Tue, 5 Mar 2024 18:56:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qd/ZLRij" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC1301B26E; Tue, 5 Mar 2024 18:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709664985; cv=none; b=N5cpIuPFZW1UVfo69jnSuIqBQ1AP9sjOHXNjZBGbMyr4UocsFUXH8TqFbTt1hYft6le1zfwMrl6moBlJ9IIp5D/UUPx2sQXxRdfN+DhmqP6Ax7asgk1InS6Y3pKpPJ52q0irGUZJRilZAaw54zn5Uo32zmIxQyTQNhrEWN5qKpw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709664985; c=relaxed/simple; bh=pTOiKNw8kRBoqvH5vAPiz3p6O7+BEgqHronxns/y2/I=; h=Content-Type:MIME-Version:Subject:From:In-Reply-To:References:To: Cc:Message-ID:Date; b=uIkU6juTNVpbS66mOCtmgGKps8Hr4IKrAY8oKBKZhEPuHoValA7W9Utz1zjtHBgT+GEAYmKuGBMT7g6hHCk0D0rwk6kVSyy+ZVNNI1IJR7EhO9YpxTexebATzBgKiP2Jwd0yHpVae8b0/Agu0bJqwUUX3X+OcfNHMdM4jzi3mBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qd/ZLRij; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93248C433F1; Tue, 5 Mar 2024 18:56:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709664984; bh=pTOiKNw8kRBoqvH5vAPiz3p6O7+BEgqHronxns/y2/I=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=qd/ZLRij92a9SdWrQ39F/HOqSmUUE+lPW/oueSAnG4Rpv+GlcW33LZrpUk+dEpzNX ngDKtlUy5U9HJlk7NBYnKa5uMCGbpjdut3n9BpsHaXzHFl+7CNdy76vGp2I9jXByX2 EvQVf7QikayPDpBWfMqIp177ZZ9r/6tJN/Pg3tJBV3miQ6u0F1HN4Bx24f3SEGxAsf Cui7dN+zB1E6IEf1pRqaQVg3lyTmpQ1YtHgCntVSLlLspQwKj6bXAvJN+9hNx5RSN6 SvX7IMX7KY107aCrKjmY2j7UyG87An9Qwa46fZPSJvLg32PbT8+f/luUmxaOCGGvgX fO14YpJEb8xwQ== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v3] wifi: brcm80211: handle pmk_op allocation failure From: Kalle Valo In-Reply-To: <20240229103153.18533-1-duoming@zju.edu.cn> References: <20240229103153.18533-1-duoming@zju.edu.cn> To: Duoming Zhou Cc: linux-kernel@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211@lists.linux.dev, linux-wireless@vger.kernel.org, justinstitt@google.com, quic_alokad@quicinc.com, jisoo.jang@yonsei.ac.kr, petr.tesarik.ext@huawei.com, hdegoede@redhat.com, keescook@chromium.org, johannes.berg@intel.com, arend.vanspriel@broadcom.com, Duoming Zhou User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <170966497987.424347.4050351610859400431.kvalo@kernel.org> Date: Tue, 5 Mar 2024 18:56:21 +0000 (UTC) Duoming Zhou wrote: > The kzalloc() in brcmf_pmksa_v3_op() will return null if the > physical memory has run out. As a result, if we dereference > the null value, the null pointer dereference bug will happen. > > Return -ENOMEM from brcmf_pmksa_v3_op() if kzalloc() fails > for pmk_op. > > Fixes: a96202acaea4 ("wifi: brcmfmac: cfg80211: Add support for PMKID_V3 operations") > Acked-by: Arend van Spriel > Signed-off-by: Duoming Zhou > Reviewed-by: Kees Cook Patch applied to wireless-next.git, thanks. b4152222e04c wifi: brcm80211: handle pmk_op allocation failure -- https://patchwork.kernel.org/project/linux-wireless/patch/20240229103153.18533-1-duoming@zju.edu.cn/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches