From 6f1eda171517ec92ce05c0d98a427956dde6ab1f Mon Sep 17 00:00:00 2001
From: matt335672 <30179339+matt335672@users.noreply.github.com>
Date: Mon, 15 Jun 2026 11:23:08 +0100
Subject: [PATCH] CVE-2026-55645: OOB read in Client Control PDU processing

(cherry picked from commit b1edb60c1de4cbf2119f3a79358df32d5a1d2db0)
---
 libxrdp/xrdp_rdp.c | 4 ++++
 1 file changed, 4 insertions(+)

--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -1141,6 +1141,10 @@ xrdp_rdp_process_data_control(struct xrd
 {
     int action;
 
+    if (!s_check_rem_and_log(s, 8, "Parsing [MS-RDPBCGR] TS_CONTROL_PDU"))
+    {
+        return 1;
+    }
     in_uint16_le(s, action);
     in_uint8s(s, 2); /* user id */
     in_uint8s(s, 4); /* control id */
