Skip to content

Commit ec5fd50

Browse files
t-8chIngo Molnar
authored andcommitted
uprobes: Don't use %pK through printk
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. For more background, see: https://lore.kernel.org/lkml/20250113171731-dc10e3c1-da64-4af0-b767-7c7070468023@linutronix.de/ Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250217-restricted-pointers-uprobes-v1-1-e8cbe5bb22a7@linutronix.de
1 parent 2408a80 commit ec5fd50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/events/uprobes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static void update_ref_ctr_warn(struct uprobe *uprobe,
417417
struct mm_struct *mm, short d)
418418
{
419419
pr_warn("ref_ctr %s failed for inode: 0x%lx offset: "
420-
"0x%llx ref_ctr_offset: 0x%llx of mm: 0x%pK\n",
420+
"0x%llx ref_ctr_offset: 0x%llx of mm: 0x%p\n",
421421
d > 0 ? "increment" : "decrement", uprobe->inode->i_ino,
422422
(unsigned long long) uprobe->offset,
423423
(unsigned long long) uprobe->ref_ctr_offset, mm);

0 commit comments

Comments
 (0)