History

wifi: cfg80211: add LTF keyseed support for secure ranging

Currently there is no way to install an LTF key seed that can be used in non-trigger-based (NTB) and trigger-based (TB) FTM ranging to protect NDP frames. Without this, drivers cannot enable PHY-layer security for peer measurement sessions, leaving ranging measurements vulnerable to eavesdropping and manipulation. Introduce NL80211_KEY_LTF_SEED attribute and the dedicated extended feature flag NL80211_EXT_FEATURE_SET_KEY_LTF_SEED to allow drivers to advertise and install LTF key seeds via nl80211. The key seed must be configured beforehand to ensure the peer measurement session is secure. The driver must advertise both NL80211_EXT_FEATURE_SECURE_LTF and NL80211_EXT_FEATURE_SET_KEY_LTF_SEED for the key seed installation to be permitted. The LTF key seed is pairwise key material and must only be used with pairwise key type. Reject attempts to use it with other key types.

Peddolla Harshavardhan Reddy committed 6 months ago

Commit 4bb6e581 parent 410aa475 files · +47 −0Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+18−0
@@ -5814,6 +5814,18 @@ enum nl80211_key_default_types { · 5813 unmodified lines
58145814 * @NL80211_KEY_MODE: the mode from enum nl80211_key_mode.
58155815 * Defaults to @NL80211_KEY_RX_TX.
58165816 * @NL80211_KEY_DEFAULT_BEACON: flag indicating default Beacon frame key
5817+ * @NL80211_KEY_LTF_SEED: LTF key seed is used by the driver to generate
5818+ * secure LTF keys used in case of peer measurement request with FTM
5819+ * request type as either %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED
5820+ * or %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED. Secure LTF key seeds
5821+ * will help enable PHY security in peer measurement session.
5822+ * The LTF key seed is installed along with the TK (Temporal Key) using
5823+ * %NL80211_CMD_NEW_KEY. The TK is configured using the
5824+ * %NL80211_ATTR_KEY_DATA attribute, while the LTF key seed is configured
5825+ * using this attribute. Both keys must be configured before initiation
5826+ * of peer measurement to ensure peer measurement session is secure.
5827+ * Only valid if %NL80211_EXT_FEATURE_SET_KEY_LTF_SEED is set. This
5828+ * attribute is restricted to pairwise keys (%NL80211_KEYTYPE_PAIRWISE).
58175829 *
58185830 * @__NL80211_KEY_AFTER_LAST: internal
58195831 * @NL80211_KEY_MAX: highest key attribute
@@ -5830,6 +5842,7 @@ enum nl80211_key_attributes { · 10 unmodified lines
58305842 NL80211_KEY_DEFAULT_TYPES,
58315843 NL80211_KEY_MODE,
58325844 NL80211_KEY_DEFAULT_BEACON,
5845+ NL80211_KEY_LTF_SEED,
58335846
58345847 /* keep last */
58355848 __NL80211_KEY_AFTER_LAST,
@@ -7059,6 +7072,10 @@ enum nl80211_feature_flags { · 1223 unmodified lines
70597072 * forward frames with a matching MAC address to userspace during
70607073 * the off-channel period.
70617074 *
7075+ * @NL80211_EXT_FEATURE_SET_KEY_LTF_SEED: Driver supports installing the
7076+ * LTF key seed via %NL80211_KEY_LTF_SEED. The seed is used to generate
7077+ * secure LTF keys for secure LTF measurement sessions.
7078+ *
70627079 * @NUM_NL80211_EXT_FEATURES: number of extended features.
70637080 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
70647081 */
@@ -7139,6 +7156,7 @@ enum nl80211_ext_feature_index { · 74 unmodified lines
71397156 NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION,
71407157 NL80211_EXT_FEATURE_IEEE8021X_AUTH,
71417158 NL80211_EXT_FEATURE_ROC_ADDR_FILTER,
7159+ NL80211_EXT_FEATURE_SET_KEY_LTF_SEED,
71427160
71437161 /* add new features before the definition below */
71447162 NUM_NL80211_EXT_FEATURES,