Skip to contentSkip to conversation

patch "staging: gigaset: fix general protection fault on probe" added to staging-linus

PATCH [email protected] 1 participant 1 message Dec 10, 2019

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

staging: gigaset: fix general protection fault on probe

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 53f35a39c3860baac1e5ca80bf052751cfb24a99 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Mon, 2 Dec 2019 09:56:08 +0100
Subject: 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 07dc1f9f2f80 ("[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]>
---
 drivers/staging/isdn/gigaset/usb-gigaset.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/staging/isdn/gigaset/usb-gigaset.c +5 -0
index 1b9b43659bdf..5e393e7dde45 100644
@@ -685,6 +685,11 @@ static int gigaset_probe(struct usb_interface *interface,
 		return -ENODEV;
 	}
 
+	if (hostif->desc.bNumEndpoints < 2) {
+		dev_err(&interface->dev, "missing endpoints\n");
+		return -ENODEV;
+	}
+
 	dev_info(&udev->dev, "%s: Device matched ... !\n", __func__);
 
 	/* allocate memory for our device state and initialize it */
Signature · 1 line
2.24.0