aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Validate WEXT event iwe->u.data.length before using the event dataJouni Malinen2008-09-271-1/+24
| | | | | This is needed to avoid crashing wpa_supplicant with invalid event messages that may be received when using 64-bit kernel with 32-bit userspace.
* Silenced compiler warnings on size_t printf format and shadowed variablesJouni Malinen2008-09-275-16/+20
|
* MFP + FT: Added support for sending IGTK in FTIEJouni Malinen2008-09-011-73/+146
|
* Added support for using SHA256-based stronger key derivation for WPA2Jouni Malinen2008-08-3110-57/+151
| | | | | | IEEE 802.11w/D6.0 defines new AKMPs to indicate SHA256-based algorithms for key derivation (and AES-CMAC for EAPOL-Key MIC). Add support for using new AKMPs and clean up AKMP processing with helper functions in defs.h.
* Moved WMM action category definition into ieee802_11_defs.hJouni Malinen2008-08-311-0/+1
|
* IEEE 802.11w: Added association pingJouni Malinen2008-08-311-3/+9
| | | | | | This updates management frame protection to use the assocition ping process from the latest draft (D6.0) to protect against unauthenticated authenticate or (re)associate frames dropping association.
* Updated MFP defines based on IEEE 802.11w/D6.0 and use new MFPC/MFPRJouni Malinen2008-08-304-8/+32
| | | | | | | This adds most of the new frame format and identifier definitions from IEEE 802.11w/D6.0. In addition, the RSN IE capability field values for MFP is replaced with the new two-bit version with MFPC (capable) and MFPR (required) processing.
* Fixed WEXT scan result parser to not crash on invalid IEs (zero len buffer)Jouni Malinen2008-08-272-4/+10
| | | | | | | | | | | | | | | | | If IWEVGENIE or custom event wpa_ie/rsn_ie is received in scan with empty buffer, the previous version ended up calling realloc(NULL, 0) which seems to return a non-NULL value in some cases. When this return value is passed again into realloc with realloc(ptr, 0), the returned value could be NULL. If the ptr is then freed (os_free(data.ie) in SIOCGIWAP handling), glibc may crash due to invalid pointer being freed (or double-freed?). The non-NULL realloc(NULL, 0) return value from glibc looks a bit odd behavior, but anyway, better avoid this case completely and just skip the IE events that have an empty buffer. This issue should not show up with drivers that produce proper scan results since the IEs will always include the two-octet header. However, it seems to be possible to see this when using 64-bit kernel and 32-bit userspace with incorrect compat-ioctl processing.
* Fixed internal TLSv1 server implementation for abbreviated handshakeJouni Malinen2008-08-241-1/+3
| | | | | | | | | | When the TLS handshake had been completed earlier by the server in case of abbreviated handshake, the output buffer length was left uninitialized. It must be initialized to zero in this case. This code is used by EAP-FAST server and the uninitialized length could have caused it to try to send a very large frame (though, this would be terminated by the 50 roundtrip EAP limit). This broke EAP-FAST server code in some cases when PAC was used to establish the tunnel.
* Fixed EAP-FAST server PAC-Opaque paddingJouni Malinen2008-08-241-1/+1
| | | | | 0.6.4 broke this for some peer identity lengths. The padding was supposed to make sure that the length of PAC-Opaque is divisible by 8.
* HT: Removed unused definitionsJouni Malinen2008-08-221-9/+0
|
* Add Intel copyright for files with 802.11n Intel changesTomas Winkler2008-08-221-0/+1
| | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
* Add preliminary IEEE 802.11n support into hostapdJouni Malinen2008-08-211-0/+229
| | | | | | | | | | | | This commit brings in cleaned up version of IEEE 802.11n implementation from Intel (1). The Intel tarball includes number of other changes, too, and only the changes specific to IEEE 802.11n are brought in here. In addition, this does not include all the changes (e.g., some of the configuration parameters are still missing and driver wrapper changes for mac80211 were not included). (1) http://www.kernel.org/pub/linux/kernel/people/chuyee/wireless/iwl4965_ap/hostap_0_6_0_intel_0.0.13.1.tgz
* Added mlme_{add,remove}_sta() for userspace MLMEJouni Malinen2008-08-181-0/+73
| | | | | | | These functions are based on the hostapd implementation and complete the userspace MLME code in wpa_supplicant (though, mac80211 will still need couple of pending patches to be integrated in order to get userspace client MLME working again).
* Internal X.509/TLSv1: Support SHA-256 in X.509 certificate digestJouni Malinen2008-08-161-2/+42
|
* Updated EAP-TTLSv0 references to use RFC 5281Jouni Malinen2008-08-164-10/+10
|
* nl80211: Preliminary code for usermode MLME supportJouni Malinen2008-08-154-0/+1198
| | | | | | | | | This adds some parts needed to use usermode MLME with the current mac80211 (plus a patch to add a new cfg80211 command; not yet submitted to wireless-testing). This version creates a monitor interface for management frames and is able to send Probe Request frames during scan. However, it looks like management frame reception is not yet working properly. In addition, mlme_{add,remove}_sta() handlers are still missing.
* nl80211: Fixed re-initialization of removed and re-inserted interfaceJouni Malinen2008-08-151-26/+100
| | | | | | | | | | | | | Network device ifindex will change when the interface is re-inserted. driver_nl80211.c will need to accept netlink events from "unknown" (based on ifindex) interfaces when a previously used card was removed earlier. If the previously removed interface is added back, the driver_wext data need to be updated to match with the new ifindex value. In addition, the initial setup tasks for the card (set interface up, update ifindex, set mode, etc.) from wpa_driver_nl80211_init() need to be run again. This is the changes from commit 3fbda8f943fff3e8afd649663bdcbba9cbfd6ee3 (driver_wext.c) ported for driver_nl80211.c.
* nl80211: Fixed set_mode() to actually use adhoc/station nl80211 variablesJouni Malinen2008-08-151-1/+2
|
* IEEE Std 802.11r-2008 has been released, so update referencesJouni Malinen2008-08-152-5/+5
|
* Preparations for 0.6.4 releaseJouni Malinen2008-08-101-1/+1
|
* Fixed MinGW build without CONFIG_NDIS_EVENTS_INTEGRATED definedJouni Malinen2008-08-101-0/+2
|
* Renamed MSG to PROC_MSG to avoid conflicts with MinGW winuser.hJouni Malinen2008-08-102-10/+10
|
* Fixed opportunistic key caching (OKC)Jouni Malinen2008-08-031-1/+2
| | | | | | | | | | wpa_sm_set_config() can be called even if the network block does not change. However, the previous version ended up calling pmksa_cache_notify_reconfig() every time and this cleared the network context from PMKSA cache entries. This prevented OKC from ever being used. Do not call pmksa_cache_notify_reconfig() if the network context remains unchanged to allow OKC to be used.
* WEXT: Fixed re-initialization of removed and re-inserted interfaceJouni Malinen2008-07-252-10/+79
| | | | | | | | | | Network device ifindex will change when the interface is re-inserted. driver_wext.c will need to accept netlink events from "unknown" (based on ifindex) interfaces when a previously used card was removed earlier. If the previously removed interface is added back, the driver_wext data need to be updated to match with the new ifindex value. In addition, the initial setup tasks for the card (set interface up, update ifindex, set mode, etc.) from wpa_driver_wext_init() need to be run again.
* Fixed EAP-TNC not to include extra EAP header and TNC flagsJouni Malinen2008-07-172-21/+15
| | | | | | | | The change to support fragmentation added extra function to generate the EAP header, but forgot to remove the original code and ended up getting two EAP headers and TNC flags field in the generated message. These header fields need to be added only in the function that builds the final message (and if necessary, fragments the data).
* wext: fix maxrate calculationDan Williams2008-07-152-2/+10
| | | | | | | | | | | | | | When scan results got moved from wpa_scan_result -> wpa_scan_res, the 'maxrate' member was dropped from wpa_scan_res. The D-Bus interface used 'maxrate', which was replaced with wpa_scan_get_max_rate(). Unfortunately, wpa_scan_get_max_rate() returns 802.11 rate values directly from the IE, where 'maxrate' was the rate in bits/second. The supplicant internally fakes an IE for wpa_scan_res from the value of wpa_scan_result->maxrate, but interprets ->maxrate as an 802.11 rate index. As a side-effect, this fixes a soft-break of the D-Bus control API since the wpa_scan_res change was introduced.
* Fixed wpa_scan_get_max_rate() to clear the basicrate flag when determiningJouni Malinen2008-07-151-4/+4
| | | | the highest rate.
* Make proactive key caching working againMichael Bernhard2008-07-061-1/+2
| | | | | | | | | | | | | | | Function 'wpa_sm_set_config' used the argument 'config' as the network context which is a pointer to a local variable of the function 'wpa_supplicant_rsn_supp_set_config'. This is one reason why no proactive key was generated. This network context never matched with the network context saved in the pmksa cache entries. The structure 'rsn_supp_config' has already a member 'network_ctx' which is now filled in by this patch with 'ssid'. Signed-off-by: Michael Bernhard <michael.bernhard@bfh.ch>
* Added temporary #ifdef WEXT_MFP_PENDING around the MFP changesJouni Malinen2008-06-181-0/+4
| | | | | | Just in case, do not use the not-yet-approved WEXT changes even if someone where to build wpa_supplicant with IEEE 802.11w support unless this new macro has been defined explicitly.
* WEXT: IEEE 802.11w/MFP configurationJouni Malinen2008-06-182-0/+28
| | | | | | | Added configuration of MFP related parameters with WEXT. The changes to linux/wireless.h have not yet been applied to the Linux kernel tree, so the code using them is still open to changes and is ifdef'ed out if CONFIG_IEEE80211W is not set.
* Add support for the driver which do 4-way handshakeMasakazu Mokuno2008-06-181-3/+50
| | | | | | | Add the support for the Linux wireless drivers which want to do 4-way handshake and need to know the PSK before the handshake. Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
* Add the flags for the drivers which do 4-way handshakeMasakazu Mokuno2008-06-181-0/+2
| | | | | | | Add the new flags which are supposed to be included in Linux 2.6.27 for the drivers which want to do 4-way handshake and to know PMK. Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
* Fixed race condition between disassociation event and group key handshakeJouni Malinen2008-06-093-17/+0
| | | | | | | | | | | This avoids getting stuck in state where wpa_supplicant has canceled scans, but the driver is actually in disassociated state. The previously used code that controlled scan timeout from WPA module is not really needed anymore (and has not been needed for past four years since authentication timeout was separated from scan request timeout), so this can simply be removed to resolved the race condition. As an extra bonus, this simplifies the interface to WPA module. [Bug 261]
* EAP-PEAP: Moved the common peap_prfplus() function into a shared fileJouni Malinen2008-06-094-140/+111
|
* Added a preliminary nl80211/cfg80211 driver interface for wpa_supplicantJouni Malinen2008-06-062-0/+2104
| | | | | | driver_nl80211.c is based on driver_wext.c and it is still using Linux wireless extensions for many functions. Over time, the new driver interface code should be modified to use nl80211/cfg80211 for everything.
* Fix compile warnings on 64-bit systemsPavel Roskin2008-06-061-2/+2
| | | | | | Don't cast pointers to int in definitions of PRISM2_HOSTAPD_RID_HDR_LEN and PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN. Use size_t instead. That's actually what the code needs.
* Updated the LibTomMath reference to use 0.41 versionJouni Malinen2008-06-061-3/+3
|
* Combined internal LibTomMath configuration into one optionJouni Malinen2008-06-061-11/+11
| | | | | | CONFIG_INTERNAL_LIBTOMMATH_FAST=y in .config can now be used to enable all optimized routines at a cost of about 4 kB. This is small enough increase in size to justify simplified configuration.
* Added an option to build internal LibTomMath with faster div routineJouni Malinen2008-06-061-0/+287
| | | | | | | At the cost of about 1 kB of additional binary size, the internal LibTomMath can be configured to include faster div routine to speed up DH and RSA. This can be enabled with CONFIG_INTERNAL_LIBTOMMATH_FAST_DIV=y in .config.
* Read Michael MIC keys through TK2 union instead of offset from TK1Jouni Malinen2008-06-051-2/+2
| | | | | | This gets rid of potential warnings about buffer bounds errors. The earlier code works fine, but it is not the cleanest way of using the struct wpa_ptk definition for TK1/TK2.
* Fixed potential NULL pointer dereference if memory allocation failsJouni Malinen2008-06-051-0/+6
|
* Fixed RADIUS client local address forcing for IPv6 (eapol_test)Jouni Malinen2008-06-051-3/+4
| | | | Need to use the IPv6 address data in bind() call if IPv6 is selected.
* Add faster, optional sqr routine for internal LibTomMathJouni Malinen2008-06-051-0/+104
| | | | | | | At the cost of about 0.5 kB of additional binary size, the internal LibTomMath can be configured to include faster sqr routine to speed up DH and RSA. This can be enabled with CONFIG_INTERNAL_LIBTOMMATH_FAST_SQR=y in .config.
* Silence compiler warnings about out of array bounds indexesJouni Malinen2008-06-051-2/+1
| | | | | | | | | | struct wpa_ie_hdr had separate fields for 24-bit OUI and 8-bit oui_type for WPA/RSN selectors. {WPA,RSN}_SELECTOR_{GET,PUT} access these four octets through oui and the "out-of-bounds" access for the fourth octet is actually reading/writing oui_type. This works fine, but some tools complain about the array bounds "failure". Since oui_type is never accessed separately, the simplest fix is to just combine these into a single 4-octet field.
* wext: handle mode switches correctly for mac80211Dan Williams2008-06-041-4/+41
| | | | | | | Since mac80211 requires that the device be !IFF_UP to change the mode (and I think the old prism54 fullmac driver does too), do that. This shouldn't harm fullmac devices since they can handle mode switches on the fly and usually don't care about up/down that much.
* Updated the comments since Montgomery reduction is now includedJouni Malinen2008-06-041-8/+5
|
* Internal LibTomMath: add optional support for Montgomery reductionJouni Malinen2008-06-041-0/+608
| | | | | | | Add a cost of about 2.5 kB of additional cost, the internal LibTomMath can be configured to include fast exptmod routine to speed up DH and RSA. This can be enabled with CONFIG_INTERNAL_LIBTOMMATH_FAST_EXPTMOD=y in .config.
* Reduce integrated LibTomMath size by dropping negative exponent supportJouni Malinen2008-06-041-2/+17
| | | | | Current uses do not require support for negative exponent in exptmod, so we can save about 1.5 kB in leaving out invmod.
* Introduced new helper function is_zero_ether_addr()Jouni Malinen2008-06-035-9/+9
| | | | | Use this inline function to replace os_memcmp(addr, "\x00\x00\x00\x00\x00\x00", ETH_ALEN) == 0.