mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 17:30:02 +01:00
record: Fix out of bounds access in SwapCreateRegister()
ZDI-CAN-14952, CVE-2021-4011 This vulnerability was discovered and the fix was suggested by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
parent
4de9666b6d
commit
e56f61c79f
1 changed files with 2 additions and 2 deletions
|
|
@ -2516,8 +2516,8 @@ SwapCreateRegister(ClientPtr client, xRecordRegisterClientsReq * stuff)
|
||||||
swapl(pClientID);
|
swapl(pClientID);
|
||||||
}
|
}
|
||||||
if (stuff->nRanges >
|
if (stuff->nRanges >
|
||||||
client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
|
(client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
|
||||||
- stuff->nClients)
|
- stuff->nClients) / bytes_to_int32(sz_xRecordRange))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
RecordSwapRanges((xRecordRange *) pClientID, stuff->nRanges);
|
RecordSwapRanges((xRecordRange *) pClientID, stuff->nRanges);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue