summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support
diff options
context:
space:
mode:
authorAnkur Tyagi <ankur.tyagi85@gmail.com>2025-10-15 09:47:57 +1300
committerAnuj Mittal <anuj.mittal@intel.com>2025-10-30 14:43:33 +0800
commit3e72a5f33cbf0c68b0257bdb331263f17746ae12 (patch)
tree72d595924aebb4e890edb71b980a3d76e907b2fc /meta-networking/recipes-support
parenta7b0b1cba82b0eb82716e4c84fc46830fb4f4b45 (diff)
downloadmeta-openembedded-3e72a5f33cbf0c68b0257bdb331263f17746ae12.tar.gz
libconfuse: patch CVE-2022-40320
Pick patch per [1] poiting to [2] pointing to [3]. [1] https://nvd.nist.gov/vuln/detail/CVE-2022-40320 [2] https://github.com/libconfuse/libconfuse/issues/163 [3] https://github.com/libconfuse/libconfuse/commit/d73777c2c3566fb2647727bb56d9a2295b81669b Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit c048c0410133241b2cfbb3d2cbeb532afff99e58) Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'meta-networking/recipes-support')
-rwxr-xr-xmeta-networking/recipes-support/libconfuse/files/CVE-2022-40320.patch42
-rw-r--r--meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb5
2 files changed, 46 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/libconfuse/files/CVE-2022-40320.patch b/meta-networking/recipes-support/libconfuse/files/CVE-2022-40320.patch
new file mode 100755
index 0000000000..52296b9c0f
--- /dev/null
+++ b/meta-networking/recipes-support/libconfuse/files/CVE-2022-40320.patch
@@ -0,0 +1,42 @@
1From d73777c2c3566fb2647727bb56d9a2295b81669b Mon Sep 17 00:00:00 2001
2From: Joachim Wiberg <troglobit@gmail.com>
3Date: Fri, 2 Sep 2022 16:12:46 +0200
4Subject: [PATCH] Fix #163: unterminated username used with getpwnam()
5
6Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
7
8CVE: CVE-2022-40320
9Upstream-Status: Backport [https://github.com/libconfuse/libconfuse/commit/d73777c2c3566fb2647727bb56d9a2295b81669b]
10Signed-off-by: Peter Marko <peter.marko@siemens.com>
11---
12 src/confuse.c | 9 ++++++---
13 1 file changed, 6 insertions(+), 3 deletions(-)
14
15diff --git a/src/confuse.c b/src/confuse.c
16index 6d1fdbd..05566b5 100644
17--- a/src/confuse.c
18+++ b/src/confuse.c
19@@ -1872,17 +1872,20 @@ DLLIMPORT char *cfg_tilde_expand(const char *filename)
20 file = filename + 1;
21 } else {
22 /* ~user or ~user/path */
23- char *user;
24+ char *user; /* ~user or ~user/path */
25+ size_t len;
26
27 file = strchr(filename, '/');
28 if (file == 0)
29 file = filename + strlen(filename);
30
31- user = malloc(file - filename);
32+ len = file - filename - 1;
33+ user = malloc(len + 1);
34 if (!user)
35 return NULL;
36
37- strncpy(user, filename + 1, file - filename - 1);
38+ strncpy(user, &filename[1], len);
39+ user[len] = 0;
40 passwd = getpwnam(user);
41 free(user);
42 }
diff --git a/meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb b/meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb
index b8d0536eb3..9a339326ca 100644
--- a/meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb
+++ b/meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb
@@ -3,7 +3,10 @@ LICENSE = "ISC"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=42fa47330d4051cd219f7d99d023de3a" 3LIC_FILES_CHKSUM = "file://LICENSE;md5=42fa47330d4051cd219f7d99d023de3a"
4 4
5SRCREV = "a42aebf13db33afd575da6e63f55163d371f776d" 5SRCREV = "a42aebf13db33afd575da6e63f55163d371f776d"
6SRC_URI = "git://github.com/libconfuse/libconfuse.git;branch=master;protocol=https" 6SRC_URI = " \
7 git://github.com/libconfuse/libconfuse.git;branch=master;protocol=https \
8 file://CVE-2022-40320.patch \
9"
7 10
8inherit autotools-brokensep pkgconfig gettext 11inherit autotools-brokensep pkgconfig gettext
9 12