• Vamsi Krishna Samavedam's avatar
    USB: core: replace %p with %pK · 057747d4
    Vamsi Krishna Samavedam authored
    commit 2f964780 upstream.
    
    Format specifier %p can leak kernel addresses while not valuing the
    kptr_restrict system settings. When kptr_restrict is set to (1), kernel
    pointers printed using the %pK format specifier will be replaced with
    Zeros. Debugging Note : &pK prints only Zeros as address. If you need
    actual address information, write 0 to kptr_restrict.
    
    echo 0 > /proc/sys/kernel/kptr_restrict
    
    [Found by poking around in a random vendor kernel tree, it would be nice
    if someone would actually send these types of patches upstream - gkh]
    Signed-off-by: default avatarVamsi Krishna Samavedam <vskrishn@codeaurora.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    [bwh: Backported to 3.2: drop changes in proc_reapurb*(), usbdev_do_ioctl(),
     usb_submit_urb()]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    057747d4
devio.c 52.7 KB