aboutsummaryrefslogtreecommitdiff
path: root/hs20
diff options
context:
space:
mode:
authorSunil <sunilravi@google.com>2022-06-28 18:40:46 +0000
committerSunil Ravi <sunilravi@google.com>2022-07-11 18:13:37 +0000
commit8cd6f4d587c0eb6b190011dabd42d797b4382262 (patch)
tree7a9e66fa9b9c90aaa2b2eac220de3163b9633f65 /hs20
parentedccdd22e7db9bb1d32bfef833d6f7c882aa485f (diff)
downloadwpa_supplicant_8-8cd6f4d587c0eb6b190011dabd42d797b4382262.tar.gz
[wpa_supplicant] Cumulative patch from commit 09a281e52
Bug: 237446599 Test: connect/disconnect to WPA2, WPA3 networks Test: SoftAp & p2p connection Test: Regression test(b/237480760) BYPASS_INCLUSIVE_LANGUAGE_REASON=Merged from Open source 09a281e52 Add QCA vendor interface for PASN offload to userspace 809fb96fa Add a vendor attribute to configure concurrency policy for AP interface a5754f531 Rename QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_MULTI_STA_POLICY 085a3fc76 EHT: Add 320 channel width support bafe35df0 Move CHANWIDTH_* definitions from ieee80211_defs.h to defs.h 3c2ba98ad Add QCA vendor event to indicate driver recovery after internal failures 6b461f68c Set current_ssid before changing state to ASSOCIATING 8dd826741 QCA vendor attribute to configure direct data path for audio traffic 504be2f9d QCA vendor command support to get WLAN radio combinations d5905dbc8 OCV: Check the Frequency Segment 1 Channel Number only on 80+80 MHz 4383528e0 P2P: Use weighted preferred channel list for channel selection f2c5c8d38 QCA vendor attribute to configure RX link speed threshold for roaming 94bc94b20 Add QCA vendor attribute for DO_ACS to allow using existing scan entries b9e2826b9 P2P: Filter 6 GHz channels if peer doesn't support them d5a9944b8 Reserve QCA vendor sub command id 206..212 ed63c286f Remove space before tab in QCA vendor commands e4015440a ProxyARP: Clear bridge parameters on deinit only if hostapd set them 02047e9c8 hs20-osu-client: Explicit checks for snprintf() result cd92f7f98 FIPS PRF: Avoid duplicate SHA1Init() functionality 5c87fcc15 OpenSSL: Use internal FIPS 186-2 PRF with OpenSSL 3.0 9e305878c SAE-PK: Fix build without AES-SIV c41004d86 OpenSSL: Convert more crypto_ec_key routines to new EVP API 667a2959c OpenSSL: crypto_ec_key_get_public_key() using new EVP_PKEY API 5b97395b3 OpenSSL: crypto_ec_key_get_private_key() using new EVP_PKEY API 177ebfe10 crypto: Convert crypto_ec_key_get_public_key() to return new ec_point 26780d92f crypto: Convert crypto_ec_key_get_private_key() to return new bignum c9c2c2d9c OpenSSL: Fix a memory leak on crypto_hash_init() error path 6d19dccf9 OpenSSL: Free OSSL_DECODER_CTX in tls_global_dh() 4f4479ef9 OpenSSL: crypto_ec_key_parse_{priv,pub}() without EC_KEY API 563699174 EAP-SIM/AKA peer: IMSI privacy attribute 1004fb7ee tests: Testing functionality to discard DPP Public Action frames 99165cc4b Rename wpa_supplicant imsi_privacy_key configuration parameter 35eda6e70 EAP-SIM peer: Free imsi_privacy_key on an error path 1328cdeb1 Do not try to use network profile with invalid imsi_privacy_key d1652dc7c OpenSSL: Refuse to accept expired RSA certificate 866e7b745 OpenSSL: Include rsa.h for OpenSSL 3.0 bc99366f9 OpenSSL: Drop security level to 0 with OpenSSL 3.0 when using TLS 1.0/1.1 ed325ff0f DPP: Allow TCP destination (address/port) to be used from peer URI 37bb4178b DPP: Host information in bootstrapping URI 1142b6e41 EHT: Do not check HE PHY capability info reserved fields bc3699179 Use Secure=1 in PTK rekeying EAPOL-Key msg 1/4 and 2/4 b859b9bce Simplify wpa_bss_get_vendor_ie_multi_beacon() bounds checking fc9648a6a DPP: Debug print if not relay is available for PKEX exchange 1739d50c2 FST: More robust bounds checking of local data in fst_dump_mb_ies() 63eb98a8e SAE: Make Anti-Clogging token element parsing simpler a6e04a067 Simplify DSCP policy parsing 77bb12a60 P2P: Maintain ip_pool bitfield index separately 3f3ce0571 Check sscanf() return value in TWT_SETUP parsing 2982e50c1 EAP-SAKA: Simplify attribute parser for static analyzers 6e8518749 GAS: Limit maximum comeback delay value fe1dc9ba7 WNM: Try to make bounds checking easier for static analyzers f8615990e Simplify wpa_parse_kde_ies() 61d37f44b Simplify wpa_parse_generic() 469528a6e BSS coloring: Fix bitmap check 8392c86df Check he_cap pointer in hostapd_set_freq_params() consistently 2227c85a9 DPP: Verify that crypto_ec_point_to_bin() succeeds a8c319952 nl80211: Verify that nla_put_flag() succeeds for background radar 993eb1240 FST: Make sure get_hw_modes() callback is set for hostapd 4537fe124 P2P: Explicit nul termination of the generated passphrase 79dc7f619 scan: Add option to disable 6 GHz collocated scanning 3b8d9da9b nl80211: Set NL80211_SCAN_FLAG_COLOCATED_6GHZ in scan 96a7f3832 hostapd: Add the destination address of unsolicited Probe Response frame 16e755754 Add -q flag to hostapd in order to control log level 869037443 Discard unencrypted EAPOL/EAP when TK is set and PMF is enabled (AP) 3c2fbe9f5 Discard unencrypted EAPOL-EAP when TK is set and PMF is enabled 872a57500 Discard unencrypted EAPOL-Key msg 1/4 when TK is set and PMF is enabled e6c0e1215 Do not prevent Michael MIC error report based on disallowed PTK0 rekey 18c0ac890 Provide information about the encryption status of received EAPOL frames 7ee814201 FILS: Set pairwise_set when configuring TK after association 98278c0de Fix no_encrypt flag in control port TX for rekeying b1172c19e WPA: Discard EAPOL-Key msg 1/4 with corrupted information elements 7a7a4ea57 Check need for SA Query/assoc comeback before updating RSNE parameters Change-Id: Ifbfe69676b38499a221aeb242cdb3eac3deee375
Diffstat (limited to 'hs20')
-rw-r--r--hs20/client/osu_client.c78
1 files changed, 57 insertions, 21 deletions
diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c
index 7b274dac..01e7b755 100644
--- a/hs20/client/osu_client.c
+++ b/hs20/client/osu_client.c
@@ -2018,6 +2018,7 @@ static struct osu_data * parse_osu_providers(const char *fname, size_t *count)
struct osu_data *osu = NULL, *last = NULL;
size_t osu_count = 0;
char *pos, *end;
+ int res;
f = fopen(fname, "r");
if (f == NULL) {
@@ -2037,15 +2038,20 @@ static struct osu_data * parse_osu_providers(const char *fname, size_t *count)
osu = last;
last = &osu[osu_count++];
memset(last, 0, sizeof(*last));
- snprintf(last->bssid, sizeof(last->bssid), "%s",
- buf + 13);
+ res = os_snprintf(last->bssid, sizeof(last->bssid),
+ "%s", buf + 13);
+ if (os_snprintf_error(sizeof(last->bssid), res))
+ break;
continue;
}
if (!last)
continue;
if (strncmp(buf, "uri=", 4) == 0) {
- snprintf(last->url, sizeof(last->url), "%s", buf + 4);
+ res = os_snprintf(last->url, sizeof(last->url),
+ "%s", buf + 4);
+ if (os_snprintf_error(sizeof(last->url), res))
+ break;
continue;
}
@@ -2055,26 +2061,37 @@ static struct osu_data * parse_osu_providers(const char *fname, size_t *count)
}
if (strncmp(buf, "osu_ssid=", 9) == 0) {
- snprintf(last->osu_ssid, sizeof(last->osu_ssid),
- "%s", buf + 9);
+ res = os_snprintf(last->osu_ssid,
+ sizeof(last->osu_ssid),
+ "%s", buf + 9);
+ if (os_snprintf_error(sizeof(last->osu_ssid), res))
+ break;
continue;
}
if (strncmp(buf, "osu_ssid2=", 10) == 0) {
- snprintf(last->osu_ssid2, sizeof(last->osu_ssid2),
- "%s", buf + 10);
+ res = os_snprintf(last->osu_ssid2,
+ sizeof(last->osu_ssid2),
+ "%s", buf + 10);
+ if (os_snprintf_error(sizeof(last->osu_ssid2), res))
+ break;
continue;
}
if (os_strncmp(buf, "osu_nai=", 8) == 0) {
- os_snprintf(last->osu_nai, sizeof(last->osu_nai),
- "%s", buf + 8);
+ res = os_snprintf(last->osu_nai, sizeof(last->osu_nai),
+ "%s", buf + 8);
+ if (os_snprintf_error(sizeof(last->osu_nai), res))
+ break;
continue;
}
if (os_strncmp(buf, "osu_nai2=", 9) == 0) {
- os_snprintf(last->osu_nai2, sizeof(last->osu_nai2),
- "%s", buf + 9);
+ res = os_snprintf(last->osu_nai2,
+ sizeof(last->osu_nai2),
+ "%s", buf + 9);
+ if (os_snprintf_error(sizeof(last->osu_nai2), res))
+ break;
continue;
}
@@ -2087,8 +2104,14 @@ static struct osu_data * parse_osu_providers(const char *fname, size_t *count)
continue;
*pos++ = '\0';
txt = &last->friendly_name[last->friendly_name_count++];
- snprintf(txt->lang, sizeof(txt->lang), "%s", buf + 14);
- snprintf(txt->text, sizeof(txt->text), "%s", pos);
+ res = os_snprintf(txt->lang, sizeof(txt->lang),
+ "%s", buf + 14);
+ if (os_snprintf_error(sizeof(txt->lang), res))
+ break;
+ res = os_snprintf(txt->text, sizeof(txt->text),
+ "%s", pos);
+ if (os_snprintf_error(sizeof(txt->text), res))
+ break;
}
if (strncmp(buf, "desc=", 5) == 0) {
@@ -2100,8 +2123,14 @@ static struct osu_data * parse_osu_providers(const char *fname, size_t *count)
continue;
*pos++ = '\0';
txt = &last->serv_desc[last->serv_desc_count++];
- snprintf(txt->lang, sizeof(txt->lang), "%s", buf + 5);
- snprintf(txt->text, sizeof(txt->text), "%s", pos);
+ res = os_snprintf(txt->lang, sizeof(txt->lang),
+ "%s", buf + 5);
+ if (os_snprintf_error(sizeof(txt->lang), res))
+ break;
+ res = os_snprintf(txt->text, sizeof(txt->text),
+ "%s", pos);
+ if (os_snprintf_error(sizeof(txt->text), res))
+ break;
}
if (strncmp(buf, "icon=", 5) == 0) {
@@ -2124,23 +2153,30 @@ static struct osu_data * parse_osu_providers(const char *fname, size_t *count)
if (!end)
continue;
*end = '\0';
- snprintf(icon->lang, sizeof(icon->lang), "%s", pos);
+ res = os_snprintf(icon->lang, sizeof(icon->lang),
+ "%s", pos);
+ if (os_snprintf_error(sizeof(icon->lang), res))
+ break;
pos = end + 1;
end = strchr(pos, ':');
if (end)
*end = '\0';
- snprintf(icon->mime_type, sizeof(icon->mime_type),
- "%s", pos);
- if (!pos)
+ res = os_snprintf(icon->mime_type,
+ sizeof(icon->mime_type), "%s", pos);
+ if (os_snprintf_error(sizeof(icon->mime_type), res))
+ break;
+ if (!end)
continue;
pos = end + 1;
end = strchr(pos, ':');
if (end)
*end = '\0';
- snprintf(icon->filename, sizeof(icon->filename),
- "%s", pos);
+ res = os_snprintf(icon->filename,
+ sizeof(icon->filename), "%s", pos);
+ if (os_snprintf_error(sizeof(icon->filename), res))
+ break;
continue;
}
}