diff options
| author | Ankur Tyagi <ankur.tyagi85@gmail.com> | 2025-10-15 09:47:57 +1300 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@intel.com> | 2025-10-30 14:43:33 +0800 |
| commit | 3e72a5f33cbf0c68b0257bdb331263f17746ae12 (patch) | |
| tree | 72d595924aebb4e890edb71b980a3d76e907b2fc /meta-networking/recipes-support | |
| parent | a7b0b1cba82b0eb82716e4c84fc46830fb4f4b45 (diff) | |
| download | meta-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-x | meta-networking/recipes-support/libconfuse/files/CVE-2022-40320.patch | 42 | ||||
| -rw-r--r-- | meta-networking/recipes-support/libconfuse/libconfuse_3.3.bb | 5 |
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 @@ | |||
| 1 | From d73777c2c3566fb2647727bb56d9a2295b81669b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Joachim Wiberg <troglobit@gmail.com> | ||
| 3 | Date: Fri, 2 Sep 2022 16:12:46 +0200 | ||
| 4 | Subject: [PATCH] Fix #163: unterminated username used with getpwnam() | ||
| 5 | |||
| 6 | Signed-off-by: Joachim Wiberg <troglobit@gmail.com> | ||
| 7 | |||
| 8 | CVE: CVE-2022-40320 | ||
| 9 | Upstream-Status: Backport [https://github.com/libconfuse/libconfuse/commit/d73777c2c3566fb2647727bb56d9a2295b81669b] | ||
| 10 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 11 | --- | ||
| 12 | src/confuse.c | 9 ++++++--- | ||
| 13 | 1 file changed, 6 insertions(+), 3 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/src/confuse.c b/src/confuse.c | ||
| 16 | index 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" | |||
| 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=42fa47330d4051cd219f7d99d023de3a" | 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=42fa47330d4051cd219f7d99d023de3a" |
| 4 | 4 | ||
| 5 | SRCREV = "a42aebf13db33afd575da6e63f55163d371f776d" | 5 | SRCREV = "a42aebf13db33afd575da6e63f55163d371f776d" |
| 6 | SRC_URI = "git://github.com/libconfuse/libconfuse.git;branch=master;protocol=https" | 6 | SRC_URI = " \ |
| 7 | git://github.com/libconfuse/libconfuse.git;branch=master;protocol=https \ | ||
| 8 | file://CVE-2022-40320.patch \ | ||
| 9 | " | ||
| 7 | 10 | ||
| 8 | inherit autotools-brokensep pkgconfig gettext | 11 | inherit autotools-brokensep pkgconfig gettext |
| 9 | 12 | ||
