Import fix for CVE-2022-39282 (Closes: #1021659)

This commit is contained in:
Tobias Frost 2023-11-12 12:44:19 +01:00
parent ad925990b3
commit 1cddd4643a
3 changed files with 36 additions and 0 deletions

1
debian/changelog vendored
View File

@ -11,6 +11,7 @@ freerdp2 (2.3.0+dfsg1-2+deb10u4) buster-security; urgency=medium
- CVE-2022-39319 - Missing length validation in urbdrc channel
- CVE-2022-39347 - Missing path sanitation with `drive` channel
- CVE-2022-41877 - Missing input length validation in `drive` channel
* Import fix for CVE-2022-39282 (Closes: #1021659)
* Previous upload had a typo in the CVE list: It was CVE 2023-40567 not
CVE 2023-39357; fixing changelog entry.

View File

@ -0,0 +1,34 @@
From 60aac2abf0740dd36b62712fba91498fd6e055fe Mon Sep 17 00:00:00 2001
From: akallabeth <akallabeth@posteo.net>
Date: Thu, 6 Oct 2022 09:12:40 +0200
Subject: [PATCH] Fix length checks in parallel driver
The length requested was not checked against the length read from
the port.
(cherry picked from commit 094cc5a4596c299595b732effd59ee149181fd61)
---
channels/parallel/client/parallel_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/channels/parallel/client/parallel_main.c b/channels/parallel/client/parallel_main.c
index af3e82703a60..993605a65e23 100644
--- a/channels/parallel/client/parallel_main.c
+++ b/channels/parallel/client/parallel_main.c
@@ -159,7 +159,7 @@ static UINT parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp)
return ERROR_INVALID_DATA;
Stream_Read_UINT32(irp->input, Length);
Stream_Read_UINT64(irp->input, Offset);
- buffer = (BYTE*)malloc(Length);
+ buffer = (BYTE*)calloc(Length, sizeof(BYTE));
if (!buffer)
{
@@ -178,6 +178,7 @@ static UINT parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp)
}
else
{
+ Length = status;
}
Stream_Write_UINT32(irp->output, Length);

View File

@ -46,3 +46,4 @@
0055-CVE-2022-39319.patch
0056-CVE-2022-39347.patch
0057-CVE-2022-41877.patch
0058-CVE-2022-39282.patch