Skip to content

Commit

Permalink
Fixed input sanitation in rdpgfx_recv_solid_fill_pdu
Browse files Browse the repository at this point in the history
The input rectangle must be checked for plausibility.

Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
  • Loading branch information
akallabeth authored and bmiklautz committed Jul 20, 2020
1 parent efdc995 commit 4039370
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions channels/rdpgfx/rdpgfx_common.c
Expand Up @@ -182,6 +182,10 @@ UINT rdpgfx_read_rect16(wStream* s, RECTANGLE_16* rect16)
Stream_Read_UINT16(s, rect16->top); /* top (2 bytes) */
Stream_Read_UINT16(s, rect16->right); /* right (2 bytes) */
Stream_Read_UINT16(s, rect16->bottom); /* bottom (2 bytes) */
if (rect16->left >= rect16->right)
return ERROR_INVALID_DATA;
if (rect16->top >= rect16->bottom)
return ERROR_INVALID_DATA;
return CHANNEL_RC_OK;
}

Expand Down

0 comments on commit 4039370

Please sign in to comment.