mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-15 16:07:26 +00:00
freerdp: patch CVE-2023-40181
Details: https://nvd.nist.gov/vuln/detail/CVE-2023-40181 Pick the patch that was identified[1] by Debian as the solution. [1]: https://security-tracker.debian.org/tracker/CVE-2023-40181 Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
From de011238a720cf80a7f96ee0d7a43d85fbc0552f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Armin Novak <armin.novak@thincast.com>
|
||||||
|
Date: Mon, 21 Aug 2023 14:30:11 +0200
|
||||||
|
Subject: [PATCH] fix cBitsRemaining calculation
|
||||||
|
|
||||||
|
fixed out of bound read reported by @pwn2carr
|
||||||
|
|
||||||
|
(cherry picked from commit c39c82277a73332e9c1b64db98a34559f424fe20)
|
||||||
|
|
||||||
|
CVE: CVE-2023-40181
|
||||||
|
Upstream-Status: Backport [https://github.com/FreeRDP/FreeRDP/commit/c23cbdc4a5756bd723223c7139654de7439fdcc0]
|
||||||
|
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
|
||||||
|
---
|
||||||
|
libfreerdp/codec/zgfx.c | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libfreerdp/codec/zgfx.c b/libfreerdp/codec/zgfx.c
|
||||||
|
index 04ddeadb2..4489b3798 100644
|
||||||
|
--- a/libfreerdp/codec/zgfx.c
|
||||||
|
+++ b/libfreerdp/codec/zgfx.c
|
||||||
|
@@ -259,7 +259,11 @@ static BOOL zgfx_decompress_segment(ZGFX_CONTEXT* zgfx, wStream* stream, size_t
|
||||||
|
zgfx->pbInputCurrent = pbSegment;
|
||||||
|
zgfx->pbInputEnd = &pbSegment[cbSegment - 1];
|
||||||
|
/* NumberOfBitsToDecode = ((NumberOfBytesToDecode - 1) * 8) - ValueOfLastByte */
|
||||||
|
- zgfx->cBitsRemaining = 8 * (cbSegment - 1) - *zgfx->pbInputEnd;
|
||||||
|
+ const UINT32 bits = 8u * (cbSegment - 1u);
|
||||||
|
+ if (bits < *zgfx->pbInputEnd)
|
||||||
|
+ return FALSE;
|
||||||
|
+
|
||||||
|
+ zgfx->cBitsRemaining = bits - *zgfx->pbInputEnd;
|
||||||
|
zgfx->cBitsCurrent = 0;
|
||||||
|
zgfx->BitsCurrent = 0;
|
||||||
|
|
||||||
@@ -25,6 +25,7 @@ SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https
|
|||||||
file://CVE-2023-39351.patch \
|
file://CVE-2023-39351.patch \
|
||||||
file://CVE-2023-39352.patch \
|
file://CVE-2023-39352.patch \
|
||||||
file://CVE-2023-39353.patch \
|
file://CVE-2023-39353.patch \
|
||||||
|
file://CVE-2023-40181.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|||||||
Reference in New Issue
Block a user