USB CCID: response packet in case SetParameters command is unsupported is flagged as malformed.
Summary
According to the CCID spec V1.11 section 6.2.3 on page 51, it is allowed for a usb CCID device to not support the Set/Get/ResetParameters command and respond the RDR_to_PC_Parameters message with the Failed bit set in commandstatus, see 3rd alinea (tr., paragraph) on that page. In that case, the dwLength is allowed to be 0 and no abParametersStructure is added. Such a packet is currently flagged as Malformed in the usb ccid dissector.
Sample capture file
See attached pcap file. There bis a failed setParameters response and a successful one.
Steps to reproduce
Use the pcap file. usbccid.pcapng
What is the current bug behavior?
The RDR_to_PC_Parameters response with 'Failed' status is flagged as Malformed.
What is the expected correct behavior?
The RDR_to_PC_Parameters response with 'Failed' status is shown normally.
Build information
Version 4.4.0 (v4.4.0-0-g009a163470b5).
Compiled (64-bit) using Microsoft Visual Studio 2022 (VC++ 14.37, build 32822),
with GLib 2.78.4, with Qt 6.5.3, with libpcap, with zlib 1.3.1, with zlib-ng
2.1.5, with PCRE2, with Lua 5.4.6 (with UfW patches), with GnuTLS 3.8.4 and PKCS
#11 support, with Gcrypt 1.10.2-unknown, with Kerberos (MIT), with MaxMind, with
nghttp2 1.62.1, with nghttp3 0.14.0, with brotli, with LZ4, with Zstandard, with
Snappy, with libxml2 2.11.7, with libsmi 0.5.0, with Minizip-ng , with
QtMultimedia, with automatic updates using WinSparkle 0.8.0, with AirPcap, with
binary plugins.
Running on 64-bit Windows 11 (23H2), build 22631, with 13th Gen Intel(R)
Core(TM) i5-1335U (with SSE4.2), with 16068 MB of physical memory, with GLib
2.78.4, with Qt 6.5.3, with Npcap version 1.79, based on libpcap version 1.10.4,
with PCRE2 10.43 2024-02-16, with c-ares 1.27.0, with GnuTLS 3.8.4, with Gcrypt
1.10.2-unknown, with nghttp2 1.62.1, with nghttp3 0.14.0, with brotli 1.0.9,
with LZ4 1.9.4, with Zstandard 1.5.6, without AirPcap, with light display mode,
with mixed DPI, with QPA plugin "windows", with LC_TYPE=Dutch_Netherlands.utf8,
binary plugins supported.
Edited by Jaap Keuter