language: c compiler: - gcc - clang sudo: false env: global: - secure: "fTrjH4X1FJaCMAZXVW+sQBuKPr2C+w/pEkIl8FVQZvGxsgpw3OQR28stWnT7VhSuRExUqxEmKcIZgJmU9OAlF/K5ZQkNnUdyQgeiNdhPEMhTCQ3eZv8Ar60UVtmvuzWUN4BP1TUHoBCjq4Wxt1t4QN49P1T7RdjEawCfh+OFZ9s=" addons: apt: packages: - libnl-3-dev - libnl-genl-3-dev - libnl-route-3-dev - libnetfilter-conntrack-dev - libgeoip-dev - liburcu-dev - libpcap-dev - libnet1-dev - libcli-dev coverity_scan: project: name: "netsniff-ng/netsniff-ng" description: "Build submitted via Travis CI" notification_email: tklauser@distanz.ch build_command_prepend: "./configure && make clean" build_command: "make" branch_pattern: coverity_scan script: - CC=$CC ./configure && make CC=$CC - CC=$CC ./configure --disable-geoip && make clean && make CC=$CC - CC=$CC ./configure --disable-zlib && make clean && make CC=$CC - CC=$CC ./configure --disable-geoip --disable-zlib && make clean && make CC=$CC - CC=$CC ./configure --disable-libnl && make clean && make CC=$CC ion value='master'>master net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2016-08-23 15:32:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-23 16:35:20 -0400
commit53e5f36fbd2453ad69a3369a1db62dc06c30a4aa (patch)
treec9f3dae00c6bec6bfc129754e37397533718ad1e
parent6c73358c83ce870c0cf32413e5cadb3b9a39c606 (diff)
USB: avoid left shift by -1
UBSAN complains about a left shift by -1 in proc_do_submiturb(). This can occur when an URB is submitted for a bulk or control endpoint on a high-speed device, since the code doesn't bother to check the endpoint type; normally only interrupt or isochronous endpoints have a nonzero bInterval value. Aside from the fact that the operation is illegal, it shouldn't matter because the result isn't used. Still, in theory it could cause a hardware exception or other problem, so we should work around it. This patch avoids doing the left shift unless the shift amount is >= 0. The same piece of code has another problem. When checking the device speed (the exponential encoding for interrupt endpoints is used only by high-speed or faster devices), we need to look for speed >= USB_SPEED_SUPER as well as speed == USB_SPEED HIGH. The patch adds this check. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Vittorio Zecca <zeccav@gmail.com> Tested-by: Vittorio Zecca <zeccav@gmail.com> Suggested-by: Bjørn Mork <bjorn@mork.no> CC: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat