Wireshark-bugs: [Wireshark-bugs] [Bug 12780] New: MODE SENSE 10 : Mode parameter header 10 : blo

Date: Tue, 23 Aug 2016 16:48:07 +0000
Bug ID 12780
Summary MODE SENSE 10 : Mode parameter header 10 : block descriptor length needs to be 2 bytes not 1 byte
Product Wireshark
Version Git
Hardware x86-64
OS Windows 7
Status UNCONFIRMED
Severity Normal
Priority Low
Component Dissection engine (libwireshark)
Assignee [email protected]
Reporter [email protected]

Build Information:
Version 2.0.5 (v2.0.5-0-ga3be9c6 from master-2.0)

Copyright 1998-2016 Gerald Combs <[email protected]> and contributors.
License GPLv2+: GNU GPL version 2 or later
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with Qt 5.3.2, with WinPcap (4_1_3), with libz 1.2.8, with
GLib 2.42.0, with SMI 0.4.8, with c-ares 1.11.0, with Lua 5.2, with GnuTLS
3.2.15, with Gcrypt 1.6.2, with MIT Kerberos, with GeoIP, with QtMultimedia,
with AirPcap.

Running on 64-bit Windows 7 Service Pack 1, build 7601, with locale
English_United States.1252, with WinPcap version 4.1.3 (packet.dll version
4.1.0.2980), based on libpcap version 1.0 branch 1_0_rel0b (20091008), with
GnuTLS 3.2.15, with Gcrypt 1.6.2, without AirPcap.
      Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz (with SSE4.2), with 7785MB of
physical memory.


Built using Microsoft Visual C++ 12.0 build 40629

Wireshark is Open Source Software released under the GNU General Public
License.

Check the man page and http://www.wireshark.org for more information
--
Based on the SPC4 spec, the Block descriptor length in Mode parameter Header 10
is a 2 byte variable ( refer Table 455 in SPC4 spec ). 

Wireshark is always using only a 1 byte conversion here.. 

The conversion is done properly in MODE_SELECT 10 though. Only MODE SENSE 10
has the issue.

https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=epan/dissectors/packet-scsi.c;h=831492ddd663c0632862c4149b7c37840cc066ee;hb=831492ddd663c0632862c4149b7c37840cc066ee

Function dissect_spc3_modesense10 Line Number 2895 and Line number 2972 – 2974

2972         desclen = tvb_get_guint8 (tvb, offset);
2973         proto_tree_add_text (tree, tvb, offset, 1,
2974                              "Block Descriptor Length: %u", desclen);

It needs to be like below

desclen = tvb_get_ntohs (tvb, offset);
proto_tree_add_text (tree, tvb, offset, 2,
"Block Descriptor Length: %u", desclen);


I dissected the same mode sense packet using sg_modes utility and that show it
properly but wireshark was showing it as 0 due to using a single byte instead
of 2 bytes.

Please check and fix


You are receiving this mail because:
  • You are watching all bug changes.