From 899afa4c1097ed99858754677c37e1792ed3338f Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 18 Jun 2025 08:39:02 +0200 Subject: [PATCH] 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 Suggested-by: Peter Harris Part-of: --- os/io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os/io.c b/os/io.c index ba12c7e61..948660996 100644 --- a/os/io.c +++ b/os/io.c @@ -395,6 +395,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) {