You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Stefan Lippers-Hollmann 8f17c019a1 hostapd: fix CVE-2019-9497, CVE-2019-9498, CVE-2019-9499
EAP-pwd missing commit validation

Published: April 10, 2019
Identifiers:
- CVE-2019-9497 (EAP-pwd server not checking for reflection attack)
- CVE-2019-9498 (EAP-pwd server missing commit validation for
  scalar/element)
- CVE-2019-9499 (EAP-pwd peer missing commit validation for
  scalar/element)

Latest version available from: https://w1.fi/security/2019-4/

Vulnerability

EAP-pwd implementation in hostapd (EAP server) and wpa_supplicant (EAP
peer) was discovered not to validate the received scalar and element
values in EAP-pwd-Commit messages properly. This could result in attacks
that would be able to complete EAP-pwd authentication exchange without
the attacker having to know the used password.

A reflection attack is possible against the EAP-pwd server since the
hostapd EAP server did not verify that the EAP-pwd-Commit contains
scalar/element values that differ from the ones the server sent out
itself. This allows the attacker to complete EAP-pwd authentication
without knowing the password, but this does not result in the attacker
being able to derive the session key (MSK), i.e., the attacker would not
be able to complete the following key exchange (e.g., 4-way handshake in
RSN/WPA).

An attack using invalid scalar/element values is possible against both
the EAP-pwd server and peer since hostapd and wpa_supplicant did not
validate these values in the received EAP-pwd-Commit messages. If the
used crypto library does not implement additional checks for the element
(EC point), this could result in attacks where the attacker could use a
specially crafted commit message values to manipulate the exchange to
result in deriving a session key value from a very small set of possible
values. This could further be used to attack the EAP-pwd server in a
practical manner. An attack against the EAP-pwd peer is slightly more
complex, but still consider practical. These invalid scalar/element
attacks could result in the attacker being able to complete
authentication and learn the session key and MSK to allow the key
exchange to be completed as well, i.e., the attacker gaining access to
the network in case of the attack against the EAP server or the attacker
being able to operate a rogue AP in case of the attack against the EAP
peer.

While similar attacks might be applicable against SAE, it should be
noted that the SAE implementation in hostapd and wpa_supplicant does
have the validation steps that were missing from the EAP-pwd
implementation and as such, these attacks do not apply to the current
SAE implementation. Old versions of wpa_supplicant/hostapd did not
include the reflection attack check in the SAE implementation, though,
since that was added in June 2015 for v2.5 (commit 6a58444d27fd 'SAE:
Verify that own/peer commit-scalar and COMMIT-ELEMENT are different').

Vulnerable versions/configurations

All hostapd versions with EAP-pwd support (CONFIG_EAP_PWD=y in the build
configuration and EAP-pwd being enabled in the runtime configuration)
are vulnerable against the reflection attack.

All wpa_supplicant and hostapd versions with EAP-pwd support
(CONFIG_EAP_PWD=y in the build configuration and EAP-pwd being enabled
in the runtime configuration) are vulnerable against the invalid
scalar/element attack when built against a crypto library that does not
have an explicit validation step on imported EC points. The following
list indicates which cases are vulnerable/not vulnerable:
- OpenSSL v1.0.2 or older: vulnerable
- OpenSSL v1.1.0 or newer: not vulnerable
- BoringSSL with commit 38feb990a183 ('Require that EC points are on the
  curve.') from September 2015: not vulnerable
- BoringSSL without commit 38feb990a183: vulnerable
- LibreSSL: vulnerable
- wolfssl: vulnerable

Acknowledgments

Thanks to Mathy Vanhoef (New York University Abu Dhabi) for discovering
and reporting the issues and for proposing changes to address them in
the implementation.

Possible mitigation steps

- Merge the following commits to wpa_supplicant/hostapd and rebuild:

  CVE-2019-9497:
  EAP-pwd server: Detect reflection attacks

  CVE-2019-9498:
  EAP-pwd server: Verify received scalar and element
  EAP-pwd: Check element x,y coordinates explicitly

  CVE-2019-9499:
  EAP-pwd client: Verify received scalar and element
  EAP-pwd: Check element x,y coordinates explicitly

  These patches are available from https://w1.fi/security/2019-4/

- Update to wpa_supplicant/hostapd v2.8 or newer, once available

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
[bump PKG_RELEASE]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
..
001-mesh-factor-out-mesh-join-function.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
002-mesh-factor-out-rsn-initialization.patch hostapd: update packaging and patches 6 years ago
003-mesh-relocate-RSN-init-function.patch hostapd: update packaging and patches 6 years ago
004-mesh-use-setup-completion-callback-to-complete-mesh-.patch hostapd: update packaging and patches 6 years ago
005-mesh-reflect-country-setting-to-mesh-configuration.patch hostapd: update packaging and patches 6 years ago
006-mesh-inform-kernel-driver-DFS-handler-in-userspace.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
007-mesh-apply-channel-attributes-before-running-Mesh.patch hostapd: update packaging and patches 6 years ago
008-mesh-set-interface-type-to-mesh-before-setting-inter.patch hostapd: update packaging and patches 6 years ago
009-mesh-set-mesh-center-frequency.patch hostapd: update packaging and patches 6 years ago
010-mesh-consider-mesh-interface-on-dfs-event-handler.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
011-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
013-mesh-do-not-allow-pri-sec-channel-switch.patch hostapd: update packaging and patches 6 years ago
014-mesh-do-not-allow-scan-result-to-swap-pri-sec.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
016-mesh-fix-channel-switch-error-during-CAC.patch hostapd: update packaging and patches 6 years ago
017-mesh-use-right-interface-context-to-send-DFS-event-m.patch hostapd: update packaging and patches 6 years ago
018-mesh-make-forwarding-configurable.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
031-mesh-add-VHT_CHANWIDTH_USE_HT-to-max_oper_chwidth.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
032-mesh-implement-use-of-VHT20-config-in-mesh-mode.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
040-FT-Fix-CONFIG_IEEE80211X-y-build-without-CONFIG_FILS.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
051-wpa_supplicant-fix-race-condition-in-mesh-mpm-new-pe.patch hostapd: update the fix for a race condition in mesh new peer handling 5 years ago
061-0001-OpenSSL-Use-constant-time-operations-for-private-big.patch hostapd: fix CVE-2019-9494 5 years ago
061-0002-Add-helper-functions-for-constant-time-operations.patch hostapd: fix CVE-2019-9494 5 years ago
061-0003-OpenSSL-Use-constant-time-selection-for-crypto_bignu.patch hostapd: fix CVE-2019-9494 5 years ago
061-0005-SAE-Minimize-timing-differences-in-PWE-derivation.patch hostapd: fix CVE-2019-9494 5 years ago
061-0006-SAE-Avoid-branches-in-is_quadratic_residue_blind.patch hostapd: fix CVE-2019-9494 5 years ago
061-0007-SAE-Mask-timing-of-MODP-groups-22-23-24.patch hostapd: fix CVE-2019-9494 5 years ago
061-0008-SAE-Use-const_time-selection-for-PWE-in-FFC.patch hostapd: fix CVE-2019-9494 5 years ago
061-0009-SAE-Use-constant-time-operations-in-sae_test_pwd_see.patch hostapd: fix CVE-2019-9494 5 years ago
062-0004-EAP-pwd-Use-constant-time-and-memory-access-for-find.patch hostapd: fix CVE-2019-9495 5 years ago
063-0010-SAE-Fix-confirm-message-validation-in-error-cases.patch hostapd: fix CVE-2019-9496 5 years ago
064-0011-EAP-pwd-server-Verify-received-scalar-and-element.patch hostapd: fix CVE-2019-9497, CVE-2019-9498, CVE-2019-9499 5 years ago
064-0012-EAP-pwd-server-Detect-reflection-attacks.patch hostapd: fix CVE-2019-9497, CVE-2019-9498, CVE-2019-9499 5 years ago
064-0013-EAP-pwd-client-Verify-received-scalar-and-element.patch hostapd: fix CVE-2019-9497, CVE-2019-9498, CVE-2019-9499 5 years ago
064-0014-EAP-pwd-Check-element-x-y-coordinates-explicitly.patch hostapd: fix CVE-2019-9497, CVE-2019-9498, CVE-2019-9499 5 years ago
100-daemonize_fix.patch hostapd: update to version 2017-08-24 7 years ago
110-no_eapol_fix.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
120-disable_bridge_packet_workaround.patch hostapd: update to git snapshot of 2018-04-09 6 years ago
200-multicall.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
300-noscan.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
301-mesh-noscan.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
310-rescan_immediately.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
320-optional_rfkill.patch hostapd: update to version 2016-12-15 8 years ago
330-nl80211_fix_set_freq.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
340-reload_freq_change.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
341-mesh-ctrl-iface-channel-switch.patch wpa_supplicant: fix calling channel switch via wpa_cli on mesh interfaces 6 years ago
350-nl80211_del_beacon_bss.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
360-ctrl_iface_reload.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
370-ap_sta_support.patch hostapd: add support for passing CSA events from sta/mesh to AP interfaces 6 years ago
380-disable_ctrl_iface_mib.patch hostapd: add support for passing CSA events from sta/mesh to AP interfaces 6 years ago
381-hostapd_cli_UNKNOWN-COMMAND.patch hostapd: backport build fix when OWE is activated 6 years ago
390-wpa_ie_cap_workaround.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
400-wps_single_auth_enc_type.patch hostapd: update to git snapshot of 2018-03-26 6 years ago
410-limit_debug_messages.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
420-indicate-features.patch hostapd: update to git snapshot of 2018-03-26 6 years ago
430-hostapd_cli_ifdef.patch hostapd: add support for client taxonomy in the full config 6 years ago
431-wpa_cli_ifdef.patch hostapd: update to version 2016-09-05 8 years ago
432-missing-typedef.patch hostapd: fix compilation error in wext backend 8 years ago
450-scan_wait.patch hostapd: update to git snapshot of 2018-03-26 6 years ago
460-wpa_supplicant-add-new-config-params-to-be-used-with.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
461-driver_nl80211-use-new-parameters-during-ibss-join.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
463-add-mcast_rate-to-11s.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
464-fix-mesh-obss-check.patch hostapd: update to version 2018-12-02 (2.7) 6 years ago
470-survey_data_fallback.patch hostapd: update to version 2017-08-24 7 years ago
500-lto-jobserver-support.patch hostapd: build with LTO enabled (using jobserver for parallel build) 6 years ago
550-hostapd-Add-Multi-AP-protocol-support.patch hostapd: add Multi-AP patches and config options 5 years ago
551-wpa_supplicant-Add-Multi-AP-protocol-support-to-supp.patch hostapd: add Multi-AP patches and config options 5 years ago
552-tests-Multi-AP-association.patch hostapd: add Multi-AP patches and config options 5 years ago
553-tests-refactor-test_multi_ap.patch hostapd: add Multi-AP patches and config options 5 years ago
554-multi_ap-don-t-reject-backhaul-STA-on-fronhaul-BSS.patch hostapd: add Multi-AP patches and config options 5 years ago
555-WPS-wps_build_wfa_ext-add-multi_ap_subelem-parameter.patch hostapd: add Multi-AP patches and config options 5 years ago
556-wpa_supplicant-support-Multi-AP-backhaul-STA-onboard.patch hostapd: add Multi-AP patches and config options 5 years ago
557-hostapd-support-Multi-AP-backhaul-STA-onboarding.patch hostapd: add Multi-AP patches and config options 5 years ago
558-hostapd-add-README-MULTI-AP.patch hostapd: add Multi-AP patches and config options 5 years ago
559-tests-add-WPS-tests-to-multi_ap-hwsim-tests.patch hostapd: add Multi-AP patches and config options 5 years ago
600-ubus_support.patch hostapd: add Multi-AP patches and config options 5 years ago