summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-03-01 21:07:49 -0800
committerKhem Raj <raj.khem@gmail.com>2021-03-02 10:13:38 -0800
commit4629af5f52834387e417041b5b12535f5bdb22d6 (patch)
treed3317cec2d85aa21b559944384c5b6ee55b7df14 /meta-networking/recipes-connectivity
parentd21322a667633f63381ac9fffb407d7b4d09157d (diff)
downloadmeta-openembedded-4629af5f52834387e417041b5b12535f5bdb22d6.tar.gz
mbedtls: Fix gcc11 stringop-overflow warning
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-connectivity')
-rw-r--r--meta-networking/recipes-connectivity/mbedtls/mbedtls/0001-ssl_tls-Increase-size-of-padbuf-to-64.patch34
-rw-r--r--meta-networking/recipes-connectivity/mbedtls/mbedtls_2.25.0.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls/0001-ssl_tls-Increase-size-of-padbuf-to-64.patch b/meta-networking/recipes-connectivity/mbedtls/mbedtls/0001-ssl_tls-Increase-size-of-padbuf-to-64.patch
new file mode 100644
index 000000000..f3ba04f51
--- /dev/null
+++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls/0001-ssl_tls-Increase-size-of-padbuf-to-64.patch
@@ -0,0 +1,34 @@
1From c3d7321d59e959b357a7d3d69782d9105f3d04aa Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 1 Mar 2021 21:04:57 -0800
4Subject: [PATCH] ssl_tls: Increase size of padbuf to 64
5
6This fixes warnings with gcc11
7
8git/library/ssl_tls.c: In function 'ssl_calc_finished_tls_sha384':
9git/library/ssl_tls.c:3267:5: error: 'mbedtls_sha512_finish_ret' accessing 64 bytes in a region of size 48 [-Werror=stringop-overflow=]
10 3267 | finish( &sha512, padbuf );
11 | ^~~~~~~~~~~~~~~~~~~~~~~~~
12git/library/ssl_tls.c:3267:5: note: referencing argument 2 of type 'unsigned char *'
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 library/ssl_tls.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/library/ssl_tls.c b/library/ssl_tls.c
20index a1a5859f0..4c98a4104 100644
21--- a/library/ssl_tls.c
22+++ b/library/ssl_tls.c
23@@ -3205,7 +3205,7 @@ static void ssl_calc_finished_tls_sha384(
24 {
25 int len = 12;
26 const char *sender;
27- unsigned char padbuf[48];
28+ unsigned char padbuf[64];
29 #if defined(MBEDTLS_USE_PSA_CRYPTO)
30 size_t hash_size;
31 psa_hash_operation_t sha384_psa = PSA_HASH_OPERATION_INIT;
32--
332.30.1
34
diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.25.0.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.25.0.bb
index 27c1b209d..481e7ea94 100644
--- a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.25.0.bb
+++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.25.0.bb
@@ -25,6 +25,7 @@ SECTION = "libs"
25S = "${WORKDIR}/git" 25S = "${WORKDIR}/git"
26SRCREV = "1c54b5410fd48d6bcada97e30cac417c5c7eea67" 26SRCREV = "1c54b5410fd48d6bcada97e30cac417c5c7eea67"
27SRC_URI = "git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=development" 27SRC_URI = "git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=development"
28SRC_URI += "file://0001-ssl_tls-Increase-size-of-padbuf-to-64.patch"
28 29
29inherit cmake 30inherit cmake
30 31