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>] [day] [month] [year] [list]
Message-Id: <20211013130446.237421-1-qtxuning1999@sjtu.edu.cn>
Date:   Wed, 13 Oct 2021 21:04:46 +0800
From:   Guo Zhi <qtxuning1999@...u.edu.cn>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Guo Zhi <qtxuning1999@...u.edu.cn>, linux-kernel@...r.kernel.org
Subject: [PATCH] kernel/kallsym.c: Fix kernel pointer leak

Pointers should be printed with %p rather than %px
which printed kernel pointer directly.
Change %px to %p to print the secured pointer.

Signed-off-by: Guo Zhi <qtxuning1999@...u.edu.cn>
---
 kernel/kallsyms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 0ba87982d017..5a8ea50ce812 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -760,10 +760,10 @@ static int s_show(struct seq_file *m, void *p)
 		 */
 		type = iter->exported ? toupper(iter->type) :
 					tolower(iter->type);
-		seq_printf(m, "%px %c %s\t[%s]\n", value,
+		seq_printf(m, "%p %c %s\t[%s]\n", value,
 			   type, iter->name, iter->module_name);
 	} else
-		seq_printf(m, "%px %c %s\n", value,
+		seq_printf(m, "%p %c %s\n", value,
 			   iter->type, iter->name);
 	return 0;
 }
-- 
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ