summaryrefslogtreecommitdiffstats
path: root/main/hostapd/CVE-2015-4142.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-06-15 11:26:24 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-06-15 11:26:24 +0000
commit23b5bada7760b28f341d923d4549f36b4d9dc50b (patch)
treea87cad2babb8de920d44bc4ecfd7a92c59cdd683 /main/hostapd/CVE-2015-4142.patch
parentfd324ccbd51905c0571336037f4b4a09b8480170 (diff)
downloadaports-23b5bada7760b28f341d923d4549f36b4d9dc50b.tar.bz2
aports-23b5bada7760b28f341d923d4549f36b4d9dc50b.tar.xz
main/hostapd: various security fixes
Diffstat (limited to 'main/hostapd/CVE-2015-4142.patch')
-rw-r--r--main/hostapd/CVE-2015-4142.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/main/hostapd/CVE-2015-4142.patch b/main/hostapd/CVE-2015-4142.patch
new file mode 100644
index 000000000..79c5af890
--- /dev/null
+++ b/main/hostapd/CVE-2015-4142.patch
@@ -0,0 +1,41 @@
+From ef566a4d4f74022e1fdb0a2addfe81e6de9f4aae Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Wed, 29 Apr 2015 02:21:53 +0300
+Subject: [PATCH] AP WMM: Fix integer underflow in WMM Action frame parser
+
+The length of the WMM Action frame was not properly validated and the
+length of the information elements (int left) could end up being
+negative. This would result in reading significantly past the stack
+buffer while parsing the IEs in ieee802_11_parse_elems() and while doing
+so, resulting in segmentation fault.
+
+This can result in an invalid frame being used for a denial of service
+attack (hostapd process killed) against an AP with a driver that uses
+hostapd for management frame processing (e.g., all mac80211-based
+drivers).
+
+Thanks to Kostya Kortchinsky of Google security team for discovering and
+reporting this issue.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/ap/wmm.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/ap/wmm.c b/src/ap/wmm.c
+index 6d4177c..314e244 100644
+--- a/src/ap/wmm.c
++++ b/src/ap/wmm.c
+@@ -274,6 +274,9 @@ void hostapd_wmm_action(struct hostapd_data *hapd,
+ return;
+ }
+
++ if (left < 0)
++ return; /* not a valid WMM Action frame */
++
+ /* extract the tspec info element */
+ if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) {
+ hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
+--
+1.9.1
+