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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e4107d75-4b69-4b7d-827c-af92b913d342@linuxfoundation.org>
Date: Sat, 7 Feb 2026 09:04:15 -0700
From: Shuah Khan <skhan@...uxfoundation.org>
To: Sumeet Pawnikar <sumeet4linux@...il.com>, trenn@...e.com,
 shuah@...nel.org, jwyatt@...hat.com, jkacur@...hat.com,
 linux-pm@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] tools/power/cpupower: Replace strcpy/strcat with snprintf
 in powercap.c

On 1/31/26 09:42, Sumeet Pawnikar wrote:
> Replace all unsafe strcpy() and strcat() calls with snprintf() in
> powercap.c to prevent potential buffer overflow vulnerabilities.
> The snprintf() function performs automatic bounds checking to ensure
> the destination buffer is not overflowed.

Why snprintf() - why not use strncpy() and strncat()

> 
> No functional change.

Why isn't this a functional change? You are changing the code to use
a different system call? How did you test this patch?

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ