浏览代码

staging: usbip: bugfix for stack corruption on 64-bit architectures

Previously a 6 byte array (buf) was erroneously cast to a 8 byte long
(event_bits) on 64-bit architectures which caused a stack corruption.

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bart Westgeest 13 年之前
父节点
当前提交
08224262ad
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/usbip/vhci_hcd.c

+ 1 - 1
drivers/staging/usbip/vhci_hcd.c

@@ -205,7 +205,7 @@ static int vhci_hub_status(struct usb_hcd *hcd, char *buf)
 	int		retval = 0;
 	int		retval = 0;
 
 
 	/* the enough buffer is allocated according to USB_MAXCHILDREN */
 	/* the enough buffer is allocated according to USB_MAXCHILDREN */
-	unsigned long	*event_bits = (unsigned long *) buf;
+	u32		*event_bits = (unsigned long *) buf;
 	int		rhport;
 	int		rhport;
 	int		changed = 0;
 	int		changed = 0;