wpa_supplicant is a client (supplicant) with support for WPA and WPA2
(IEEE 802.11i / RSN). It is suitable for both desktop/laptop computers and
embedded systems. Supplicant is the IEEE 802.1X/WPA component that is used
in the client stations. It implements key negotiation with a WPA
Authenticator and it controls the roaming and IEEE 802.11 authentication/
association of the wlan driver.
wpa_supplicant is designed to be a "daemon" program that runs in the
background and acts as the backend component controlling the wireless
connection. wpa_supplicant supports separate frontend programs and a
text-based frontend (wpa_cli) and a GUI (wpa_gui) are included with
wpa_supplicant.
===> The following configuration options are available for wpa_supplicant-2.12_1:
DBUS=on: D-Bus IPC system support
DEBUG_FILE=off: Support for writing debug log to a file
DEBUG_SYSLOG=on: Send debug messages to syslog instead of stdout
DELAYED_MIC=off: Mitigate TKIP attack, random delay on MIC errors
DOCS=on: Build and/or install documentation
EAPOL_TEST=off: Development testing
HS20=on: Hotspot 2.0
HT_OVERRIDES=off: Disable HT/HT40, mask MCS rates, etc
IEEE80211AC=off: Very High Throughput, AP mode (IEEE 802.11ac)
IEEE80211N=off: High Throughput, AP mode (IEEE 802.11n)
IEEE80211R=on: Fast BSS Transition (IEEE 802.11r-2008)
IEEE80211W=on: Management Frame Protection (IEEE 802.11w)
IEEE8021X_EAPOL=on: EAP over LAN support
INTERWORKING=on: Improve ext. network interworking (IEEE 802.11u)
IPV6=on: Development testing IPv6 support
LIBWPA=on: libwpa_client Shared Library
MATCH=on: Interface match mode
MBO=on: Multi Band Operation (Enables WNM)
NO_ROAMING=off: Disable roaming
P2P=off: Peer-to-Peer support
PASN=on: Pre-Association Security Negotiation
PKCS12=on: PKCS#12 (PFS) support
PRIVSEP=off: Privilege separation
RSN_PREAUTH=on
SIM_SIMULATOR=off: SIM simulator (Milenage) for EAP-SIM
SMARTCARD=on: Private key on smartcard support
TDLS=off: Tunneled Direct Link Setup
TLSV12=off: Build with TLS v1.2 instead of TLS v1.0
USIM_SIMULATOR=off: SIM simulator (Milenage) for EAP-AKA
VHT_OVERRIDES=off: Disable VHT, mask MCS rates, etc
WEP=on: WEP support
WNM=on: Wireless Network Monitoring
WPS=on: Wi-Fi Protected Setup
WPS_ER=on: Enable WPS External Registrar
WPS_NFC=on: Near Field Communication (NFC) configuration
WPS_NOREG=off: Disable open network credentials when registrar
WPS_UPNP=on: Universal Plug and Play support
====> Driver options: you have to choose at least one of them
BSD=on: BSD net80211 interface
WIRED=on: Wired ethernet interface
NDIS=off: Windows NDIS interface
TEST=off: Development testing interface
NONE=off: The 'no driver' interface, e.g. WPS ER only
====> Extensible Authentication Protocols: you have to choose at least one of them
TLS=on: Transport Layer Security
PEAP=on: Protected Extensible Authentication Protocol
TTLS=on: Tunneled Transport Layer Security
MD5=on: MD5 hash (deprecated, no key generation)
MSCHAPV2=on: Microsoft CHAP version 2 (RFC 2759)
GTC=on: Generic Token Card
LEAP=on: Lightweight Extensible Authentication Protocol
OTP=on: One-Time Password
PSK=on: Pre-Shared key
FAST=on: Flexible Authentication via Secure Tunneling
SIM=off: Subscriber Identity Module
PWD=on: Shared password (RFC 5931)
PAX=on: Password Authenticated Exchange
AKA=off: Autentication and Key Agreement (UMTS)
AKA_PRIME=off: AKA Prime variant (RFC 5448)
SAKE=on: Shared-Secret Authentication & Key Establishment
GPSK=on: Generalized Pre-Shared Key
TNC=on: Trusted Network Connect
IKEV2=on: Internet Key Exchange version 2
EKE=on: Encrypted Key Exchange
===> Use 'make config' to modify these settings
security/wpa_supplicant*: Fix EAPOL_TEST build for non-standard SSL_DEFAULT
The post-build target does not have the same environment variables setup
as the do-build target. This results in the eapol_test binary getting
compiled against the headers of the TLS library specified in
SSL_DEFAULT, but getting linked against the TLS library from the base
system regardless of SSL_DEFAULT, causing build failures when
SSL_DEFAULT is set to a different TLS library/version than the on from
the base system.
Fix this by not using the post-build target to build the eapol_test
binary, but instead conditionally add the eapol_test target to
TARGET_ALL if the EAPOL_TEST option is enabled for the port.
Signed-off-by: Pascal Ernster <git@hardfalcon.net>
security/wpa_supplicant: Update to 2.12
This includes the following changes:
* support RSN overriding (e.g., WPA3-Personal Compatibility Mode)
* improve BSS transition management support
* EHT/IEEE 802.11be/Wi-Fi 7
- more complete support
- fix message validation issues that could enable DoS attacks
* support Wi-Fi Direct R2
* support Wi-Fi Aware (add synchronized NAN; extend USD support)
* support Proximity Ranging
* support SPP A-MSDU negotiation
* support IEEE 802.11bi functionality
- changing SAE password identifiers
(Only the first 15 lines of the commit message are shown above )
security/wpa_supplicant: Add option to build libwpa_client
CONFIG_BUILD_WPA_CLIENT_SO allows building the libwpa_client shared
library and the wpa_ctrl.h header file. This library provides helpers
to interact with the wpa_supplicant control interface.
This is required for net/wutil.
Approved by: cy (maintainer timeout)
PR: 288933
Sponsored by: Google LLC (GSoC 2025)
net/hostapd* security/wpa-supplicant*: Fix 13 and 14 builds
The updates imported from 15-CURRENT included features not implemented
in FreeBSD 13 and 14. #ifdef them out.
Fixes: 995f5b9b0e4d
PR: 285371
net/nhostapd*, security/wpa_supplicant*: Sync drivers_bsd.c from src
src/ commits to drviers_bsd.c in src have fixed a number of problems
with wpa_supplicant/hostapd and FreeBSD. Bring those changes into the
ports.
PR: 285371
Tested by: Matthias Apitz <guru@unixarea.de>
MFH 2025Q1
security/wpa_supplicant: Sync driver_bsd.c with base system
Replace driver_bsd.c with the one from src. It utilizes facilities
and features already in FreeBSD.
security/wpa_supplicant: Fix 15-CURRENT 108de784513d build
On FreeBSD systems without 108de784513d the old definition will be used
while on 108de784513d and newer the duplicate case will be removed.
Obtained from: src 676041c41ba5
Discussed with: imp
security/wpa_supplicant*: ctrl_iface set sendbuf size
In order to avoid running into the default net.local.dgram.maxdgram
of 2K currently when calling sendto(2) try to set the sndbuf size to
the maximum ctrl message size.
The problem occured, e.g., when the scan_list result had enough BSSIDs
so the text output would exceed 2048 bytes.
Written by: bz
PR: 274990
Obtained from: https://reviews.freebsd.org/D42558
security/wpa_supplicant: wpa: Enable receiving priority tagged (VID 0) frames
Certain internet service providers transmit vlan 0 priority tagged
EAPOL frames from the ONT towards the residential gateway. VID 0
should be ignored, and the frame processed according to the priority
set in the 802.1P bits and the encapsulated EtherType (i.e. EAPOL).
The pcap filter utilized by l2_packet is inadquate for this use case.
Here we modify the pcap filter to accept both unencapsulated and
encapsulated (with VLAN 0) EAPOL EtherTypes. This preserves the
original filter behavior while also matching on encapsulated EAPOL.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Reviewed by: cy
Obtained from: src bb5d6d14d81b
PR: 273696
MFH: 2023Q3
security/wpa_supplicant: Fix uninitialized packet pointer on error
The packet pointer (called packet) will remain uninitialized when
pcap_next_ex() returns an error. This occurs when the wlan
interface is shut down using ifconfig destroy. Adding a NULL
assignment to packet duplicates what pcap_next() does.
The reason we use pcap_next_ex() in this instance is because with
pacp_next() when we receive a null pointer if there was an error
or if no packets were read. With pcap_next_ex() we can differentiate
between an error and legitimately no packets were received.
PR: 270649, 273696
Obtained from: src 953efa5b200f
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFH: 2023Q3
security/wpa_supplicant: driver_bsd.c: backout upstream IFF_ change and add
logging
This reverts the state to our old supplicant logic setting or clearing
IFF_UP if needed. In addition this adds logging for the cases in which
we do (not) change the interface state.
Depending on testing this seems to help bringing WiFi up or not log
any needed changes (which would be the expected wpa_supplicant logic
now). People should look out for ``(changed)`` log entries (at least
if debugging the issue; this way we will at least have data points).
There is a hypothesis still pondered that the entire IFF_UP toggling
only exploits a race in net80211 (see further discssussions for more
debugging and alternative solutions see D38508 and D38753).
That may also explain why the changes to the rc startup script [1]
(Only the first 15 lines of the commit message are shown above )
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
security/wpa_supplicant-devel: Enable WEP by default
As of hostap 2.10, WEP is disabled by default. This of course is not a
bad thing but requires some planning and an announcment to remove WEP
support by default. At some point this option will default to off, to
coincide with the removal of WEP support from FreeBSD base.
MFH: 2022Q3
wpa_supplicant* hostapd*: Resolve secondary VAP association issue
Association will fail on a secondary open unprotected VAP when the
primary VAP is configured for WPA. Examples of secondary VAPs are,
hotels, universities, and commodity routers' guest networks.
A broadly similar bug was discussed on Red Hat's bugzilla affecting
association to a D-Link DIR-842.
This suggests that as IEs were added to the 802.11 protocol the old code
was increasingly inadaquate to handle the additional IEs, not only a
secondary VAP.
This duplcates src commit 775611ea11db here in ports.
PR: 264238
Reported by: Jaskie <jiangjun12321@gmail.com>
"J.R. Oldroyd" <fbsd@opal.com>
Submitted by: "J.R. Oldroyd" <fbsd@opal.com>
MFH: 2022Q3
*/*: Restore a missing wpa BSD driver patch
These patches were removed to sync with base where in fact base was
missing these patches and base should have been synced with the ports.
PR: 264238
Fixes: b8477825c2dc42f6c595697a36f593c71f39fbad
c86f32d652eb9dd023049122d8ca37cb13ed07b6
MFH: 2022Q2
*/*: Restore non-IBSS part of wpa patches
b8477825c2dc42f6c595697a36f593c71f39fbad removed some non-IBSS patches.
Restore them. We only want to remove the patches that make IBSS use
ADHOC mode.
Fixes: b8477825c2dc42f6c595697a36f593c71f39fbad
*/{wpa_supplicant*,hostapd*}: Fix wpa 100% CPU when USB wlan NIC removed
hostapd calls pcap_next(3) to read the next packet off the wlan interface.
pcap_next() returns a pointer to the packet header but does not indicate
success or failure. Unfortunately this results in an infinite loop (100%
CPU) when the wlan device disappears, i.e. when a USB wlan device is
manually removed or a USB error results in the device removal. However
pcap_next_ex(3) does return success or failure. To resolve this we use
pcap_next_ex(), forcing hostapd to exit when the error is encountered.
An error message is printed to syslog or stderr when debugging (-d flag)
is enabled. Unfortunately wpa_printf() only works when debugging is enabled.
PR: 253608
Reported by: Damjan Jovanovic <damjan.jov@gmail.com>,
bz (privately)
MFH: 2022Q2
*/*: Fix wpa_supplicant* and hostapd* EAPOL_TEST build
Fix EAPOL_TEST build. Local funcion os_fdatasync() is valid under
FreeBSD as fdatasync(2) is supported.
PR: 261636
Reported by: David Siebörger <drs-freebsd@sieborger.nom.za>
MFH: 2022Q1
*/*: Sync hostapd* and wpa_supplicant* with base ce276fe26d92010776
Use IFM_IEEE80211_ADHOC for now on FreeBSD for IBSS operation.
Base commit by adrian@ on Nov 26, 2015.
This commit syncs ports with base.
PR: 203086
Submitted by: avos
MFH: 2020Q2
security/wpa_supplicant: fix for P2P provision vulnerability
Latest version available from: https://w1.fi/security/2021-1/
Vulnerability
A vulnerability was discovered in how wpa_supplicant processes P2P
(Wi-Fi Direct) provision discovery requests. Under a corner case
condition, an invalid Provision Discovery Request frame could end up
reaching a state where the oldest peer entry needs to be removed. With
a suitably constructed invalid frame, this could result in use
(read+write) of freed memory. This can result in an attacker within
radio range of the device running P2P discovery being able to cause
unexpected behavior, including termination of the wpa_supplicant process
and potentially code execution.
(Only the first 15 lines of the commit message are shown above )
Disable NDIS by default.
From src/bfc99943b04b46a6c1c885ce7bcc6f235b7422aa (brooks):
nids(4) was a clever idea in the early 2000's when the market was
flooded with 10/100 NICs with Windows-only drivers, but that hasn't
been the case for ages and the driver has had no meaningful maintenance
in ages. It only supports Windows-XP era drivers.
Therefore NDIS has been removed from 14-CURRENT. Those who still want or
need NDIS on older supported versions of FreeBSD can still enable the
options and rebuild the port.
This is the ports version of src commit
d70886d063166786ded0007af8cdcbf57b7b4827.
wpa_supplicant uses PF_ROUTE to return the routing table in order to
determine the length of the routing table buffer. As of 81728a538d24
wpa_supplicant is started before the routing table has been populated
resulting in the length of zero to be returned. This causes
wpa_supplicant to loop endlessly. (The workaround is to kill and restart
wpa_supplicant as by the time it is restarted the routing table is
populated.)
(Personally, I was not able to reproduce this unless wlan0 was a member of
lagg0. However, others experienced this problem on standalone wlan0.)
PR: 252844
Submitted by: shu <ankohuu _ outlook.com>
Reported by: shu <ankohuu _ outlook.com>
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D28249
Add SIM_SIMULATOR and USIM_SIMULATOR options.
SIM_SIMULATOR and USIM_SIMULATOR options enable features that are used for
testing EAP-AKA and EAP-SIM authentication.
PR: 252276
Submitted by: Terry Burton <tez _ terryburton.co.uk>
UPnP SUBSCRIBE misbehavior in hostapd WPS AP
As published by our hostapd upstream
Vulnerability
General security vulnerability in the way the callback URLs in the UPnP
SUBSCRIBE command are used were reported (VU#339275, CVE-2020-12695).
Some of the described issues may be applicable to the use of UPnP in WPS
AP mode functionality for supporting external registrars.
Such issues could allow a device connected to the local network (i.e., a
device that has been authorized to transmit packets in the network in
which the AP is located) could trigger the AP to initiate a HTTP
(TCP/IP) connection to an arbitrary URL, including connections to
(Only the first 15 lines of the commit message are shown above )
Chase src r361272:
Silence the once per second CTRL-EVENT-SCAN-FAILED errors when the WiFi
radio is disabled through the communication device toggle key (also known
as the RF raidio kill button). Only the CTRL-EVENT-DISCONNECTED will be
issued.
Submitted by: avg
Reported by: avg
MFH: 2020Q2
security/wpa_supplicant: Add EAPOL_TEST option
Add an option option to builds and installs the eapol_test program.
Update/patch to solve new compilation errors that result with the
option enabled.
Note: Leaving the changes to Packet32.c out of the PR patch set as
it is not needed.
PR: 245809
Approved by: cy (maintainer)
Add two new selectable options which allow the user to build
wpa_supplicant to parity with the same in base. The new options,
which are enabled in base are:
WPS_UPNP_DESC: Universal Plug and Play
IEEE8021X_EAPOL_DESC: EAP over LAN support
For users who build and install FreeBSD using WITHOUT_WIRELESS
simply altering /etc/rc.conf isn't enough to make use of the ports
versions of hostapd and wpa_supplicant. This is because the rc.d
scripts are not installed when WITHOUT_WIRELESS is specified as a
build option. This patch checks for the rc scripts existence and
if they do not exist, installs the ports versions of the same
scripts, which are added by this revision.
This patch does not change the package in any way and there is no way
to enable this outside of removal of hostapd or wpa_supplicant
(depending on the port). Users who build their own world using the
WITHOUT_WIRELESS flag will almost always not use binary packages. Hence
the automatic detection and install of the rc scripts. Making this an
option would IMO increase the number of bug reports due to people
inadvertently setting or not setting an option.
To enable this a person must:
1. buildworld and installworld -DWITHOUT_WIRELESS
2. Build and install the desired wpa_supplicant and/or hostapd port
on servers one wishes to install them on.
PR: 238571
Completely remove a "nullfied" ifdef rather than making the code
unreachable. Though this is only a cosmetic change it syncs the port
with base commit r347642, making it easier to compare the two when
diagnosing problems in one or the other.
This was discovered tonight while reviewing some code following my
discussion regarding an issue lwhsu@ was having earlier today.
Remove the pleonastic initialization and test for eloop_initialized.
This change has no functional effect on the resulting package therefore
a PORTREVISION bump is not necessary.
Discovered while discussing wpa_supplicant with lwhsu@ today.
WPA: Ignore unauthenticated encrypted EAPOL-Key data
Ignore unauthenticated encrypted EAPOL-Key data in supplicant
processing. When using WPA2, these are frames that have the Encrypted
flag set, but not the MIC flag.
When using WPA2, EAPOL-Key frames that had the Encrypted flag set but
not the MIC flag, had their data field decrypted without first verifying
the MIC. In case the data field was encrypted using RC4 (i.e., when
negotiating TKIP as the pairwise cipher), this meant that
unauthenticated but decrypted data would then be processed. An adversary
could abuse this as a decryption oracle to recover sensitive information
in the data field of EAPOL-Key messages (e.g., the group key).
(CVE-2018-14526)
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
Security: CVE-2018-14526
Security: VuXML: 6bedc863-9fbe-11e8-945f-206a8a720317
Add patch set 2017-1
A vulnerability was found in how a number of implementations can be
triggered to reconfigure WPA/WPA2/RSN keys (TK, GTK, or IGTK) by
replaying a specific frame that is used to manage the keys. Such
reinstallation of the encryption key can result in two different types
of vulnerabilities: disabling replay protection and significantly
reducing the security of encryption to the point of allowing frames to
be decrypted or some parts of the keys to be determined by an attacker
depending on which cipher is used.
Security: https://w1.fi/security/2017-1/ \
wpa-packet-number-reuse-with-replayed-messages.txt
Security: https://www.krackattacks.com/
MFH: 2017Q4
security/wpa_supplicant: Allow users of FreeBSD 9 with libre- or openssl
from ports to build the port.
FreeBSD 9 is EOL in less than a week. Now those stragglers still running
9.3 can get online to update in the next few days.
Approved by: AMDmi3 (mentor) swills (mentor)
Differential Revision: https://reviews.freebsd.org/D8875
security/wpa_supplicant: Update to version 2.6 and patch for LibreSSL support
Port changes:
- Remove patches that have been incorporated upstream
- Add patches for LibreSSL support
Approved by: AMDmi3 (mentor)
Differential Revision: https://reviews.freebsd.org/D8451
security/wpa_supplicant: Add security patch set 2016-1
A vulnerability was found in how hostapd and wpa_supplicant writes the
configuration file update for the WPA/WPA2 passphrase parameter. If this
parameter has been updated to include control characters either through
a WPS operation (CVE-2016-4476) or through local configuration change
over the wpa_supplicant control interface (CVE-2016-4477), the resulting
configuration file may prevent the hostapd and wpa_supplicant from
starting when the updated file is used. In addition for wpa_supplicant,
it may be possible to load a local library file and execute code from
there with the same privileges under which the wpa_supplicant process
runs.
These patches were developed upstream and published as a response
to the security advisories CVE-2016-4476 and CVE-2016-4477.
PR: 209564
Requested by: Sevan Janiyan
security/wpa_supplicant: patch 4 CVE security advisories
These patches address the following:
CVE-2015-5310
CVE-2015-5314
CVE-2015-5315
CVE-2015-5316
These patches were developed upstream and published as a response
to the security advisories.
PR: 208482
Requested by: Jason Unovitch
security/wpa_supplicant: Address security issue (2015-5)
There was a vulnerability to the WPS_NFC option which is off by default.
The port is being bumped anyway since people using that option will want
the latest version.
PR: 201432
Submitted by: Jason Unovitch
security/wpa_supplicant: Address 3 latest security advisories
These are combined upstream patches 2015-2, 2015-3, 2015-4
They address the following security advisories:
* CVE-2015-4141
* CVE-2015-4142
* CVE-2015-4143
* CVE-2015-4144
* CVE-2015-4145
* CVE-2015-4146
These advisories also apply to net/hostapd
PR: 200568
Submitted by: Jason Unovitch
security/wpa_supplicant: Add USES=CPE
I just released that I fixed a CVE bug but WPA Supllicant was never
provided any CPE information. Fix, bump, and reference previous PR.
PR: 199678
security/wpa_supplicant: Fix build on FreeBSD 11
On FreeBSD 11, the wpa_supplicant couldn't find the readline headers.
It turns out that Mk/Uses/readline.mk only augments LDFLAGS and CPPFLAGS,
but wpa_supplicant needs -I${LOCALBASE}/include add to CFLAGS. To fix
FreeBSD build, augment CFLAGS with value of CPPFLAGS in the makefile.
This wasn't an issue on DragonFly. Apparently wpa_supplicant found the
readline compatibility headers of libedit and used those instead.
reported by: pkg-fallout
security/wpa_supplicant: Bring in BSD driver fix from DragonFly BSD
DragonFly adopted it's "new" IEEE 802.11 infrastructure from FreeBSD.
This introduced an additional isr_meshid_len field in the
ieee80211req_scan_result structure. It is necessary to include this
additional offset when calculating the address of the IE data buffer.
Imre Vadasz introduced this fix to DragonFly on 01 Sept 2014, but a
similar fix doesn't appear to be present in FreeBSD's base wpa_supplicant.
wpa/supplicant: Fix driver list with NDIS, take 2
It turns out the driver list was only showing "null" for NDIS when -h
(help) or an unknown switch was passed to wpa_supplicant. The cause is
that the NDIS driver is the only that that has to be initialized, and
the initialization wasn't occurring in the above case.
The fix is the move the NDIS driver initialization before the command
switches are examined in case wpa_supplicant aborts to usage early.
security/wpa_supplicant: Fix NDIS driver, privsep no longer default
The NDIS driver didn't build when privsep option was turned off. Moveover,
it didn't display the driver name correctly, so I figured out a patch
based on base's ndis driver code. Thirdly, when privsep option is turned
off, wpa_priv is not built, so let's handle that condition.
Finally, remove privsep from default options because it removes the
standard list of drivers and replaces it with privsep driver.
Revive security/wpa_supplicant after 6.5 years => version 2.3
This port was retired at version 0.3.8 because wpa_supplicant is
part of FreeBSD base. However, the last few releases have had a period
of only a few months, so the base is always going to be behind. DragonFly
is also affected, so I'm bringing the port back at the latest version.
It features the same patches as FreeBSD including the conversion to use
libutil's pidfile routines. There are some additional patches for
DragonFly support and to fix some bugs from the 9 Oct 2014 release.
The WPA Supplicant build system has been converted to ports options, and
there are dozens of them. I've set the defaults to match the
configuration in base and verified that it builds with all options
selected at once.