From: Johan Hovold Date: Wed, 27 Aug 2014 09:55:18 +0000 (+0200) Subject: USB: serial: fix potential stack buffer overflow X-Git-Tag: v3.2.64~143 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51140f5ce2b7e47934b277a3195cb2f1b78912fc;p=pandora-kernel.git USB: serial: fix potential stack buffer overflow commit d979e9f9ecab04c1ecca741370e30a8a498893f5 upstream. Make sure to verify the maximum number of endpoints per type to avoid writing beyond the end of a stack-allocated array. The current usb-serial implementation is limited to eight ports per interface but failed to verify that the number of endpoints of a certain type reported by a device did not exceed this limit. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed