From mboxrd@z Thu Jan 1 00:00:00 1970 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) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X9ndRfET" 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