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: <CAJvTdKnXwkXKqsDOy+tFh=nq+JBw2vTN7sVSVVOh=1-6bDt9TA@mail.gmail.com>
Date: Tue, 25 Nov 2025 13:06:47 -0500
From: Len Brown <lenb@...nel.org>
To: Emily Ehlert <ehemily@...zon.de>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Emily Ehlert <ehemily@...zon.com>
Subject: Re: [PATCH 1/2] tools/power/turbostat: Set per_cpu_msr_sum to NULL
 after free

applied, thanks!

On Thu, Nov 13, 2025 at 2:16 PM Emily Ehlert <ehemily@...zon.de> wrote:
>
> From: Emily Ehlert <ehemily@...zon.com>
>
> Set per_cpu_msr_sum to NULL after freeing it in the error path
> of msr_sum_record() to prevent potential use-after-free issues.
>
> Signed-off-by: Emily Ehlert <ehemily@...zon.com>
> ---
>  tools/power/x86/turbostat/turbostat.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
> index 72a280e7a9d5..9a2be201a3a6 100644
> --- a/tools/power/x86/turbostat/turbostat.c
> +++ b/tools/power/x86/turbostat/turbostat.c
> @@ -6673,6 +6673,7 @@ void msr_sum_record(void)
>         timer_delete(timerid);
>  release_msr:
>         free(per_cpu_msr_sum);
> +       per_cpu_msr_sum = NULL;
>  }
>
>  /*
> --
> 2.47.3
>
>
>
>
> Amazon Web Services Development Center Germany GmbH
> Tamara-Danz-Str. 13
> 10243 Berlin
> Geschaeftsfuehrung: Christian Schlaeger, Christof Hellmis
> Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
> Sitz: Berlin
> Ust-ID: DE 365 538 597
>


-- 
Len Brown, Intel Open Source Technology Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ