Skip to contentSkip to conversation

wavpack: patch CVE-2016-10169

PATCH New Gyorgy Sarvari 1 participant 4 messages Oct 21, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 wavpack: patch CVE-2016-10169

Details: https://nvd.nist.gov/vuln/detail/CVE-2016-10169

Backport the relevant part of the linked patch.

(The full patch contains fixes for other vulnerabilities also, which were introduced after v4.60)

---
 .../wavpack/wavpack/CVE-2016-10169.patch      | 27 +++++++++++++++++++
 .../wavpack/wavpack_4.60.1.bb                 |  4 ++-
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-multimedia/wavpack/wavpack/CVE-2016-10169.patch
meta-oe/recipes-multimedia/wavpack/wavpack/CVE-2016-10169.patch new file +27 -0
new file mode 100644
index 0000000000..22dbc2648c
@@ -0,0 +1,27 @@
+From 847968ff66f0d743ed2cf3d5f1f7d8d8dafcf42d Mon Sep 17 00:00:00 2001
+From: David Bryant <[email protected]>
+Date: Wed, 21 Dec 2016 22:18:36 -0800
+Subject: [PATCH] CVE-2016-10169
+
+CVE: CVE-2016-10169
+Upstream-Status: Backport [https://github.com/dbry/WavPack/commit/4bc05fc490b66ef2d45b1de26abf1455b486b0dc]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ src/words.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/words.c b/src/words.c
+index c87b8d2..272760a 100644
+--- a/src/words.c
++++ b/src/words.c
+@@ -1117,6 +1117,10 @@ int32_t FASTCALL get_word (WavpackStream *wps, int chan, int32_t *correction)
+ 
+     low &= 0x7fffffff;
+     high &= 0x7fffffff;
++
++    if (low > high)         // make sure high and low make sense
++        high = low;
++
+     mid = (high + low + 1) >> 1;
+ 
+     if (!c->error_limit)
meta-oe/recipes-multimedia/wavpack/wavpack_4.60.1.bb +3 -1
index 021496bd43..8dbeb9883c 100644
@@ -2,7 +2,9 @@ DESCRIPTION = "WavPack is a completely open audio compression format providing l
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://license.txt;md5=f596650807588c61fcab60bec8242df8"
 
-SRC_URI = "http://wavpack.com/wavpack-${PV}.tar.bz2"
+SRC_URI = "http://wavpack.com/wavpack-${PV}.tar.bz2 \
+           file://CVE-2016-10169.patch \
+           "
 SRC_URI[md5sum] = "7bb1528f910e4d0003426c02db856063"
 SRC_URI[sha256sum] = "175ee4f2effd6f51e6ec487956f41177256bf892c2e8e07de5d27ed4ee6888c5"
 
#1 lore raw

PATCH 2/4 dash: set CVE_PRODUCT

From: Peter Marko <[email protected]>

This removes false positive CVE-2024-21485 from cve reports.

$ sqlite3 nvdcve_2-2.db
sqlite> select * from products where product = 'dash';
CVE-2009-0854|dash|dash|0.5.4|=||
CVE-2024-21485|plotly|dash|||2.13.0|<
CVE-2024-21485|plotly|dash|2.14.0|>=|2.15.0|<

Our dash:dash did not reach major version 1 yet.

(cherry picked from commit e1427013e01df44b9275908f7605e8e25fc3fd83)
---
 meta-oe/recipes-shells/dash/dash_0.5.11.5.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-shells/dash/dash_0.5.11.5.bb +2 -0
index 3674052311..904d8a74cc 100644
@@ -10,6 +10,8 @@ inherit autotools update-alternatives
 SRC_URI = "http://gondor.apana.org.au/~herbert/${BPN}/files/${BP}.tar.gz"
 SRC_URI[sha256sum] = "db778110891f7937985f29bf23410fe1c5d669502760f584e54e0e7b29e123bd"
 
+CVE_PRODUCT = "dash:dash"
+
 EXTRA_OECONF += "--bindir=${base_bindir}"
 
 ALTERNATIVE:${PN} = "sh"
#2 lore raw

PATCH 3/4 netkit-telnet: patch CVE-2022-39028

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2022-39028

Pick the patch mentioned in the nvd report.

---
 .../netkit-telnet/files/CVE-2022-39028.patch  | 72 +++++++++++++++++++
 .../netkit-telnet/netkit-telnet_0.17.bb       |  1 +
 2 files changed, 73 insertions(+)
 create mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/CVE-2022-39028.patch
meta-networking/recipes-netkit/netkit-telnet/files/CVE-2022-39028.patch new file +72 -0
new file mode 100644
index 0000000000..7ce4766426
@@ -0,0 +1,72 @@
+From 1949388e52acd343bb3e366d816b33912e38db39 Mon Sep 17 00:00:00 2001
+From: Guillem Jover <[email protected]>
+Date: Sun, 28 Aug 2022 15:07:29 +0200
+Subject: [PATCH] Fix remote DoS vulnerability in inetutils-telnetd
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is caused by a crash by a NULL pointer dereference when sending
+the byte sequences «0xff 0xf7» or «0xff 0xf8».
+
+Found-by: Pierre Kim and Alexandre Torres
+Patch-adapted-by: Erik Auerswald <[email protected]>
+
+CVE: CVE-2022-39028
+Upstream-Status: Backport [https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/commit/?id=113da8021710d871c7dd72d2a4d5615d42d64289]
+
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ .../inetutils-telnetd-EC_EL_null_deref.patch  | 43 +++++++++++++++++++
+ 1 file changed, 43 insertions(+)
+ create mode 100644 debian/patches/inetutils-telnetd-EC_EL_null_deref.patch
+
+diff --git a/debian/patches/inetutils-telnetd-EC_EL_null_deref.patch b/debian/patches/inetutils-telnetd-EC_EL_null_deref.patch
+new file mode 100644
+index 0000000..fac5e3f
+--- /dev/null
++++ b/debian/patches/inetutils-telnetd-EC_EL_null_deref.patch
+@@ -0,0 +1,43 @@
++Description: Fix remote DoS vulnerability in inetutils-telnetd
++ This is caused by a crash by a NULL pointer dereference when sending the
++ byte sequences «0xff 0xf7» or «0xff 0xf8».
++Authors:
++ Pierre Kim (original patch),
++ Alexandre Torres (original patch),
++ Erik Auerswald <[email protected]> (adapted patch),
++Reviewed-by: Erik Auerswald <[email protected]>
++Origin: upstream
++Ref: https://pierrekim.github.io/blog/2022-08-24-2-byte-dos-freebsd-netbsd-telnetd-netkit-telnetd-inetutils-telnetd-kerberos-telnetd.html
++Forwarded: https://lists.gnu.org/archive/html/bug-inetutils/2022-08/msg00002.html
++Last-Update: 2022-08-28
++
++
++diff --git a/telnetd/state.c b/telnetd/state.c
++index ffc6cbaf..c2d760f8 100644
++--- a/telnetd/state.c
+++++ b/telnetd/state.c
++@@ -312,15 +312,21 @@ telrcv (void)
++ 	    case EC:
++ 	    case EL:
++ 	      {
++-		cc_t ch;
+++		cc_t ch = (cc_t) (_POSIX_VDISABLE);
++ 
++ 		DEBUG (debug_options, 1, printoption ("td: recv IAC", c));
++ 		ptyflush ();	/* half-hearted */
++ 		init_termbuf ();
++ 		if (c == EC)
++-		  ch = *slctab[SLC_EC].sptr;
+++		  {
+++		    if (slctab[SLC_EC].sptr)
+++		      ch = *slctab[SLC_EC].sptr;
+++		  }
++ 		else
++-		  ch = *slctab[SLC_EL].sptr;
+++		  {
+++		    if (slctab[SLC_EL].sptr)
+++		      ch = *slctab[SLC_EL].sptr;
+++		  }
++ 		if (ch != (cc_t) (_POSIX_VDISABLE))
++ 		  pty_output_byte ((unsigned char) ch);
++ 		break;
meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb +1 -0
index 56860ea098..6cfc886350 100644
@@ -14,6 +14,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-telnet/netkit-telnet_${PV}.orig.tar.gz
            file://0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch \
            file://CVE-2020-10188.patch \
            file://0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch \
+           file://CVE-2022-39028.patch \
            "
 
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netkit-telnet/"
#3 lore raw

PATCH 4/4 renderdoc: patch CVE-2023-33863, CVE-2023-33864 and CVE-2023-33865

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2023-33863
https://nvd.nist.gov/vuln/detail/CVE-2023-33864
https://nvd.nist.gov/vuln/detail/CVE-2023-33865

Take the patches mentioned from the original researcher's report[1]

[1]: https://www.qualys.com/2023/06/06/renderdoc/renderdoc.txt (summary section)

---
 .../CVE-2023-33863-33864-33865-1.patch        |  71 ++++++++
 .../CVE-2023-33863-33864-33865-2.patch        |  72 ++++++++
 .../CVE-2023-33863-33864-33865-3.patch        | 160 ++++++++++++++++++
 .../CVE-2023-33863-33864-33865-4.patch        |  28 +++
 .../CVE-2023-33863-33864-33865-5.patch        |  40 +++++
 .../renderdoc/renderdoc_1.13.bb               |  12 +-
 6 files changed, 379 insertions(+), 4 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-1.patch
 create mode 100644 meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-2.patch
 create mode 100644 meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-3.patch
 create mode 100644 meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-4.patch
 create mode 100644 meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-5.patch
meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-1.patch new file +71 -0
new file mode 100644
index 0000000000..8d0eaf49eb
@@ -0,0 +1,71 @@
+From d55a6f1f849e38d2ca41c6d6683b773981f7e6c0 Mon Sep 17 00:00:00 2001
+From: baldurk <[email protected]>
+Date: Fri, 19 May 2023 09:57:03 +0100
+Subject: [PATCH] Verify array sizes when serialising for strings
+
+* We also limit the array size to 1GB for 32-bit. The 4GB/1GB limit is far
+  larger than reasonable for strings but can be handled the same way regardless.
+
+CVE: CVE-2023-33863 CVE-2023-33864 CVE-2023-33865
+Upstream-Status: Backport [https://github.com/baldurk/renderdoc/commit/601ed56111ce3803d8476d438ade1c92d6092856]
+
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ renderdoc/serialise/serialiser.h | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/renderdoc/serialise/serialiser.h b/renderdoc/serialise/serialiser.h
+index 9393876ba..de42e54b4 100644
+--- a/renderdoc/serialise/serialiser.h
++++ b/renderdoc/serialise/serialiser.h
+@@ -721,7 +721,7 @@ public:
+       arr.ReserveChildren((size_t)size);
+ 
+       if(IsReading())
+-        el.resize((int)size);
++        el.resize((size_t)size);
+ 
+       if(m_LazyThreshold > 0 && size > m_LazyThreshold)
+       {
+@@ -756,7 +756,7 @@ public:
+     else
+     {
+       if(IsReading())
+-        el.resize((int)size);
++        el.resize((size_t)size);
+ 
+       for(size_t i = 0; i < (size_t)size; i++)
+         SerialiseDispatch<Serialiser, U>::Do(*this, el[i]);
+@@ -1271,7 +1271,8 @@ public:
+     if(IsReading())
+     {
+       m_Read->Read(len);
+-      el.resize((int)len);
++      VerifyArraySize(len);
++      el.resize((size_t)len);
+       if(len > 0)
+         m_Read->Read(&el[0], len);
+     }
+@@ -1386,13 +1387,20 @@ private:
+     }
+   };
+ 
+-  void VerifyArraySize(uint64_t &count)
++  template <typename intSize>
++  void VerifyArraySize(intSize &count)
+   {
+     uint64_t size = m_Read->GetSize();
+ 
+-    // for streaming, just take 4GB as a 'semi reasonable' upper limit for array sizes
++// for streaming, just take 4GB as a 'semi reasonable' upper limit for array sizes
++// use 1GB on 32-bit to avoid overflows
++#if ENABLED(RDOC_X64)
+     if(m_DataStreaming)
+       size = 0xFFFFFFFFU;
++#else
++    if(m_DataStreaming)
++      size = 0x3FFFFFFFU;
++#endif
+ 
+     if(count > size)
+     {
meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-2.patch new file +72 -0

72 lines not on this page · raw message

meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-3.patch new file +160 -0

160 lines not on this page · raw message

meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-4.patch new file +28 -0
new file mode 100644
index 0000000000..99a68e6579
@@ -0,0 +1,28 @@
+From a3ddb69c93a39901c2659a165a119f001cf8b1f4 Mon Sep 17 00:00:00 2001
+From: baldurk <[email protected]>
+Date: Fri, 19 May 2023 10:47:12 +0100
+Subject: [PATCH] Don't open symlinks when opening logfile
+
+CVE: CVE-2023-33836 CVE-2023-33864 CVE-2023-33865
+Upstream-Status: Backport [https://github.com/baldurk/renderdoc/commit/203fc8382a79d53d2035613d9425d966b1d4958e]
+
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ renderdoc/os/posix/posix_stringio.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/renderdoc/os/posix/posix_stringio.cpp b/renderdoc/os/posix/posix_stringio.cpp
+index 59701e532..6f4389773 100644
+--- a/renderdoc/os/posix/posix_stringio.cpp
++++ b/renderdoc/os/posix/posix_stringio.cpp
+@@ -499,8 +499,8 @@ rdcstr logfile_readall(uint64_t offset, const rdcstr &filename)
+ 
+ LogFileHandle *logfile_open(const rdcstr &filename)
+ {
+-  int fd =
+-      open(filename.c_str(), O_APPEND | O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
++  int fd = open(filename.c_str(), O_APPEND | O_WRONLY | O_CREAT | O_NOFOLLOW,
++                S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ 
+   if(fd < 0)
+   {
meta-oe/recipes-graphics/renderdoc/renderdoc/CVE-2023-33863-33864-33865-5.patch new file +40 -0
new file mode 100644
index 0000000000..f1aa4c0591
@@ -0,0 +1,40 @@
+From 3be494014166fbccd1b951aeeb26534d44ceab37 Mon Sep 17 00:00:00 2001
+From: baldurk <[email protected]>
+Date: Fri, 19 May 2023 10:58:29 +0100
+Subject: [PATCH] Fix incorrect return type
+
+CVE: CVE-2023-33836 CVE-2023-33864 CVE-2023-33865
+Upstream-Status: Backport [https://github.com/baldurk/renderdoc/commit/771aa8e769b72e6a36b31d6e2116db9952dcbe9b]
+
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ renderdoc/strings/string_utils.cpp | 2 +-
+ renderdoc/strings/string_utils.h   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/renderdoc/strings/string_utils.cpp b/renderdoc/strings/string_utils.cpp
+index 019a83c3a..7c42ede4e 100644
+--- a/renderdoc/strings/string_utils.cpp
++++ b/renderdoc/strings/string_utils.cpp
+@@ -141,7 +141,7 @@ rdcstr strip_extension(const rdcstr &path)
+   return path.substr(0, offs);
+ }
+ 
+-rdcstr strip_nonbasic(rdcstr &str)
++void strip_nonbasic(rdcstr &str)
+ {
+   for(char &c : str)
+   {
+diff --git a/renderdoc/strings/string_utils.h b/renderdoc/strings/string_utils.h
+index 7c05a30f8..58c6b4f9c 100644
+--- a/renderdoc/strings/string_utils.h
++++ b/renderdoc/strings/string_utils.h
+@@ -40,7 +40,7 @@ rdcstr strip_extension(const rdcstr &path);
+ // remove everything but alphanumeric ' ' and '.'
+ // It replaces everything else with _
+ // for logging strings where they might contain garbage characters
+-rdcstr strip_nonbasic(rdcstr &str);
++void strip_nonbasic(rdcstr &str);
+ 
+ void split(const rdcstr &in, rdcarray<rdcstr> &out, const char sep);
+ void merge(const rdcarray<rdcstr> &in, rdcstr &out, const char sep);
meta-oe/recipes-graphics/renderdoc/renderdoc_1.13.bb +8 -4
index ceff54f46a..492a873c00 100644
@@ -5,10 +5,14 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5486c0df458c74c85828e0cdbffd499e"
 
 SRCREV = "cc05b288b6d1660ab04c6cf01173f1bb62e6f5dd"
-SRC_URI = " \
-    git://github.com/baldurk/${BPN}.git;protocol=https;branch=v1.x \
-    file://0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch \
-"
+SRC_URI = "git://github.com/baldurk/${BPN}.git;protocol=https;branch=v1.x \
+           file://0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch \
+           file://CVE-2023-33863-33864-33865-1.patch \
+           file://CVE-2023-33863-33864-33865-2.patch \
+           file://CVE-2023-33863-33864-33865-3.patch \
+           file://CVE-2023-33863-33864-33865-4.patch \
+           file://CVE-2023-33863-33864-33865-5.patch \
+           "
 S = "${WORKDIR}/git"
 
 DEPENDS += "virtual/libx11 virtual/libgl libxcb xcb-util-keysyms vim-native"