]> git.baikalelectronics.ru Git - kernel.git/commit
USB: core: Change %pK for __user pointers to %px
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 19 Nov 2020 17:02:28 +0000 (12:02 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Nov 2020 15:36:31 +0000 (16:36 +0100)
commitaac6a68f69e610b34c810df0c28ccfe41e4864fe
tree3aa1b52021e15ce2cffd3ef1e55bb61dfc0e8a5f
parentc96e548e3ba555143f2b02062ce4bb075c8cd87f
USB: core: Change %pK for __user pointers to %px

Commit dd371380a529 ("USB: core: replace %p with %pK") used the %pK
format specifier for a bunch of __user pointers.  But as the 'K' in
the specifier indicates, it is meant for kernel pointers.  The reason
for the %pK specifier is to avoid leaks of kernel addresses, but when
the pointer is to an address in userspace the security implications
are minimal.  In particular, no kernel information is leaked.

This patch changes the __user %pK specifiers (used in a bunch of
debugging output lines) to %px, which will always print the actual
address with no mangling.  (Notably, there is no printk format
specifier particularly intended for __user pointers.)

Fixes: dd371380a529 ("USB: core: replace %p with %pK")
CC: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
CC: <stable@vger.kernel.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20201119170228.GB576844@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/devio.c