From 057e1f5d06aac14170c17622b19931f7103e3b83 Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Sat, 11 Oct 2025 20:13:31 +0200 Subject: [PATCH] freerdp3: patch CVE-2024-32040 Details: https://nvd.nist.gov/vuln/detail/CVE-2024-32040 Pick the patch that is marked to resolve the related github advisory. Signed-off-by: Gyorgy Sarvari Signed-off-by: Anuj Mittal --- .../freerdp/freerdp3/CVE-2024-32040.patch | 29 +++++++++++++++++++ .../recipes-support/freerdp/freerdp3_3.4.0.bb | 1 + 2 files changed, 30 insertions(+) create mode 100644 meta-oe/recipes-support/freerdp/freerdp3/CVE-2024-32040.patch diff --git a/meta-oe/recipes-support/freerdp/freerdp3/CVE-2024-32040.patch b/meta-oe/recipes-support/freerdp/freerdp3/CVE-2024-32040.patch new file mode 100644 index 0000000000..10b89e577f --- /dev/null +++ b/meta-oe/recipes-support/freerdp/freerdp3/CVE-2024-32040.patch @@ -0,0 +1,29 @@ +From f29088d17903aa8e58073b9811dc8a72f94cf4fb Mon Sep 17 00:00:00 2001 +From: akallabeth +Date: Tue, 16 Apr 2024 08:26:37 +0200 +Subject: [PATCH] fix missing check + +in nsc_rle_decode abort if there are more bytes to be read then there +are left. + +CVE: CVE-2024-32040 +Upstream-Status: Backport [https://github.com/FreeRDP/FreeRDP/commit/d58cbc96aced4d082abf92b41a415a891c7ea309] + +Signed-off-by: Gyorgy Sarvari +--- + libfreerdp/codec/nsc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libfreerdp/codec/nsc.c b/libfreerdp/codec/nsc.c +index 049b541f1..c2d92e48c 100644 +--- a/libfreerdp/codec/nsc.c ++++ b/libfreerdp/codec/nsc.c +@@ -160,7 +160,7 @@ static BOOL nsc_rle_decode(const BYTE* in, size_t inSize, BYTE* out, UINT32 outS + len |= ((UINT32)(*in++)) << 24U; + } + +- if (outSize < len) ++ if ((outSize < len) || (left < len)) + return FALSE; + + outSize -= len; diff --git a/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb b/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb index b07d7d139b..19ba893724 100644 --- a/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb +++ b/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb @@ -10,6 +10,7 @@ inherit pkgconfig cmake SRCREV = "708f3764897e06297469a7b0507b3c9ecc041ad7" SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=master;protocol=https \ file://CVE-2024-32039.patch \ + file://CVE-2024-32040.patch \ " S = "${WORKDIR}/git"