summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Vickberg <wickbergster@gmail.com>2021-05-17 18:03:48 +0200
committerArmin Kuster <akuster808@gmail.com>2021-05-22 16:18:11 -0700
commitf56fb13a2c5efe0802fca883f321bc6ea064d70f (patch)
tree7d299c63ed5c70cca5b68042f386619626385f58
parent9d50b9f99509147613bfcee420b1718cd856c390 (diff)
downloadmeta-openembedded-f56fb13a2c5efe0802fca883f321bc6ea064d70f.tar.gz
hostapd: fix building with CONFIG_TLS=internal
The patch recently added for CVE-2021-30004 broke compilation with CONFIG_TLS=internal. This adds the necessary function to let it compile again. Signed-off-by: Alexander Vickberg <wickbergster@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit d6ef4170747d6668fa940328334055eef3e1e1d6) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-connectivity/hostapd/hostapd/0001-Prepare-for-CVE-2021-30004.patch.patch45
-rw-r--r--meta-oe/recipes-connectivity/hostapd/hostapd_2.9.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/hostapd/hostapd/0001-Prepare-for-CVE-2021-30004.patch.patch b/meta-oe/recipes-connectivity/hostapd/hostapd/0001-Prepare-for-CVE-2021-30004.patch.patch
new file mode 100644
index 000000000..1bedb4f75
--- /dev/null
+++ b/meta-oe/recipes-connectivity/hostapd/hostapd/0001-Prepare-for-CVE-2021-30004.patch.patch
@@ -0,0 +1,45 @@
1From 14fab0772db19297c82dd1b8612c9335369dce41 Mon Sep 17 00:00:00 2001
2From: Alexander Vickberg <wickbergster@gmail.com>
3Date: Mon, 17 May 2021 17:54:13 +0200
4Subject: [PATCH] Prepare for CVE-2021-30004.patch
5
6Without this building fails for CONFIG_TLS=internal
7
8Signed-off-by: Alexander Vickberg <wickbergster@gmail.com>
9---
10 src/tls/asn1.h | 6 ++++++
11 src/utils/includes.h | 1 +
12 2 files changed, 7 insertions(+)
13
14diff --git a/src/tls/asn1.h b/src/tls/asn1.h
15index 6bd7df5..77b94ef 100644
16--- a/src/tls/asn1.h
17+++ b/src/tls/asn1.h
18@@ -66,6 +66,12 @@ void asn1_oid_to_str(const struct asn1_oid *oid, char *buf, size_t len);
19 unsigned long asn1_bit_string_to_long(const u8 *buf, size_t len);
20 int asn1_oid_equal(const struct asn1_oid *a, const struct asn1_oid *b);
21
22+static inline bool asn1_is_null(const struct asn1_hdr *hdr)
23+{
24+ return hdr->class == ASN1_CLASS_UNIVERSAL &&
25+ hdr->tag == ASN1_TAG_NULL;
26+}
27+
28 extern struct asn1_oid asn1_sha1_oid;
29 extern struct asn1_oid asn1_sha256_oid;
30
31diff --git a/src/utils/includes.h b/src/utils/includes.h
32index 75513fc..741fc9c 100644
33--- a/src/utils/includes.h
34+++ b/src/utils/includes.h
35@@ -18,6 +18,7 @@
36
37 #include <stdlib.h>
38 #include <stddef.h>
39+#include <stdbool.h>
40 #include <stdio.h>
41 #include <stdarg.h>
42 #include <string.h>
43--
442.25.1
45
diff --git a/meta-oe/recipes-connectivity/hostapd/hostapd_2.9.bb b/meta-oe/recipes-connectivity/hostapd/hostapd_2.9.bb
index e58601868..a9780bc6d 100644
--- a/meta-oe/recipes-connectivity/hostapd/hostapd_2.9.bb
+++ b/meta-oe/recipes-connectivity/hostapd/hostapd_2.9.bb
@@ -11,6 +11,7 @@ SRC_URI = " \
11 file://defconfig \ 11 file://defconfig \
12 file://init \ 12 file://init \
13 file://hostapd.service \ 13 file://hostapd.service \
14 file://0001-Prepare-for-CVE-2021-30004.patch.patch \
14 file://CVE-2019-16275.patch \ 15 file://CVE-2019-16275.patch \
15 file://CVE-2019-5061.patch \ 16 file://CVE-2019-5061.patch \
16 file://CVE-2021-0326.patch \ 17 file://CVE-2021-0326.patch \