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: <20190920112803.GB7865@amd>
Date:   Fri, 20 Sep 2019 13:28:03 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Dan Carpenter <dan.carpenter@...cle.com>,
        Masashi Honma <masashi.honma@...il.com>,
        Johannes Berg <johannes.berg@...el.com>
Subject: Re: [PATCH 4.19 18/79] nl80211: Fix possible Spectre-v1 for CQM RSSI
 thresholds

Hi!

> commit 4b2c5a14cd8005a900075f7dfec87473c6ee66fb upstream.
> 
> commit 1222a1601488 ("nl80211: Fix possible Spectre-v1 for CQM
> RSSI thresholds") was incomplete and requires one more fix to
> prevent accessing to rssi_thresholds[n] because user can control
> rssi_thresholds[i] values to make i reach to n. For example,
> rssi_thresholds = {-400, -300, -200, -100} when last is -34.

> @@ -10270,9 +10270,11 @@ static int cfg80211_cqm_rssi_update(stru
>  	hyst = wdev->cqm_config->rssi_hyst;
>  	n = wdev->cqm_config->n_rssi_thresholds;
>  
> -	for (i = 0; i < n; i++)
> +	for (i = 0; i < n; i++) {
> +		i = array_index_nospec(i, n);
>  		if (last < wdev->cqm_config->rssi_thresholds[i])
>  			break;
> +	}
>  

Variable "i" is not controlled by userspace: it is initialized by
kernel and runs from 0 to n.

I don't see a spectre vulnerability here.

[In fact, other array_index_nospec() uses in this function seem also
unneccessary.]

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ