USB: usbfs: don't leak kernel data in siginfo
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 13 Feb 2015 15:54:53 +0000 (10:54 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 9 May 2015 22:16:21 +0000 (23:16 +0100)
commit3abfa44f46250cf8682f0359344747981542016f
tree0eaf4bcd70de4fd1baddfc841dcca1f806b61825
parent3642863aa0889c89bc10e55d03c5342d1d8621cd
USB: usbfs: don't leak kernel data in siginfo

commit f0c2b68198589249afd2b1f2c4e8de8c03e19c16 upstream.

When a signal is delivered, the information in the siginfo structure
is copied to userspace.  Good security practice dicatates that the
unused fields in this structure should be initialized to 0 so that
random kernel stack data isn't exposed to the user.  This patch adds
such an initialization to the two places where usbfs raises signals.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Dave Mielke <dave@mielke.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/core/devio.c