lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2024090332-waged-yummy-296b@gregkh>
Date: Tue, 3 Sep 2024 06:55:55 +0200
From: Greg KH <greg@...ah.com>
To: Ma Ke <make24@...as.ac.cn>
Cc: nbd@....name, lorenzo@...nel.org, ryder.lee@...iatek.com,
	shayne.chen@...iatek.com, sean.wang@...iatek.com, kvalo@...nel.org,
	matthias.bgg@...il.com, angelogioacchino.delregno@...labora.com,
	chui-hao.chiu@...iatek.com, howard-yh.hsu@...iatek.com,
	StanleyYP.Wang@...iatek.com, benjamin-jw.lin@...iatek.com,
	allen.ye@...iatek.com, chank.chen@...iatek.com,
	meichia.chiu@...iatek.com, Money.Wang@...iatek.com,
	Bo.Jiao@...iatek.com, akpm@...ux-foundation.org,
	linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, stable@...r.kernel.org
Subject: Re: [PATCH RESEND] wifi: mt76: mt7996: fix NULL pointer dereference
 in mt7996_mcu_sta_bfer_he

On Tue, Sep 03, 2024 at 09:39:13AM +0800, Ma Ke wrote:
> Fix the NULL pointer dereference in mt7996_mcu_sta_bfer_he
> routine adding an sta interface to the mt7996 driver.
> 
> Found by code review.
> 
> Cc: stable@...r.kernel.org
> Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
> Signed-off-by: Ma Ke <make24@...as.ac.cn>
> ---
>  drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
> index 2e4fa9f48dfb..cba28d8d5562 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
> @@ -1544,6 +1544,9 @@ mt7996_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
>  	u8 nss_mcs = mt7996_mcu_get_sta_nss(mcs_map);
>  	u8 snd_dim, sts;
>  
> +	if (!vc)
> +		return;

Why is this the only place you are checking the return value of
mt76_connac_get_he_phy_cap()?  Either fix them all in this driver or
none as obviously it can not fail :(

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ