Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 7661] New: WPA-PSK key format for IEEE80211 decryption doe

Date: Thu, 23 Aug 2012 20:45:05 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7661

           Summary: WPA-PSK key format for IEEE80211 decryption does not
                    work since 1.7.0
           Product: Wireshark
           Version: 1.8.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Dissection engine (libwireshark)
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: colustang@xxxxxxxxx


Build Information:
TShark 1.8.2 (SVN Rev 44520 from /trunk-1.8)

Copyright 1998-2012 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
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 GLib 2.32.3, with libpcap, with libz 1.2.3, without
POSIX
capabilities, with SMI 0.4.8, without c-ares, without ADNS, with Lua 5.1,
without Python, with GnuTLS 2.12.19, with Gcrypt 1.5.0, with MIT Kerberos, with
GeoIP.

Running on Mac OS 10.8.0 (Darwin 12.0.0), without locale, with libpcap version
1.1.1, with libz 1.2.5.

Built using gcc 4.2.1 (Apple Inc. build 5666) (dot 3).

--
Using wpa-psk:010203....32 works fine in 1.6.x for IEEE802.11 decryption.  The
same is not working after 1.7.0.  The same 64-characters hexstring key is keep
being rejected by Wireshark as invalid format specified.

There are couple problems at:

At epan/crypto/airpdcap.c, parse_key_string function:

key_ba->len is being compared against WPA_PSK_KEY_CHAR_SIZE (64) however key_ba
is the actual key in byte array which is always 32 bytes, hence, always fails
the check.

Also, latter the dk->type is being set as AIRPDCAP_KEY_TYPE_WPA_PMK which
affects the following at packet-ieee80211.c.


At epan/dissectors/packet-ieee80211.c,  void uat_wep_key_record_update_cb
function:

After calling parse_key_string, there is no case for AIRPCAP_KEY_TYPE_WPA_PMK,
which causes the "wpa-psk" keys always fallback to the default as "Invalid key
format".

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.