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: <20180307191729.373118279@linuxfoundation.org>
Date:   Wed,  7 Mar 2018 11:36:53 -0800
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org>,
        Joe Perches <joe@...ches.com>,
        Kees Cook <keescook@...omium.org>,
        "Roberts, William C" <william.c.roberts@...el.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        David Laight <David.Laight@...LAB.COM>,
        Randy Dunlap <rdunlap@...radead.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Adam Borowski <kilobyte@...band.pl>,
        Petr Mladek <pmladek@...e.com>
Subject: [PATCH 4.15 001/122] vsprintf: avoid misleading "(null)" for %px

4.15-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Adam Borowski <kilobyte@...band.pl>

commit 3a129cc2151425e5aeb69aeb25fbc994ec738137 upstream.

Like %pK already does, print "00000000" instead.

This confused people -- the convention is that "(null)" means you tried to
dereference a null pointer as opposed to printing the address.

Link: http://lkml.kernel.org/r/20180204174521.21383-1-kilobyte@angband.pl
To: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Joe Perches <joe@...ches.com>
Cc: Kees Cook <keescook@...omium.org>
Cc: "Roberts, William C" <william.c.roberts@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: David Laight <David.Laight@...LAB.COM>
Cc: Randy Dunlap <rdunlap@...radead.org>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Signed-off-by: Adam Borowski <kilobyte@...band.pl>
Signed-off-by: Petr Mladek <pmladek@...e.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
 lib/vsprintf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1849,7 +1849,7 @@ char *pointer(const char *fmt, char *buf
 {
 	const int default_width = 2 * sizeof(void *);
 
-	if (!ptr && *fmt != 'K') {
+	if (!ptr && *fmt != 'K' && *fmt != 'x') {
 		/*
 		 * Print (null) with the same width as a pointer so it makes
 		 * tabular output look nice.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ