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: <20250219091023.f17833aea92a3d90e1bbc7da@kernel.org>
Date: Wed, 19 Feb 2025 09:10:23 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Steven Rostedt <rostedt@...dmis.org>, Mathieu Desnoyers
 <mathieu.desnoyers@...icios.com>, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing/user_events: Don't use %pK through printk

On Mon, 17 Feb 2025 14:16:12 +0100
Thomas Weißschuh <thomas.weissschuh@...utronix.de> wrote:

> Restricted pointers ("%pK") are not meant to be used through printk().
> It can unintentionally expose security sensitive, raw pointer values.
> 
> Use regular pointer formatting instead.
> 
> Link: https://lore.kernel.org/lkml/20250113171731-dc10e3c1-da64-4af0-b767-7c7070468023@linutronix.de/

This is only for the kernel pointer, but the "uaddr" below means it
has a user space address. So I think this does not need to be applied.

Thank you,

> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> ---
>  kernel/trace/trace_events_user.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
> index 97325fbd62836f4fb477c4a2b2936eff544291ec..3effc6fce20e65a8077de5221eb69db04fb1a775 100644
> --- a/kernel/trace/trace_events_user.c
> +++ b/kernel/trace/trace_events_user.c
> @@ -455,7 +455,7 @@ static void user_event_enabler_fault_fixup(struct work_struct *work)
>  	if (ret && ret != -ENOENT) {
>  		struct user_event *user = enabler->event;
>  
> -		pr_warn("user_events: Fault for mm: 0x%pK @ 0x%llx event: %s\n",
> +		pr_warn("user_events: Fault for mm: 0x%p @ 0x%llx event: %s\n",
>  			mm->mm, (unsigned long long)uaddr, EVENT_NAME(user));
>  	}
>  
> 
> ---
> base-commit: 0ad2507d5d93f39619fc42372c347d6006b64319
> change-id: 20250217-restricted-pointers-trace-a0fb12707ac6
> 
> Best regards,
> -- 
> Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ