mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-04 04:50:33 +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>
(cherry picked from commit 4fc4d76b2c)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2030>
This commit is contained in:
parent
2c5e87e3df
commit
d2a7903154
1 changed files with 2 additions and 0 deletions
2
os/io.c
2
os/io.c
|
|
@ -398,6 +398,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