Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ref_tracker: use %p instead of %px in debugfs dentry name

As Kees points out, this is a kernel address leak, and debugging is
not a sufficiently good reason to expose the real kernel address.

Fixes: 65b584f53611 ("ref_tracker: automatically register a file in debugfs for a ref_tracker_dir")
Reported-by: Kees Cook <kees@kernel.org>
Closes: https://lore.kernel.org/netdev/202507301603.62E553F93@keescook/
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jeff Layton and committed by
Jakub Kicinski
52966bf7 61aaca8b

+1 -1
+1 -1
lib/ref_tracker.c
··· 434 434 if (dentry && !xa_is_err(dentry)) 435 435 return; 436 436 437 - ret = snprintf(name, sizeof(name), "%s@%px", dir->class, dir); 437 + ret = snprintf(name, sizeof(name), "%s@%p", dir->class, dir); 438 438 name[sizeof(name) - 1] = '\0'; 439 439 440 440 if (ret < sizeof(name)) {