libssh: Fix CVE-2026-0964
PATCH 1/3 libssh: Fix CVE-2026-0964
Pick commits according to [1]
[1] https://security-tracker.debian.org/tracker/CVE-2026-0964
[2] https://www.libssh.org/security/advisories/CVE-2026-0964.txt
Signed-off-by Vijay Anusuri <[email protected]>
--- .../libssh/libssh/CVE-2026-0964.patch | 46 +++++++++++++++++++ .../recipes-support/libssh/libssh_0.10.6.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta-oe/recipes-support/libssh/libssh/CVE-2026-0964.patch
meta-oe/recipes-support/libssh/libssh/CVE-2026-0964.patch new file +46 -0
@@ -0,0 +1,46 @@ +From a5e4b12090b0c939d85af4f29280e40c5b6600aa Mon Sep 17 00:00:00 2001 +From: Jakub Jelen <[email protected]> +Date: Mon, 22 Dec 2025 19:16:44 +0100 +Subject: [PATCH] CVE-2026-0964 scp: Reject invalid paths received through scp + +Signed-off-by: Jakub Jelen <[email protected]> +Reviewed-by: Andreas Schneider <[email protected]> +(cherry picked from commit daa80818f89347b4d80b0c5b80659f9a9e55e8cc) + +Upstream-Status: Backport [https://git.libssh.org/projects/libssh.git/commit/?id=a5e4b12090b0c939d85af4f29280e40c5b6600aa] +CVE: CVE-2026-0964 +Signed-off-by: Vijay Anusuri <[email protected]> +--- + src/scp.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/src/scp.c b/src/scp.c +index 103822ce..09dc1a1b 100644 +--- a/src/scp.c ++++ b/src/scp.c +@@ -848,6 +848,22 @@ int ssh_scp_pull_request(ssh_scp scp) + size = strtoull(tmp, NULL, 10); + p++; + name = strdup(p); ++ /* Catch invalid name: ++ * - empty ones ++ * - containing any forward slash -- directory traversal handled ++ * differently ++ * - special names "." and ".." referring to the current and parent ++ * directories -- they are not expected either ++ */ ++ if (name == NULL || name[0] == '\0' || strchr(name, '/') || ++ strcmp(name, ".") == 0 || strcmp(name, "..") == 0) { ++ ssh_set_error(scp->session, ++ SSH_FATAL, ++ "Received invalid filename: %s", ++ name == NULL ? "<NULL>" : name); ++ SAFE_FREE(name); ++ goto error; ++ } + SAFE_FREE(scp->request_name); + scp->request_name = name; + if (buffer[0] == 'C') { +-- +2.43.0 +
meta-oe/recipes-support/libssh/libssh_0.10.6.bb +1 -0
@@ -24,6 +24,7 @@ SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable file://CVE-2025-8277-4.patch \ file://CVE-2026-3731-1.patch \ file://CVE-2026-3731-2.patch \ + file://CVE-2026-0964.patch \ " SRCREV = "10e09e273f69e149389b3e0e5d44b8c221c2e7f6"
Signature · 1 line
2.43.0
PATCH 2/3 libssh: Fix CVE-2026-0966
Pick commits according to [1]
[1] https://security-tracker.debian.org/tracker/CVE-2026-0966
[2] https://www.libssh.org/security/advisories/CVE-2026-0966.txt
Signed-off-by Vijay Anusuri <[email protected]>
--- .../libssh/libssh/CVE-2026-0966-1.patch | 35 +++++++++ .../libssh/libssh/CVE-2026-0966-2.patch | 71 +++++++++++++++++++ .../libssh/libssh/CVE-2026-0966-3.patch | 65 +++++++++++++++++ .../recipes-support/libssh/libssh_0.10.6.bb | 3 + 4 files changed, 174 insertions(+) create mode 100644 meta-oe/recipes-support/libssh/libssh/CVE-2026-0966-1.patch create mode 100644 meta-oe/recipes-support/libssh/libssh/CVE-2026-0966-2.patch create mode 100644 meta-oe/recipes-support/libssh/libssh/CVE-2026-0966-3.patch
meta-oe/recipes-support/libssh/libssh/CVE-2026-0966-1.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 6ba5ff1b7b1547a59f750fbc06b89737b7456117 Mon Sep 17 00:00:00 2001 +From: Jakub Jelen <[email protected]> +Date: Thu, 8 Jan 2026 12:09:50 +0100 +Subject: [PATCH] CVE-2026-0966 misc: Avoid heap buffer underflow in ssh_get_hexa +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jakub Jelen <[email protected]> +Reviewed-by: Pavol Žáčik <[email protected]> +(cherry picked from commit 417a095e6749a1f3635e02332061edad3c6a3401) + +Upstream-Status: Backport [https://git.libssh.org/projects/libssh.git/commit/?id=6ba5ff1b7b1547a59f750fbc06b89737b7456117] +CVE: CVE-2026-0966 +Signed-off-by: Vijay Anusuri <[email protected]> +--- + src/misc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/misc.c b/src/misc.c +index f371f332..565abcfc 100644 +--- a/src/misc.c ++++ b/src/misc.c +@@ -451,7 +451,7 @@ char *ssh_get_hexa(const unsigned char *what, size_t len) + size_t i; + size_t hlen = len * 3; + +- if (len > (UINT_MAX - 1) / 3) { ++ if (what == NULL || len < 1 || len > (UINT_MAX - 1) / 3) { + return NULL; + } + +-- +2.43.0 +
meta-oe/recipes-support/libssh/libssh/CVE-2026-0966-2.patch new file +71 -0
71 lines not on this page · raw message
meta-oe/recipes-support/libssh/libssh/CVE-2026-0966-3.patch new file +65 -0
65 lines not on this page · raw message
meta-oe/recipes-support/libssh/libssh_0.10.6.bb +3 -0
@@ -25,6 +25,9 @@ SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable file://CVE-2026-3731-1.patch \ file://CVE-2026-3731-2.patch \ file://CVE-2026-0964.patch \ + file://CVE-2026-0966-1.patch \ + file://CVE-2026-0966-2.patch \ + file://CVE-2026-0966-3.patch \ " SRCREV = "10e09e273f69e149389b3e0e5d44b8c221c2e7f6"
Signature · 1 line
2.43.0
PATCH 3/3 giflib: Fix CVE-2026-23868
In reply to Vijay AnusuriPick patch according to [1]
[1] https://www.facebook.com/security/advisories/cve-2026-23868
[2] https://nvd.nist.gov/vuln/detail/CVE-2026-23868
Signed-off-by Vijay Anusuri <[email protected]>
--- .../giflib/giflib/CVE-2026-23868.patch | 34 +++++++++++++++++++ .../recipes-devtools/giflib/giflib_5.2.2.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta-oe/recipes-devtools/giflib/giflib/CVE-2026-23868.patch
meta-oe/recipes-devtools/giflib/giflib/CVE-2026-23868.patch new file +34 -0
@@ -0,0 +1,34 @@ +From f5b7267aed3665ef025c13823e454170d031c106 Mon Sep 17 00:00:00 2001 +From: Eric S. Raymond <[email protected]> +Date: Wed Mar 4 18:49:49 2026 -0500 +Subject: [PATCH] Avoid potentuial double-free on weird images. + +Upstream-Status: Backport [https://sourceforge.net/p/giflib/code/ci/f5b7267aed3665ef025c13823e454170d031c106] +CVE: CVE-2026-23868 +Signed-off-by: Vijay Anusuri <[email protected]> +--- + gifalloc.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/gifalloc.c b/gifalloc.c +index 47c6539..cfb6e33 100644 +--- a/gifalloc.c ++++ b/gifalloc.c +@@ -349,6 +349,14 @@ SavedImage *GifMakeSavedImage(GifFileType *GifFile, + * aliasing problems. + */ + ++ /* Null out aliased pointers before any allocations ++ * so that FreeLastSavedImage won't free CopyFrom's ++ * data if an allocation fails partway through. */ ++ sp->ImageDesc.ColorMap = NULL; ++ sp->RasterBits = NULL; ++ sp->ExtensionBlocks = NULL; ++ sp->ExtensionBlockCount = 0; ++ + /* first, the local color map */ + if (CopyFrom->ImageDesc.ColorMap != NULL) { + sp->ImageDesc.ColorMap = GifMakeMapObject( +-- +2.25.1 +
meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb +1 -0
@@ -10,6 +10,7 @@ DEPENDS = "xmlto-native" SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz \ https://sourceforge.net/p/giflib/code/ci/d54b45b0240d455bbaedee4be5203d2703e59967/tree/doc/giflib-logo.gif?format=raw;subdir=${BP}/doc;name=logo;downloadfilename=giflib-logo.gif \ file://0001-Makefile-fix-typo-in-soname-argument.patch \ + file://CVE-2026-23868.patch \ " SRC_URI[logo.sha256sum] = "1a54383986adad1521d00e003b4c482c27e8bc60690be944a1f3319c75abc2c9"
Signature · 1 line
2.43.0