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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1df5d97-4691-40d4-a6cc-416505f35164@web.de>
Date: Sat, 22 Mar 2025 15:55:49 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Qasim Ijaz <qasdev00@...il.com>, linux-wireless@...r.kernel.org,
 linux-mediatek@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org
Cc: LKML <linux-kernel@...r.kernel.org>,
 Angelo Gioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
 Bo Jiao <bo.jiao@...iatek.com>, Dan Carpenter <dan.carpenter@...aro.org>,
 Felix Fietkau <nbd@....name>, Johannes Berg <johannes@...solutions.net>,
 Lorenzo Bianconi <lorenzo@...nel.org>,
 Matthias Brugger <matthias.bgg@...il.com>,
 Peter Chiu <chui-hao.chiu@...iatek.com>, Ryder Lee <ryder.lee@...iatek.com>,
 Sean Wang <sean.wang@...iatek.com>, Shayne Chen <shayne.chen@...iatek.com>
Subject: Re: [PATCH] wifi: mt76: mt7996: avoid potential null deref in
 mt7996_get_et_stats()

> Ensure phy->mib is only accessed after the null sanity check for phy
> otherwise the code may trigger a potential null deref.

* Would you like to use the term “null pointer dereference” consistently?

* Were any known source code analysis tools involved also for
  this software improvement?


…
> +++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
…
> @@ -1886,6 +1886,8 @@ void mt7996_get_et_stats(struct ieee80211_hw *hw,
>  	if (!phy)
>  		return;
>
> +	mib = &phy->mib;
> +
>  	mutex_lock(&dev->mt76.mutex);
>
>  	mt7996_mac_update_stats(phy);

I suggest to move such an assignment statement directly before the place
where this variable is used finally.

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ