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-next>] [day] [month] [year] [list]
Message-Id: <20210929104625.1112192-1-qtxuning1999@sjtu.edu.cn>
Date:   Wed, 29 Sep 2021 18:46:25 +0800
From:   Guo Zhi <qtxuning1999@...u.edu.cn>
To:     rafael@...nel.org, lenb@...nel.org
Cc:     linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
        Guo Zhi <qtxuning1999@...u.edu.cn>
Subject: [PATCH] acpi/processor_idle.c: Fix kernel pointer leak

Pointers should be printed with %p or %px rather than
cast to 'long' and pinted with %ld.
Change %ld to %p to print the secured pointer.

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

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index f37fba9e5ba0..a9f4ab072583 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -73,9 +73,9 @@ static int set_max_cstate(const struct dmi_system_id *id)
 	if (max_cstate > ACPI_PROCESSOR_MAX_POWER)
 		return 0;
 
-	pr_notice("%s detected - limiting to C%ld max_cstate."
+	pr_notice("%s detected - limiting to C%p max_cstate."
 		  " Override with \"processor.max_cstate=%d\"\n", id->ident,
-		  (long)id->driver_data, ACPI_PROCESSOR_MAX_POWER + 1);
+		id->driver_data, ACPI_PROCESSOR_MAX_POWER + 1);
 
 	max_cstate = (long)id->driver_data;
 
-- 
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ