cdc-acm: more sanity checking
Subsystems (3)
Oliver Neukum
maintainerPATCH 1/1 cdc-acm: more sanity checking
An attack has become available which pretends to be a quirky device circumventing normal sanity checks and crashes the kernel by an insufficient number of interfaces. This patch adds a check to the code path for quirky devices.
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/usb/class/cdc-acm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/class/cdc-acm.c +3 -0
@@ -1179,6 +1179,9 @@ static int acm_probe(struct usb_interface *intf,if (quirks ==NO_UNION_NORMAL ) { data_interface =usb_ifnum_to_if (usb_dev,1 ); control_interface =usb_ifnum_to_if (usb_dev,0 ); +/* we would crash */ +if (!data_interface || !control_interface) +return -ENODEV ; goto skip_normal_probe; }
Signature · 1 line
2.1.4