Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2812525rdb; Mon, 4 Dec 2023 08:10:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdS1yj2u2zAjylXebv0mugk+vnGPRLg2KfWwTnl0lOWhzzRbFpNMZ6vt/oPT65IafqG3YO X-Received: by 2002:a17:906:1c8:b0:a0d:efba:4492 with SMTP id 8-20020a17090601c800b00a0defba4492mr2474932ejj.10.1701706248395; Mon, 04 Dec 2023 08:10:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701706248; cv=none; d=google.com; s=arc-20160816; b=R+sm5pT2rt1DNFed0sld6hqKkbMQoxrDDAVVuIRjF6QbCW2SfXVYZNq4pMVw50CNIr Ca65FZYc8hH+YjNGQssURvt0lxsiZomuV7BHUim1RqEiUm4hsbTAJkk9jV4AO4vchzHy YfpGebL/afreMy7hYJOa1giISDa5S0lucgvZu8qBHEkPzIeueNXE90S+oF5zdewEftMV 6fMtrwkLyjLxpvQkWegEMaCSor/czdNZykm7JZIT1Ei8AthPYLsRLfU8vDWrevaa2SOc Hl167uohRq+iiq0yydspormD2j1a745A75T4nY8cMWSpTZQSPN7AIDdQLP3ne3J4PpFY WEXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=K6aZt8N5NZibQvmryw3RweuEgai0O1Xsnj+TS/K5Nsw=; fh=7KcAW3BAxpkK0eP7YhckPaGA+ZUmbZu8vqBfHxdHgyA=; b=E2X66auQ+qNUjpuvRuuFjRYhDvI3pb/VILS3jghl6zxr/LJ7NpkwKkHJnSf9umG4Hw 0xKzf5OBoIWdMVuli8KOHxyGnWzcM5NMvqBeSTlIBoCmBmm80Vm58eXvvoz5I6iT1WGq 1GhMxeEtBMiSAbwn7FK5eS7P4JvF7kO9txrphV54zrxRtDcESalZ/xS839GKYEXt6E1I 6TZ1RF0vZW3eDuEiiL0VKbgWHze6LfAxVPqwXVLKk7wup6thApqsu5qWaHrzJVrEtGGD yLxCJO7DFXYvy7uco2Qj9a7mPciMXzaTrw9qUZulUU3LSXOQESjzMi5ap2kvuHDywJ0V zMKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X9ndRfET; spf=pass (google.com: domain of linux-wireless+bounces-382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g27-20020a17090613db00b00a1a582b2f55si2551671ejc.712.2023.12.04.08.10.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 08:10:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X9ndRfET; spf=pass (google.com: domain of linux-wireless+bounces-382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-382-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0231E1F21090 for ; Mon, 4 Dec 2023 16:10:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AC212D627; Mon, 4 Dec 2023 16:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X9ndRfET" 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 5EDE55395 for ; Mon, 4 Dec 2023 16:10:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 192FDC433C8; Mon, 4 Dec 2023 16:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701706243; bh=fig6ieXW1XulwQyCT6GtiXhbfC/2IiymZ4gHvMLq4n0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=X9ndRfETgBPRCQnSBGKLV458fEQI04b3+8qi+CsvqwIMrnhB9htMN5uBpartX2m3E sv/EZzL2bYJr/1mc2qEjoAU/Mli436R4obJnnKR5MqSmbrHWaEu2uDxQnjvEjC7tPI nlOMHG3WR3aaAMcVfViBub8h0VhKkV3GP+DHtZDlN3d6cBNqkXOFUyW1gFk5s2/Mvy ZoidaXiEvyCQHS/raPNERzK4RGWB0KiazcYAp0bMZSStq+XqXC1ilSSo7a3XYOZvin quQlF9hVfz9WYnpOxFztcnV9wv44KtsrCznZSXOrCN7FvE8qKKHZLq17h+6LCOVuYJ q5zWB0aWIZLGg== From: Kalle Valo To: Dmitry Antipov Cc: =?utf-8?B?SsOpcsO0bWU=?= Pouiller , linux-wireless@vger.kernel.org Subject: Re: [PATCH] wifi: wfx: fix possible NULL pointer dereference in wfx_set_mfp_ap() References: <20231204155558.133839-1-dmantipov@yandex.ru> Date: Mon, 04 Dec 2023 18:10:40 +0200 In-Reply-To: <20231204155558.133839-1-dmantipov@yandex.ru> (Dmitry Antipov's message of "Mon, 4 Dec 2023 18:55:37 +0300") Message-ID: <87cyvmq77j.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Dmitry Antipov writes: > Since 'ieee80211_beacon_get()' can return NULL, 'wfx_set_mfp_ap()' > should check the return value before examining skb data. So convert > the latter to return an appropriate error code and propagate it to > return from 'wfx_start_ap()' as well. Compile tested only. > > Signed-off-by: Dmitry Antipov Patches like this should be tested on a real device. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches