Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 189b4c8d authored by Mayank Rana's avatar Mayank Rana Committed by Gerrit - the friendly Code Review server
Browse files

usb: f_gsi: Use required RNDIS IAD descriptors with full speed descriptors



gsi_eth_fs_function is array of pointers to set of RNDIS interface
related descriptors. gsi_eth_fs_function's first descriptor is
pointing itself instead of required RNDIS IAD descriptor. This
results into out-of-bound read access while copying these set of
descriptors with usb_copy_descriptors() API. Fix this issue by
using required RNDIS IAD descriptor here.

Change-Id: Ic604221febc43eb8a22d8de99fb8cead74e13b41
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent eb1480ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -565,7 +565,7 @@ static struct usb_endpoint_descriptor rndis_gsi_fs_out_desc = {
};

static struct usb_descriptor_header *gsi_eth_fs_function[] = {
	(struct usb_descriptor_header *) &gsi_eth_fs_function,
	(struct usb_descriptor_header *) &rndis_gsi_iad_descriptor,
	/* control interface matches ACM, not Ethernet */
	(struct usb_descriptor_header *) &rndis_gsi_control_intf,
	(struct usb_descriptor_header *) &rndis_gsi_header_desc,