Re: [PATCH 4/8] kselftest/arm64: mte: use string literal for printf-style functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 16, 2024 at 04:32:47PM +0100, Andre Przywara wrote:
> Using pointers for the format specifier strings in printf-style
> functions can create potential security problems, as the number of
> arguments to be parsed could vary from call to call. Most compilers
> consequently warn about those:
> "format not a string literal and no format arguments [-Wformat-security]"
> 
> If we only want to print a constant string, we can just use a fixed "%s"
> format instead, and pass the string as an argument.
> 
> Fixes: e9b60476bea0 ("kselftest/arm64: Add utilities and a test to validate mte memory")

I'm not sure this qualifies as a fix given that all the strings we're
passing in here are trusted...  otheriwse this looks good.

Reviewed-by: Mark Brown <broonie@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux