31 lines
921 B
Diff
31 lines
921 B
Diff
|
From e503ce71bde7ca0817c2f5f4e1561a33a971af46 Mon Sep 17 00:00:00 2001
|
||
|
From: matt335672 <30179339+matt335672@users.noreply.github.com>
|
||
|
Date: Wed, 7 Dec 2022 10:03:24 +0000
|
||
|
Subject: [PATCH 8/9] CVE-2022-23484
|
||
|
|
||
|
Add check for RAIL window text size
|
||
|
---
|
||
|
xrdp/xrdp_mm.c | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
|
||
|
index bc7b1b83..b59345d7 100644
|
||
|
--- a/xrdp/xrdp_mm.c
|
||
|
+++ b/xrdp/xrdp_mm.c
|
||
|
@@ -938,6 +938,12 @@ xrdp_mm_process_rail_update_window_text(struct xrdp_mm *self, struct stream *s)
|
||
|
|
||
|
g_memset(&rwso, 0, sizeof(rwso));
|
||
|
in_uint32_le(s, size); /* title size */
|
||
|
+ if (size < 0 || !s_check_rem(s, size))
|
||
|
+ {
|
||
|
+ LOG(LOG_LEVEL_ERROR, "%s : invalid window text size %d",
|
||
|
+ __func__, size);
|
||
|
+ return 1;
|
||
|
+ }
|
||
|
rwso.title_info = g_new(char, size + 1);
|
||
|
in_uint8a(s, rwso.title_info, size);
|
||
|
rwso.title_info[size] = 0;
|
||
|
--
|
||
|
2.39.0
|
||
|
|