skip to content

A WPA2-Personal audit flags the PMKID in the RSN element: why is that exposure a property of the design, not a patchable bug, and what narrows it?

level: seniorimportance: should knowfreq 16%

answer

  1. an identifier, not a key
  2. derived from the PMK
  3. no client needed to test a guess
  4. passphrase quality is the barrier

basics

~20 s

The PMKID is an identifier derived from the PMK and both addresses, and it is visible by design. It lets a passphrase guess be tested offline without a connected client, so only a stronger passphrase, Enterprise or SAE narrows it.

solid answer

~30 s

The PMKID is the truncated 128-bit HMAC of the PMK over the string `PMK Name` and the two addresses; it names a cached PMK and is carried in the RSN element. Everything except the PMK is public, and a PSK network derives its PMK from the passphrase and SSID, so exposing the PMKID lets a guess at the passphrase be tested offline with no client present. It is the design working as specified, so there is nothing to patch. Narrow it with a long random passphrase, rotation, 802.1X Enterprise or SAE.

code

pseudocode · 6 lines
pseudocode
# PMKID derivation as documented in hostapd (src/common/wpa_common.c, rsn_pmkid)
PMKID = Truncate-128( HMAC( key = PMK, data = "PMK Name" || AA || SPA ) )
# AA  = authenticator (access point) address
# SPA = supplicant (client) address
# HMAC-SHA-1 for the original suites, HMAC-SHA-256 or HMAC-SHA-384 for the suites that use them
# PSK network: PMK = PBKDF2(passphrase, SSID, 4096 iterations, 256 bits)

go deeper

for a junior

Recall that the PMKID is an identifier derived from the PMK and the two addresses, not the key itself.

for a middle

Explain that a PSK-derived PMK makes the PMKID a test for passphrase guesses, with no connected client needed.

for a senior

Close the audit finding correctly: it is a design property, so choose passphrase length and randomness, rotation, Enterprise or SAE, and not a patch.

for a principal

Decide per site when a shared passphrase stays acceptable, given who knows it and how long it has been unchanged.

## What the PMKID is The **PMKID** is a 128-bit (16-octet) identifier of a **PMKSA**, a cached pairwise master key security association. hostapd's source documents the derivation: the PMKID is the 128-bit truncation of an HMAC keyed with the **PMK** over the string `PMK Name`, the authenticator address and the supplicant address. The HMAC is HMAC-SHA-1 for the original key management suites, HMAC-SHA-256 for the SHA-256 suites and HMAC-SHA-384 for the 384-bit suites. Its purpose is legitimate: a client and an access point that both hold a cached PMK can name it and skip a full authentication. It is carried in the PMKID list of the RSN element and in the key data of EAPOL-Key frames. ## Why it is a property, not a bug Every input except the PMK is visible on the air. On a Personal (PSK) network the PMK is derived from the passphrase and the SSID with PBKDF2 using 4096 iterations (PBKDF2 is specified in RFC 8018), so the PMK is a function of the passphrase. A value that depends on the PMK in a way a third party can recompute for a guessed passphrase is a **test for that guess**, and the test needs no associated client. This is the same kind of exposure that a captured four-way handshake gives through its MIC; the PMKID simply removes the need for one to be in progress. Nothing in the derivation is wrong: the identifier has to depend on the PMK to name it. That is why no firmware update removes it, and why a finding reading "PMKID exposed" on a PSK SSID is a statement about passphrase strength. Do not confuse it with key reinstallation, which is a flaw in the handshake that vendors patched. ## What puts the passphrase at risk - A short or human-chosen passphrase: hostapd accepts 8 to 63 ASCII characters, so the shortest accepted passphrase is far weaker than a random one. - A passphrase shared among many people and devices: NIST SP 800-97 states that if any PSKs are compromised they must be re-distributed in the same way, and that the passphrase must be long and complex, possibly randomly generated. - A passphrase unchanged for years, so an old exposure remains useful. ## What narrows it | Control | Effect on the exposure | Cost | |---|---|---| | Long random passphrase | Makes a guess test fruitless in practice; the main control on PSK | Distribution of a hard-to-type secret | | Rotation | Limits how long an earlier exposure stays useful | Every client must be reconfigured | | 802.1X Enterprise | The PMK is a per-session value from the EAP exchange, not derived from a shared passphrase | RADIUS, certificates, client profiles | | SAE (WPA3-Personal) | Designed so that a recorded exchange gives no value to test guesses against; its design is covered with SAE | Client support, transition planning | Be careful with `disable_pmksa_caching=1`. hostapd.conf documents it as disabling the caching of PMKSAs **created through EAP authentication**, default 0. It is not a remedy for a PSK passphrase network. ## Where the PMKID is used legitimately PMKSA caching exists to make reconnection cheap: a client that has authenticated before names its cached PMK with the PMKID, and the access point that holds the same PMKSA can proceed without a full authentication. NIST SP 800-97 describes PMKSA caching as a performance mechanism: the client supplies a list of PMKSAs in the association or reassociation exchange, and if the access point finds a match, full authentication is skipped. hostapd.conf also lists a pmksa_caching_privacy setting (default 0) among its IEEE 802.11bi features, concerning recomputation of the PMKID after a cached PMKSA is used. The reference material does not describe its effect on existing PSK networks, so do not cite it as a control. ## Common wrong conclusions - "We patched everything, so the PMKID finding is closed." There is no patch for it. - "The SSID is hidden, so the guessing material is not there." The SSID is not a secret. - "Enterprise is exposed in the same way." The PMK on an Enterprise network is a per-session value, not a function of a shared passphrase. ## How it is noticed The PMKID is not logged as an event. It shows as an audit finding: an SSID whose RSN element advertises the PSK key management suite (00-0F-AC:2 in Linux's ieee80211.h) is a passphrase network, and the strength of its passphrase is the control to inspect. Monitoring cannot conclude anything about offline guessing, since no packet reveals it.

  • How is a PMKID different from a captured four-way handshake as a source of guess-testing material?
    Both carry a value that depends on the PMK, so both let a passphrase guess be tested offline. The handshake does so through its MIC and needs a client joining; the PMKID needs no client, which is the point of the audit finding. In both cases passphrase strength is the control.
  • Why does an Enterprise SSID not have the same exposure?
    Its PMK comes from the 802.1X exchange as a per-session value and not from a shared passphrase, so there is no low-entropy secret behind the PMKID to test guesses against. Weak EAP passwords are a separate matter owned by the EAP method.

  • Says a firmware patch removes the PMKID exposure.
  • Calls the PMKID a CVE with a fix date.
  • Says hiding the SSID protects the passphrase.
  • Says turning off PMKSA caching fixes PSK networks.
  • Says a stronger cipher suite narrows the exposure.