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: <571E06DC.70301@intel.com>
Date:	Mon, 25 Apr 2016 14:00:28 +0200
From:	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
To:	Colin King <colin.king@...onical.com>,
	Len Brown <len.brown@...el.com>
Cc:	Hubert Chrzaniuk <hubert.chrzaniuk@...el.com>,
	Dasaratharaman Chandramouli 
	<dasaratharaman.chandramouli@...el.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools/power turbostat: fix overflow read on array
 slm_freq_table

On 4/24/2016 8:18 PM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> When i >= SLM_BCLK_FREQS, the frequency read from the slm_freq_table
> is off the end of the array because msr is set to 3 rather than the
> actual array index i.  Set i to 3 rather than msr to fix this.
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Can you please CC this to linux-pm@...r.kernel.org?  It is easier to 
handle then.

> ---
>   tools/power/x86/turbostat/turbostat.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
> index acbf7ff..a66f07c 100644
> --- a/tools/power/x86/turbostat/turbostat.c
> +++ b/tools/power/x86/turbostat/turbostat.c
> @@ -3050,7 +3050,7 @@ double slm_bclk(void)
>   	i = msr & 0xf;
>   	if (i >= SLM_BCLK_FREQS) {
>   		fprintf(outf, "SLM BCLK[%d] invalid\n", i);
> -		msr = 3;
> +		i = 3;
>   	}
>   	freq = slm_freq_table[i];
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ