From: <gregkh@linuxfoundation.org>
To: shuahkh@osg.samsung.com, ebiggers3@gmail.com, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "usbip: fix 3eee23c3ec14 tcp_socket address still in the status file" has been added to the 4.4-stable tree
Date: Mon, 05 Feb 2018 10:00:59 -0800 [thread overview]
Message-ID: <1517853659105156@kroah.com> (raw)
In-Reply-To: <920dbeada86c864f5280c363188125481399d109.1517852038.git.shuahkh@osg.samsung.com>
This is a note to let you know that I've just added the patch titled
usbip: fix 3eee23c3ec14 tcp_socket address still in the status file
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usbip-fix-3eee23c3ec14-tcp_socket-address-still-in-the-status-file.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From shuahkh@osg.samsung.com Mon Feb 5 09:59:48 2018
From: Shuah Khan <shuahkh@osg.samsung.com>
Date: Mon, 5 Feb 2018 10:45:56 -0700
Subject: usbip: fix 3eee23c3ec14 tcp_socket address still in the status file
To: valentina.manea.m@gmail.com, shuah@kernel.org, gregkh@linuxfoundation.org
Cc: Shuah Khan <shuahkh@osg.samsung.com>, ebiggers3@gmail.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org
Message-ID: <920dbeada86c864f5280c363188125481399d109.1517852038.git.shuahkh@osg.samsung.com>
From: Shuah Khan <shuahkh@osg.samsung.com>
Commit 3eee23c3ec14 ("usbip: prevent vhci_hcd driver from leaking a
socket pointer address") backported the following commit from mailine.
However, backport error caused the tcp_socket address to still leak.
commit 2f2d0088eb93 ("usbip: prevent vhci_hcd driver from leaking a
socket pointer address")
When a client has a USB device attached over IP, the vhci_hcd driver is
locally leaking a socket pointer address via the
/sys/devices/platform/vhci_hcd/status file (world-readable) and in debug
output when "usbip --debug port" is run.
Fix it to not leak. The socket pointer address is not used at the moment
and it was made visible as a convenient way to find IP address from
socket pointer address by looking up /proc/net/{tcp,tcp6}.
As this opens a security hole, the fix replaces socket pointer address
with sockfd.
Reported-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/usbip/vhci_sysfs.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/usb/usbip/vhci_sysfs.c
+++ b/drivers/usb/usbip/vhci_sysfs.c
@@ -53,7 +53,7 @@ static ssize_t status_show(struct device
* a security hole, the change is made to use sockfd instead.
*/
out += sprintf(out,
- "prt sta spd bus dev sockfd local_busid\n");
+ "prt sta spd dev sockfd local_busid\n");
for (i = 0; i < VHCI_NPORTS; i++) {
struct vhci_device *vdev = port_to_vdev(i);
@@ -64,12 +64,11 @@ static ssize_t status_show(struct device
if (vdev->ud.status == VDEV_ST_USED) {
out += sprintf(out, "%03u %08x ",
vdev->speed, vdev->devid);
- out += sprintf(out, "%16p ", vdev->ud.tcp_socket);
- out += sprintf(out, "%06u", vdev->ud.sockfd);
+ out += sprintf(out, "%06u ", vdev->ud.sockfd);
out += sprintf(out, "%s", dev_name(&vdev->udev->dev));
} else
- out += sprintf(out, "000 000 000 000000 0-0");
+ out += sprintf(out, "000 00000000 000000 0-0");
out += sprintf(out, "\n");
spin_unlock(&vdev->ud.lock);
Patches currently in stable-queue which might be from shuahkh@osg.samsung.com are
queue-4.4/usbip-vhci_hcd-clear-just-the-usb_port_stat_power-bit.patch
queue-4.4/usbip-fix-3eee23c3ec14-tcp_socket-address-still-in-the-status-file.patch
next prev parent reply other threads:[~2018-02-05 18:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 17:45 [4.4,v2,2/2] usbip: fix 3eee23c3ec14 tcp_socket address still in the status file Shuah Khan
2018-02-05 17:45 ` [PATCH 4.4 v2 2/2] " Shuah Khan
2018-02-05 18:00 ` gregkh [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-02-05 17:45 [4.4,v2,1/2] usbip: vhci_hcd: clear just the USB_PORT_STAT_POWER bit Shuah Khan
2018-02-05 17:45 ` [PATCH 4.4 v2 1/2] " Shuah Khan
2018-02-05 18:01 ` Patch "usbip: vhci_hcd: clear just the USB_PORT_STAT_POWER bit" has been added to the 4.4-stable tree gregkh
2018-02-05 17:45 [PATCH 4.4 v2 0/2] Backports for fixes Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517853659105156@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ebiggers3@gmail.com \
--cc=shuahkh@osg.samsung.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.