Openwrt/package/network/services/hostapd/patches
Stefan Lippers-Hollmann 1ca5de13a1 hostapd: P2P: Fix a corner case in peer addition based on PD Request
p2p_add_device() may remove the oldest entry if there is no room in the
peer table for a new peer. This would result in any pointer to that
removed entry becoming stale. A corner case with an invalid PD Request
frame could result in such a case ending up using (read+write) freed
memory. This could only by triggered when the peer table has reached its
maximum size and the PD Request frame is received from the P2P Device
Address of the oldest remaining entry and the frame has incorrect P2P
Device Address in the payload.

Fix this by fetching the dev pointer again after having called
p2p_add_device() so that the stale pointer cannot be used.

This fixes the following security vulnerabilities/bugs:

- CVE-2021-27803 - A vulnerability was discovered in how p2p/p2p_pd.c
  in wpa_supplicant before 2.10 processes P2P (Wi-Fi Direct) provision
  discovery requests. It could result in denial of service or other
  impact (potentially execution of arbitrary code), for an attacker
  within radio range.

Fixes: 17bef1e97a50 ("P2P: Add peer entry based on Provision Discovery Request")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2021-03-01 00:34:23 +01:00
..
001-HE-VHT-fix-frequency-setup-with-HE-enabled.patch
002-mesh-fix-channel-init-order-disable-pri-sec-channel-.patch
003-wpa_supplicant-handle-HT40-and-mode-downgrade-in-AP-.patch
004-wpa_supplicant-fix-frequency-config-for-non-p2p-vht-.patch
005-wpa_supplicant-enable-vht-and-he-in-default-config-p.patch
006-hw_features-better-debug-messages-for-some-error-cas.patch
007-dfs-use-helper-functions-for-vht-he-parameters.patch
008-mesh-use-setup-completion-callback-to-complete-mesh-.patch
009-mesh-update-ssid-frequency-as-pri-sec-channel-switch.patch
010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
011-mesh-do-not-set-offchanok-on-DFS-channels-in-non-ETS.patch
012-mesh-fix-channel-switch-error-during-CAC.patch
013-mesh-inform-kernel-driver-DFS-handler-in-userspace.patch
014-mesh-fixes-for-mesh-init-deinit.patch
015-mesh-fix-DFS-deinit-init.patch
016-tests-DFS-test-for-wpa_supplicant-mesh.patch
017-mesh-fix-mesh_oom-test.patch
018-mesh-move-mesh-freq-setting-to-own-function.patch
019-mesh-use-deterministic-channel-on-channel-switch.patch
020-ignore-4addr-mode-enabling-error.patch
050-mesh-make-forwarding-configurable.patch
060-P2P-Fix-a-corner-case-in-peer-addition-based-on-PD-R.patch
100-daemonize_fix.patch
110-notify-mgmt-frames.patch
110-wolfssl-compile-fix.patch
120-reconfigure-wps-credentials.patch
200-multicall.patch
300-noscan.patch
301-mesh-noscan.patch
310-rescan_immediately.patch
320-optional_rfkill.patch
330-nl80211_fix_set_freq.patch
340-reload_freq_change.patch
341-mesh-ctrl-iface-channel-switch.patch
350-nl80211_del_beacon_bss.patch
360-ctrl_iface_reload.patch
370-ap_sta_support.patch
380-disable_ctrl_iface_mib.patch
381-hostapd_cli_UNKNOWN-COMMAND.patch
390-wpa_ie_cap_workaround.patch
400-wps_single_auth_enc_type.patch
410-limit_debug_messages.patch
420-indicate-features.patch
430-hostapd_cli_ifdef.patch
431-wpa_cli_ifdef.patch
432-missing-typedef.patch
450-scan_wait.patch
460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
461-driver_nl80211-use-new-parameters-during-ibss-join.patch
463-add-mcast_rate-to-11s.patch
464-fix-mesh-obss-check.patch
470-survey_data_fallback.patch
500-lto-jobserver-support.patch
599-wpa_supplicant-fix-warnings.patch
600-ubus_support.patch
700-wifi-reload.patch
800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch
801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch