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: <CAD=FV=U=BW3qjhn=Lp=vb6d1wHaUF6M98DUssEz-zZkL2TU=mw@mail.gmail.com>
Date: Tue, 28 May 2024 06:41:50 -0700
From: Doug Anderson <dianders@...omium.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Jason Wessel <jason.wessel@...driver.com>, 
	Daniel Thompson <daniel.thompson@...aro.org>, Arnd Bergmann <arnd@...db.de>, 
	Petr Mladek <pmladek@...e.com>, Sergey Senozhatsky <senozhatsky@...omium.org>, 
	Justin Stitt <justinstitt@...gle.com>, John Ogness <john.ogness@...utronix.de>, 
	kgdb-bugreport@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kdb: address -Wformat-security warnings

Hi,

On Tue, May 28, 2024 at 5:12 AM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> When -Wformat-security is not disabled, using a string pointer
> as a format causes a warning:
>
> kernel/debug/kdb/kdb_io.c: In function 'kdb_read':
> kernel/debug/kdb/kdb_io.c:365:36: error: format not a string literal and no format arguments [-Werror=format-security]
>   365 |                         kdb_printf(kdb_prompt_str);
>       |                                    ^~~~~~~~~~~~~~
> kernel/debug/kdb/kdb_io.c: In function 'kdb_getstr':
> kernel/debug/kdb/kdb_io.c:456:20: error: format not a string literal and no format arguments [-Werror=format-security]
>   456 |         kdb_printf(kdb_prompt_str);
>       |                    ^~~~~~~~~~~~~~
>
> Use an explcit "%s" format instead.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  kernel/debug/kdb/kdb_io.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)")
Reviewed-by: Douglas Anderson <dianders@...omium.org>

..probably also justifies a:

Cc: stable@...r.kernel.org


-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ