mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 08:10:03 +01:00
os: Check for integer overflow on BigRequest length
Check for another possible integer overflow once we get a complete xReq with BigRequest. Related to CVE-2025-49176 Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Suggested-by: Peter Harris <pharris2@rocketsoftware.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2028>
This commit is contained in:
parent
2a0f6ec920
commit
4fc4d76b2c
1 changed files with 2 additions and 0 deletions
2
os/io.c
2
os/io.c
|
|
@ -394,6 +394,8 @@ ReadRequestFromClient(ClientPtr client)
|
|||
needed = get_big_req_len(request, client);
|
||||
}
|
||||
client->req_len = needed;
|
||||
if (needed > MAXINT >> 2)
|
||||
return -(BadLength);
|
||||
needed <<= 2;
|
||||
}
|
||||
if (gotnow < needed) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue