Problems with WPA-PSK

Piotr Zawadzki pzawadzki
Sun Mar 12 09:54:46 PST 2006


I have problems with WPA-PSK setup. I'm using hostapd 0.5.1 and 
wpa_supplicatnt 0.5.1

The hostAP and STA use the following cards, respectively:
AP:
--
2:0a.0 Network controller: Intersil Corporation Prism 2.5 Wavelan chipset (rev 
01)
--
STA:
--
# cardctl ident
product info: "TP-LINK technology ", "Inc. ", "", ""
manfid: 0x0271, 0x0012
function: 6 (network)
--	
The card in the authenticator is the old one, 
--
# hostap_diag wlan0
Host AP driver diagnostics information for 'wlan0'

NICID: id=0x8013 v1.0.0 (PRISM II (2.5) Mini-PCI (SST parallel flash))
PRIID: id=0x0015 v1.0.7
STAID: id=0x001f v1.3.6 (station firmware)
-- 
so I upraded firmware
--
# prism2_srec -gs wlan0 ak010104.hex ; prism2_srec -gp wlan0 ak010104.hex ; 
prism2_srec -rp wlan0 rf010804.hex
...
Components after download:
  NICID: 0x8013 v1.0.0
  PRIID: 0x0015 v1.1.4
  STAID: 0x001f v1.8.4
--
and then started hostapd (hostap driver from the kernel 2.6.14)
with the following config file
--
interface=wlan0
driver=hostap
ssid=misiek
macaddr_acl=0
accept_mac_file=/etc/hostap/hostapd.accept
deny_mac_file=/etc/hostap/hostapd.deny
auth_algs=1
own_ip_addr=192.168.100.1
wpa=1
wpa_passphrase=misiobury
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
--

On the station the wpa_supplicant is started with command

# wpa_supplicant -c wpasupplicant-WPA_PSK.conf -D madwifi -i ath0 -d

File wpasupplicant-WPA_PSK.conf
--
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
network={
    ssid="misiek"
    key_mgmt=WPA-PSK
    proto=WPA
    pairwise=TKIP
    psk="misiobury"
}
--
Unfortunately this setup does not work and supplicant is not able to finish 
4-Way handshake.

Output from hostapd
--
Configuration file: hostapd_WPA-PSK.conf
ctrl_interface_group=0
Opening raw packet socket for ifindex 97
Using interface wlan0 with hwaddr 00:0f:cb:b0:0d:9b and ssid 'misiek'
SSID - hexdump_ascii(len=6):
     6d 69 73 69 65 6b                                 misiek
PSK (ASCII passphrase) - hexdump_ascii(len=9):
     6d 69 73 69 6f 62 75 72 79                        misiobury
PSK (from passphrase) - hexdump(len=32): 58 12 6a d5 89 f0 36 c0 dd 9b db d9 
eb 7e 8c da 9d 4a c0 3e d8 c0 02 ba a5 17 71 5f 06 64 1f ac
WPA: group state machine entering state GTK_INIT
GMK - hexdump(len=32): [REMOVED]
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE
SIOCGIWRANGE: WE(compiled)=19 WE(source)=18 enc_capa=0xf
Flushing old station entries
Deauthenticate all stations
mgmt::auth
authentication: STA=00:0a:eb:a6:6c:98 auth_alg=0 auth_transaction=1 
status_code=0 wep=0
  New STA
wlan0: STA 00:0a:eb:a6:6c:98 IEEE 802.11: authentication OK (open system)
authentication reply: STA=00:0a:eb:a6:6c:98 auth_alg=0 auth_transaction=2 
resp=0
MGMT (TX callback) ACK
mgmt::auth cb
wlan0: STA 00:0a:eb:a6:6c:98 IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=00:0a:eb:a6:6c:98 capab_info=0x31 listen_interval=100
  new AID 1
wlan0: STA 00:0a:eb:a6:6c:98 IEEE 802.11: association OK (aid 1)
MGMT (TX callback) ACK
mgmt::assoc_resp cb
wlan0: STA 00:0a:eb:a6:6c:98 IEEE 802.11: associated (aid 1, accounting 
session 441459E4-00000000)
wlan0: STA 00:0a:eb:a6:6c:98 WPA: event 1 notification
wlan0: STA 00:0a:eb:a6:6c:98 WPA: start authentication
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state INITIALIZE
wlan0: STA 00:0a:eb:a6:6c:98 IEEE 802.1X: unauthorizing port
WPA: 00:0a:eb:a6:6c:98 WPA_PTK_GROUP entering state IDLE
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state AUTHENTICATION
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state AUTHENTICATION2
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state INITPSK
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state PTKSTART
wlan0: STA 00:0a:eb:a6:6c:98 WPA: sending 1/4 msg of 4-Way Handshake
DATA (TX callback) ACK
IEEE 802.1X: 00:0a:eb:a6:6c:98 TX status - version=2 type=3 length=95 - ack=1
DATA
IEEE 802.1X: 123 bytes from 00:0a:eb:a6:6c:98
   IEEE 802.1X: version=1 type=3 length=119
wlan0: STA 00:0a:eb:a6:6c:98 WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state PTKCALCNEGOTIATING
PMK - hexdump(len=32): [REMOVED]
PTK - hexdump(len=64): [REMOVED]
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state PTKINITNEGOTIATING
wlan0: STA 00:0a:eb:a6:6c:98 WPA: sending 3/4 msg of 4-Way Handshake
Plaintext EAPOL-Key Key Data - hexdump(len=24): [REMOVED]
DATA (TX callback) ACK
IEEE 802.1X: 00:0a:eb:a6:6c:98 TX status - version=2 type=3 length=119 - ack=1
DATA
IEEE 802.1X: 99 bytes from 00:0a:eb:a6:6c:98
   IEEE 802.1X: version=1 type=3 length=95
wlan0: STA 00:0a:eb:a6:6c:98 WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state PTKINITDONE
wlan0: STA 00:0a:eb:a6:6c:98 IEEE 802.1X: authorizing port
wlan0: STA 00:0a:eb:a6:6c:98 WPA: pairwise key handshake completed (WPA)
WPA: 00:0a:eb:a6:6c:98 WPA_PTK_GROUP entering state REKEYNEGOTIATING
wlan0: STA 00:0a:eb:a6:6c:98 WPA: sending 1/2 msg of Group Key Handshake
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
DATA (TX callback) ACK
IEEE 802.1X: 00:0a:eb:a6:6c:98 TX status - version=2 type=3 length=127 - ack=1
wlan0: STA 00:0a:eb:a6:6c:98 WPA: EAPOL-Key timeout
WPA: 00:0a:eb:a6:6c:98 WPA_PTK_GROUP entering state REKEYNEGOTIATING
wlan0: STA 00:0a:eb:a6:6c:98 WPA: sending 1/2 msg of Group Key Handshake
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
DATA (TX callback) ACK
IEEE 802.1X: 00:0a:eb:a6:6c:98 TX status - version=2 type=3 length=127 - ack=1
wlan0: STA 00:0a:eb:a6:6c:98 WPA: EAPOL-Key timeout
WPA: 00:0a:eb:a6:6c:98 WPA_PTK_GROUP entering state REKEYNEGOTIATING
wlan0: STA 00:0a:eb:a6:6c:98 WPA: sending 1/2 msg of Group Key Handshake
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
DATA (TX callback) ACK
IEEE 802.1X: 00:0a:eb:a6:6c:98 TX status - version=2 type=3 length=127 - ack=1
wlan0: STA 00:0a:eb:a6:6c:98 WPA: EAPOL-Key timeout
WPA: 00:0a:eb:a6:6c:98 WPA_PTK_GROUP entering state REKEYNEGOTIATING
wlan0: STA 00:0a:eb:a6:6c:98 WPA: sending 1/2 msg of Group Key Handshake
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
WPA: 00:0a:eb:a6:6c:98 WPA_PTK_GROUP entering state KEYERROR
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state DISCONNECT
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA 
00:0a:eb:a6:6c:98 reason 2
WPA: 00:0a:eb:a6:6c:98 WPA_PTK_GROUP entering state IDLE
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state DISCONNECTED
WPA: 00:0a:eb:a6:6c:98 WPA_PTK entering state INITIALIZE
wlan0: STA 00:0a:eb:a6:6c:98 IEEE 802.1X: unauthorizing port
wlan0: STA 00:0a:eb:a6:6c:98 IEEE 802.11: deauthenticated due to local deauth 
request
DATA (TX callback) ACK
--
 			
Output from the wpa_supplicant
--
Initializing interface 'ath0' conf 'wpasupplicant-WPA_PSK.conf' driver 
'madwifi' ctrl_interface 'N/A'
Configuration file 'wpasupplicant-WPA_PSK.conf' -> 
'/root/wpasupplicant-WPA_PSK.conf'
Reading configuration file '/root/wpasupplicant-WPA_PSK.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=0
Line 11: removed CCMP from group cipher list since it was not allowed for 
pairwise cipher
Priority group 0
id=0 ssid='misiek'
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=19 WE(source)=13 enc_capa=0x0
capabilities: key_mgmt 0x0 enc 0x3
Own MAC address: 00:0a:eb:a6:6c:98
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_set_countermeasures: enabled=0
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
Added interface ath0
Wireless event: cmd=0x8b06 len=8
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b1a len=8
Wireless event: cmd=0x8b19 len=8
Received 311 bytes of scan results (2 BSSes)
Scan results: 2
Selecting BSS from priority group 0
0: 00:0f:cb:b0:0d:9b ssid='misiek' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
       selected based on WPA IE
Trying to associate with 00:0f:cb:b0:0d:9b (SSID='misiek' freq=2422 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 
00 00 50 f2 02 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 
f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_madwifi_associate
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Wireless event: cmd=0x8b1a len=15
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:0f:cb:b0:0d:9b
State: ASSOCIATING -> ASSOCIATED
Associated to a new BSS: BSSID=00:0f:cb:b0:0d:9b
No keys have been configured - skip key clearing
Associated with 00:0f:cb:b0:0d:9b
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
RX EAPOL from 00:0f:cb:b0:0d:9b
Setting authentication timeout: 10 sec 0 usec
IEEE 802.1X RX: version=2 type=3 length=95
EAPOL-Key type=254
State: ASSOCIATED -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:cb:b0:0d:9b (ver=1)
WPA: WPA IE for msg 2/4 - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 
01 00 00 50 f2 02 01 00 00 50 f2 02
WPA: Renewed SNonce - hexdump(len=32): e6 8b 25 28 9a 26 21 56 74 49 12 a0 a2 
bd ef 74 08 c5 e2 fc 97 da ec a1 7c f5 52 7f 8f 67 40 11
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
WPA: Sending EAPOL-Key 2/4
RX EAPOL from 00:0f:cb:b0:0d:9b
IEEE 802.1X RX: version=2 type=3 length=119
EAPOL-Key type=254
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 3 of 4-Way Handshake from 00:0f:cb:b0:0d:9b (ver=1)
WPA: IE KeyData - hexdump(len=24): da 7d cc be da 73 7b 67 f3 ca 66 0f 99 e8 
55 7e 67 03 39 36 39 09 38 e0
WPA: EAPOL-Key Key Data underflow (ie=218 len=125)
WPA: Sending EAPOL-Key 4/4
WPA: Installing PTK to the driver.
WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_driver_madwifi_set_key: alg=TKIP key_idx=0 set_tx=1 seq_len=6 key_len=32
State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
Added BSSID 00:0f:cb:b0:0d:9b into blacklist
State: GROUP_HANDSHAKE -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_del_key: keyidx=0
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b1a len=8
Wireless event: cmd=0x8b19 len=8
Received 311 bytes of scan results (2 BSSes)
Scan results: 2
Selecting BSS from priority group 0
0: 00:0f:cb:b0:0d:9b ssid='misiek' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
selected based on WPA IE
Trying to associate with 00:0f:cb:b0:0d:9b (SSID='misiek' freq=2422 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 
00 00 50 f2 02 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 
f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_madwifi_associate
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Wireless event: cmd=0x8b1a len=15
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:0f:cb:b0:0d:9b
State: ASSOCIATING -> ASSOCIATED
Associated to a new BSS: BSSID=00:0f:cb:b0:0d:9b
No keys have been configured - skip key clearing
Associated with 00:0f:cb:b0:0d:9b
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RX EAPOL from 00:0f:cb:b0:0d:9b
Setting authentication timeout: 10 sec 0 usec
IEEE 802.1X RX: version=2 type=3 length=95
       EAPOL-Key type=254
State: ASSOCIATED -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:cb:b0:0d:9b (ver=1)
WPA: WPA IE for msg 2/4 - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 
01 00 00 50 f2 02 01 00 00 50 f2 02
WPA: Renewed SNonce - hexdump(len=32): 67 8d 2b f3 d5 86 64 63 cf a9 e4 5a f4 
50 08 48 2e c5 fc 4d 63 f0 aa 82 f8 6c 74 71 56 8c d2 4c
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
WPA: Sending EAPOL-Key 2/4
RX EAPOL from 00:0f:cb:b0:0d:9b
IEEE 802.1X RX: version=2 type=3 length=119
EAPOL-Key type=254
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 3 of 4-Way Handshake from 00:0f:cb:b0:0d:9b (ver=1)
WPA: IE KeyData - hexdump(len=24): 4e d4 a6 e2 ff e7 7a 1b f2 33 4a 04 c3 80 
98 0a f8 59 64 fd 36 53 2f d0
WPA: EAPOL-Key Key Data underflow (ie=78 len=212)
WPA: Sending EAPOL-Key 4/4
WPA: Installing PTK to the driver.
WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_driver_madwifi_set_key: alg=TKIP key_idx=0 set_tx=1 seq_len=6 key_len=32
State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
BSSID 00:0f:cb:b0:0d:9b blacklist count incremented to 2
State: GROUP_HANDSHAKE -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
--		   
-- 
Piotr Zawadzki, Silesian Technical University
PGP: http://www.keyserver.net/




More information about the Hostap mailing list