diff options
| author | Ankur Tyagi <ankur.tyagi85@gmail.com> | 2026-04-09 19:09:11 +1200 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@oss.qualcomm.com> | 2026-04-13 12:40:21 +0530 |
| commit | 2d96f24f2d12ad5534d1ed27bd42fe1017b2c394 (patch) | |
| tree | d348f03e742f0acac880cf3186d8c5e3b470b976 /meta-oe | |
| parent | 53ab8b4a5a20eda6524c410a45c6e901b348c455 (diff) | |
| download | meta-openembedded-2d96f24f2d12ad5534d1ed27bd42fe1017b2c394.tar.gz | |
freerdp3: fix CVE-2026-29774
Details: https://nvd.nist.gov/vuln/detail/CVE-2026-29774
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-support/freerdp/freerdp3/CVE-2026-29774.patch | 75 | ||||
| -rw-r--r-- | meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb | 1 |
2 files changed, 76 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/freerdp/freerdp3/CVE-2026-29774.patch b/meta-oe/recipes-support/freerdp/freerdp3/CVE-2026-29774.patch new file mode 100644 index 0000000000..aaf83fd90c --- /dev/null +++ b/meta-oe/recipes-support/freerdp/freerdp3/CVE-2026-29774.patch | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | From b590224c94effa3104a2db98a59478a9c4ed6f02 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Armin Novak <armin.novak@thincast.com> | ||
| 3 | Date: Sat, 28 Feb 2026 11:38:23 +0100 | ||
| 4 | Subject: [PATCH] [codec,h264] validate rectangles before use | ||
| 5 | |||
| 6 | CVE: CVE-2026-29774 | ||
| 7 | Upstream-Status: Backport [https://github.com/FreeRDP/FreeRDP/commit/6482b7a92fff3959582cef052d1967ad6bde3738] | ||
| 8 | Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> | ||
| 9 | --- | ||
| 10 | libfreerdp/codec/h264.c | 38 ++++++++++++++++++++++++++++++++++++++ | ||
| 11 | 1 file changed, 38 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/libfreerdp/codec/h264.c b/libfreerdp/codec/h264.c | ||
| 14 | index 718bd2ccf..13d592600 100644 | ||
| 15 | --- a/libfreerdp/codec/h264.c | ||
| 16 | +++ b/libfreerdp/codec/h264.c | ||
| 17 | @@ -91,6 +91,36 @@ BOOL avc420_ensure_buffer(H264_CONTEXT* h264, UINT32 stride, UINT32 width, UINT3 | ||
| 18 | return TRUE; | ||
| 19 | } | ||
| 20 | |||
| 21 | +static BOOL isRectValid(UINT32 width, UINT32 height, const RECTANGLE_16* rect) | ||
| 22 | +{ | ||
| 23 | + WINPR_ASSERT(rect); | ||
| 24 | + if (rect->left > width) | ||
| 25 | + return FALSE; | ||
| 26 | + if (rect->right > width) | ||
| 27 | + return FALSE; | ||
| 28 | + if (rect->left >= rect->right) | ||
| 29 | + return FALSE; | ||
| 30 | + if (rect->top > height) | ||
| 31 | + return FALSE; | ||
| 32 | + if (rect->bottom > height) | ||
| 33 | + return FALSE; | ||
| 34 | + if (rect->top >= rect->bottom) | ||
| 35 | + return FALSE; | ||
| 36 | + return TRUE; | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +static BOOL areRectsValid(UINT32 width, UINT32 height, const RECTANGLE_16* rects, UINT32 count) | ||
| 40 | +{ | ||
| 41 | + WINPR_ASSERT(rects || (count == 0)); | ||
| 42 | + for (size_t x = 0; x < count; x++) | ||
| 43 | + { | ||
| 44 | + const RECTANGLE_16* rect = &rects[x]; | ||
| 45 | + if (!isRectValid(width, height, rect)) | ||
| 46 | + return FALSE; | ||
| 47 | + } | ||
| 48 | + return TRUE; | ||
| 49 | +} | ||
| 50 | + | ||
| 51 | INT32 avc420_decompress(H264_CONTEXT* h264, const BYTE* pSrcData, UINT32 SrcSize, BYTE* pDstData, | ||
| 52 | DWORD DstFormat, UINT32 nDstStep, UINT32 nDstWidth, UINT32 nDstHeight, | ||
| 53 | const RECTANGLE_16* regionRects, UINT32 numRegionRects) | ||
| 54 | @@ -101,6 +131,9 @@ INT32 avc420_decompress(H264_CONTEXT* h264, const BYTE* pSrcData, UINT32 SrcSize | ||
| 55 | if (!h264 || h264->Compressor) | ||
| 56 | return -1001; | ||
| 57 | |||
| 58 | + if (!areRectsValid(nDstWidth, nDstHeight, regionRects, numRegionRects)) | ||
| 59 | + return -1013; | ||
| 60 | + | ||
| 61 | status = h264->subsystem->Decompress(h264, pSrcData, SrcSize); | ||
| 62 | |||
| 63 | if (status == 0) | ||
| 64 | @@ -523,6 +556,11 @@ INT32 avc444_decompress(H264_CONTEXT* h264, BYTE op, const RECTANGLE_16* regionR | ||
| 65 | if (!h264 || !regionRects || !pSrcData || !pDstData || h264->Compressor) | ||
| 66 | return -1001; | ||
| 67 | |||
| 68 | + if (!areRectsValid(nDstWidth, nDstHeight, regionRects, numRegionRects)) | ||
| 69 | + return -1013; | ||
| 70 | + if (!areRectsValid(nDstWidth, nDstHeight, auxRegionRects, numAuxRegionRect)) | ||
| 71 | + return -1014; | ||
| 72 | + | ||
| 73 | switch (op) | ||
| 74 | { | ||
| 75 | case 0: /* YUV420 in stream 1 | ||
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 715354768a..f92d824d66 100644 --- a/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb +++ b/meta-oe/recipes-support/freerdp/freerdp3_3.4.0.bb | |||
| @@ -31,6 +31,7 @@ SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=master;protocol=https \ | |||
| 31 | file://CVE-2026-24681.patch \ | 31 | file://CVE-2026-24681.patch \ |
| 32 | file://CVE-2026-24682.patch \ | 32 | file://CVE-2026-24682.patch \ |
| 33 | file://CVE-2026-24683.patch \ | 33 | file://CVE-2026-24683.patch \ |
| 34 | file://CVE-2026-29774.patch \ | ||
| 34 | " | 35 | " |
| 35 | 36 | ||
| 36 | S = "${WORKDIR}/git" | 37 | S = "${WORKDIR}/git" |
