lambdaconcept/usb2sniffer-qt

The application crashes while loading some files

jeanthom opened this issue · 1 comments

Not sure if those files are malformed, but at least it shows that the parser isn't safe on some files generated by USB2Sniffer.

#0  0x00007ffff6a43fc4 in __memmove_avx_unaligned_erms () at /lib64/libc.so.6
#1  0x00007ffff6f82f38 in QByteArray::QByteArray(char const*, int) () at /lib64/libQt5Core.so.5
#2  0x0000000000419f31 in MainWindow::loadFile() (this=0x7fffffffd4f0) at ../mainwindow.cpp:289

Here is the backtrace of one of such crashes. One mitigation could be to drop packets that have a plen above USB's maximum packet length.

Attached to this issue is one file that cause this kind of issue.
usb2sniffer-autocapture.zip

This issue seems to happen when a USB packet has more than 512 bytes (in the above example it is 515 bytes long).

I wonder if it is USB 3-compliant to send a 1024 byte BULK transaction over a USB 2.0 differential pair if the host controller supports USB 3.