[arch-commits] Commit in wpa_supplicant/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Fri Apr 24 02:51:33 UTC 2015


    Date: Friday, April 24, 2015 @ 04:51:33
  Author: foutrelis
Revision: 237978

upgpkg: wpa_supplicant 2.4-1

- New upstream release.
- Fix CVE-2015-1863: P2P SSID processing vulnerability (FS#44695).

Added:
  wpa_supplicant/trunk/0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch
Modified:
  wpa_supplicant/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch |   42 ++++++++++
 PKGBUILD                                                        |    9 +-
 2 files changed, 49 insertions(+), 2 deletions(-)

Added: 0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch
===================================================================
--- 0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch	                        (rev 0)
+++ 0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch	2015-04-24 02:51:33 UTC (rev 237978)
@@ -0,0 +1,42 @@
+From 9ed4eee345f85e3025c33c6e20aa25696e341ccd Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <jouni at qca.qualcomm.com>
+Date: Tue, 7 Apr 2015 11:32:11 +0300
+Subject: [PATCH] P2P: Validate SSID element length before copying it
+ (CVE-2015-1863)
+
+This fixes a possible memcpy overflow for P2P dev->oper_ssid in
+p2p_add_device(). The length provided by the peer device (0..255 bytes)
+was used without proper bounds checking and that could have resulted in
+arbitrary data of up to 223 bytes being written beyond the end of the
+dev->oper_ssid[] array (of which about 150 bytes would be beyond the
+heap allocation) when processing a corrupted management frame for P2P
+peer discovery purposes.
+
+This could result in corrupted state in heap, unexpected program
+behavior due to corrupted P2P peer device information, denial of service
+due to process crash, exposure of memory contents during GO Negotiation,
+and potentially arbitrary code execution.
+
+Thanks to Google security team for reporting this issue and smart
+hardware research group of Alibaba security team for discovering it.
+
+Signed-off-by: Jouni Malinen <jouni at qca.qualcomm.com>
+---
+ src/p2p/p2p.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
+index f584fae..a45fe73 100644
+--- a/src/p2p/p2p.c
++++ b/src/p2p/p2p.c
+@@ -778,6 +778,7 @@ int p2p_add_device(struct p2p_data *p2p, const u8 *addr, int freq,
+ 	if (os_memcmp(addr, p2p_dev_addr, ETH_ALEN) != 0)
+ 		os_memcpy(dev->interface_addr, addr, ETH_ALEN);
+ 	if (msg.ssid &&
++	    msg.ssid[1] <= sizeof(dev->oper_ssid) &&
+ 	    (msg.ssid[1] != P2P_WILDCARD_SSID_LEN ||
+ 	     os_memcmp(msg.ssid + 2, P2P_WILDCARD_SSID, P2P_WILDCARD_SSID_LEN)
+ 	     != 0)) {
+-- 
+2.3.6
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-04-24 02:22:39 UTC (rev 237977)
+++ PKGBUILD	2015-04-24 02:51:33 UTC (rev 237978)
@@ -2,7 +2,7 @@
 # Maintainer: Thomas Bächler <thomas at archlinux.org>
 
 pkgname=wpa_supplicant
-pkgver=2.3
+pkgver=2.4
 pkgrel=1
 pkgdesc="A utility providing key negotiation for WPA wireless networks"
 url="http://hostap.epitest.fi/wpa_supplicant"
@@ -12,13 +12,18 @@
 license=('GPL')
 backup=('etc/wpa_supplicant/wpa_supplicant.conf')
 source=("http://w1.fi/releases/${pkgname}-${pkgver}.tar.gz"
+	0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch
 	config)
-sha256sums=('eaaa5bf3055270e521b2dff64f2d203ec8040f71958b8588269a82c00c9d7b6a'
+sha256sums=('058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122'
+            'a026c2ed090fedb73187adce9a122345c3b0ac40cc67e6674b92fbe6a08cbbd1'
             '15be07f0d8003a2239dfba008f09602f1203bbf143004d8979ff4d863153c817')
 
 prepare() {
   cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}/"
   cp "${srcdir}/config" ./.config
+
+  # https://bugs.archlinux.org/task/44695
+  patch -d .. -Np1 -i ../0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch
 }
 
 build() {



More information about the arch-commits mailing list