Skip to content

Commit 53f35a3

Browse files
jhovoldgregkh
authored andcommitted
staging: gigaset: fix general protection fault on probe
Fix a general protection fault when accessing the endpoint descriptors which could be triggered by a malicious device due to missing sanity checks on the number of endpoints. Reported-by: [email protected] Fixes: 07dc1f9 ("[PATCH] isdn4linux: Siemens Gigaset drivers - M105 USB DECT adapter") Cc: stable <[email protected]> # 2.6.17 Cc: Hansjoerg Lipp <[email protected]> Cc: Tilman Schmidt <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d2cdb20 commit 53f35a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/staging/isdn/gigaset/usb-gigaset.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,11 @@ static int gigaset_probe(struct usb_interface *interface,
685685
return -ENODEV;
686686
}
687687

688+
if (hostif->desc.bNumEndpoints < 2) {
689+
dev_err(&interface->dev, "missing endpoints\n");
690+
return -ENODEV;
691+
}
692+
688693
dev_info(&udev->dev, "%s: Device matched ... !\n", __func__);
689694

690695
/* allocate memory for our device state and initialize it */

0 commit comments

Comments
 (0)