From patchwork Thu Aug 14 13:58:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 68517 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E4BFCA0EDC for ; Thu, 14 Aug 2025 13:58:53 +0000 (UTC) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mx.groups.io with SMTP id smtpd.web11.23240.1755179928584953930 for ; Thu, 14 Aug 2025 06:58:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=ekoqFaTk; spf=pass (domain: mvista.com, ip: 209.85.210.176, mailfrom: vanusuri@mvista.com) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-76e2ebe86ecso1249708b3a.3 for ; Thu, 14 Aug 2025 06:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1755179927; x=1755784727; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tGMBgqrHySVNe7Aq1GWQ+YU4zIoJCGxZiBdEqXCVjEY=; b=ekoqFaTksTyCUtnu1k8J2InX+jJmUVouGY+79u2npth76fI9PJEX1FdL+sNjRwQqEd l+nWwI9deQ6iA06nPn1GilK14gXj3gHkXy6WoohZl7Q/jIafzEFS880FMJ63qZhtPef/ 7goYHdYMFV3yJx/QN7rvWS0W9/7UMXFeeyiA0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755179927; x=1755784727; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tGMBgqrHySVNe7Aq1GWQ+YU4zIoJCGxZiBdEqXCVjEY=; b=I5skZiRMhGuOo+XH31Wa8BMdgfQRENBtBNkePahuaRSErZkiCfBTmCJI0LKFnoKSzE PIxgBQtdu6GQCLqJtawFhFhMbuXm1gfTh8zhjltLGbmm5Y+umKLTMX4EADqbs0vIhOf8 v2+af1U7GEwcXHU5FBDcxS1ZfJ8forNcsR7Qo5WzR7qVO6lxoogk7p33EYjwnDY5CnQ9 33RBIG1/ZDqIIpJIrdL3+CMmqvoZ6xZcRuFJU8JOryrUo4o/5pnCbK4vSif4N1Yw7upT O+MhBrYhK4MxPb+UsTBjroMFq/nzfrN0j5IILvh0gRgRXc8Hr/QJNIGRcr2x0u6dHwH/ KFjw== X-Gm-Message-State: AOJu0Ywf2hb4XokirZoh6F83HWm9K1+qozARLDIh+IqSBs30nQP9bc+6 I4xpfpXeRS9cnXJ8F+c6oNQ5znhfixccL6anq+cYqUm7698FV9M6cNTdmxgLO033oyj6gPSs0th Fot6+r7M= X-Gm-Gg: ASbGncvJItJWtJCHI6Eaa5A5Dfeo9cxwx21FTu5Koysjjtsfq6VgbA2sDGEyQd8KM2J 4vyOk1q4S0zfobhchBjlcZqSG/+dctI+W/jQDIBsDWEhndr0FR2Olg1dnIRDYWCsoLwt5mKfcUK DKUo8oMgu1y3kdMM9cJj6NOYmF1D5BeuJV85npbVJXs+FMTQ87ekdR7K9IlxgeIfjkDsdS3NZ9h o5U+nYr6dVABLd/fm+bOL4kl6hf3qYT6yEM/u8VOTYGAUBbQzYAzOgT6pxQDOcaAmZ4bPNV0pCa WrQIgIFv9uL5WCQG4eZumCmxTHscSLG9DhJv4T345Zdc6kq5efJ/E7fJSnxFyaRRzsQo/axI8ks R41pOKIUGIoT7ozu+xidbDCY0oeDVTyNnlw== X-Google-Smtp-Source: AGHT+IExgBbqUrxmrYom5ZHeXgfOFt0IoPfwFMJpOVjTm368mWU0hMkS4nz2UWZZLPTvx8RGhrsL5w== X-Received: by 2002:a05:6a20:3d89:b0:232:57c8:1bf4 with SMTP id adf61e73a8af0-240bcfbdc2emr5328856637.9.1755179927426; Thu, 14 Aug 2025 06:58:47 -0700 (PDT) Received: from localhost.localdomain ([49.207.229.79]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3233100c1d0sm1919591a91.17.2025.08.14.06.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Aug 2025 06:58:46 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 1/3] xserver-xorg: Fix for CVE-2025-49175 Date: Thu, 14 Aug 2025 19:28:29 +0530 Message-Id: <20250814135831.981377-1-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 14 Aug 2025 13:58:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221864 From: Vijay Anusuri Upstream-Status: Backport from https://gitlab.freedesktop.org/xorg/xserver/-/commit/0885e0b26225c90534642fe911632ec0779eebee Signed-off-by: Vijay Anusuri --- .../xserver-xorg/CVE-2025-49175.patch | 91 +++++++++++++++++++ .../xorg-xserver/xserver-xorg_21.1.8.bb | 1 + 2 files changed, 92 insertions(+) create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49175.patch diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49175.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49175.patch new file mode 100644 index 0000000000..2f56a8f6b9 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49175.patch @@ -0,0 +1,91 @@ +From 0885e0b26225c90534642fe911632ec0779eebee Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Fri, 28 Mar 2025 09:43:52 +0100 +Subject: [PATCH] render: Avoid 0 or less animated cursors +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Animated cursors use a series of cursors that the client can set. + +By default, the Xserver assumes at least one cursor is specified +while a client may actually pass no cursor at all. + +That causes an out-of-bound read creating the animated cursor and a +crash of the Xserver: + + | Invalid read of size 8 + | at 0x5323F4: AnimCursorCreate (animcur.c:325) + | by 0x52D4C5: ProcRenderCreateAnimCursor (render.c:1817) + | by 0x52DC80: ProcRenderDispatch (render.c:1999) + | by 0x4A1E9D: Dispatch (dispatch.c:560) + | by 0x4B0169: dix_main (main.c:284) + | by 0x4287F5: main (stubmain.c:34) + | Address 0x59aa010 is 0 bytes after a block of size 0 alloc'd + | at 0x48468D3: reallocarray (vg_replace_malloc.c:1803) + | by 0x52D3DA: ProcRenderCreateAnimCursor (render.c:1802) + | by 0x52DC80: ProcRenderDispatch (render.c:1999) + | by 0x4A1E9D: Dispatch (dispatch.c:560) + | by 0x4B0169: dix_main (main.c:284) + | by 0x4287F5: main (stubmain.c:34) + | + | Invalid read of size 2 + | at 0x5323F7: AnimCursorCreate (animcur.c:325) + | by 0x52D4C5: ProcRenderCreateAnimCursor (render.c:1817) + | by 0x52DC80: ProcRenderDispatch (render.c:1999) + | by 0x4A1E9D: Dispatch (dispatch.c:560) + | by 0x4B0169: dix_main (main.c:284) + | by 0x4287F5: main (stubmain.c:34) + | Address 0x8 is not stack'd, malloc'd or (recently) free'd + +To avoid the issue, check the number of cursors specified and return a +BadValue error in both the proc handler (early) and the animated cursor +creation (as this is a public function) if there is 0 or less cursor. + +CVE-2025-49175 + +This issue was discovered by Nils Emmerich and +reported by Julian Suleder via ERNW Vulnerability Disclosure. + +Signed-off-by: Olivier Fourdan +Reviewed-by: José Expósito +Part-of: + +Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/0885e0b26225c90534642fe911632ec0779eebee] +CVE: CVE-2025-49175 +Signed-off-by: Vijay Anusuri +--- + render/animcur.c | 3 +++ + render/render.c | 2 ++ + 2 files changed, 5 insertions(+) + +diff --git a/render/animcur.c b/render/animcur.c +index f906cd8130..1194cee7e7 100644 +--- a/render/animcur.c ++++ b/render/animcur.c +@@ -305,6 +305,9 @@ AnimCursorCreate(CursorPtr *cursors, CARD32 *deltas, int ncursor, + int rc = BadAlloc, i; + AnimCurPtr ac; + ++ if (ncursor <= 0) ++ return BadValue; ++ + for (i = 0; i < screenInfo.numScreens; i++) + if (!GetAnimCurScreen(screenInfo.screens[i])) + return BadImplementation; +diff --git a/render/render.c b/render/render.c +index 113f6e0c5a..fe9f03c8c8 100644 +--- a/render/render.c ++++ b/render/render.c +@@ -1799,6 +1799,8 @@ ProcRenderCreateAnimCursor(ClientPtr client) + ncursor = + (client->req_len - + (bytes_to_int32(sizeof(xRenderCreateAnimCursorReq)))) >> 1; ++ if (ncursor <= 0) ++ return BadValue; + cursors = xallocarray(ncursor, sizeof(CursorPtr) + sizeof(CARD32)); + if (!cursors) + return BadAlloc; +-- +GitLab + diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb index 6790eb0921..565489a926 100644 --- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb @@ -36,6 +36,7 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat file://CVE-2025-26601-3.patch \ file://CVE-2025-26601-4.patch \ file://CVE-2022-49737.patch \ + file://CVE-2025-49175.patch \ " SRC_URI[sha256sum] = "38aadb735650c8024ee25211c190bf8aad844c5f59632761ab1ef4c4d5aeb152" From patchwork Thu Aug 14 13:58:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 68519 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3578CA0EDC for ; Thu, 14 Aug 2025 13:59:02 +0000 (UTC) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mx.groups.io with SMTP id smtpd.web11.23245.1755179934995117044 for ; Thu, 14 Aug 2025 06:58:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=aFTwCGt8; spf=pass (domain: mvista.com, ip: 209.85.216.42, mailfrom: vanusuri@mvista.com) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-323267bc0a8so1627228a91.1 for ; Thu, 14 Aug 2025 06:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1755179934; x=1755784734; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OJ+rylSJPE6o39FoCnY4KkQB9DfgSfwdhCCftXE9SzY=; b=aFTwCGt8w5XiXTucqqn/7zCcrpnHXg2JSgK0sff9EB2TL7k6dpBJ3iYTBLgoZM1Tdz 2QyzDiCu5G534jWp8gCYiu2+cSkI3DAJRR1e8DYiMbc2imX63HiGbjCtfswqQLMLY5z1 8QREAVTbODeQ9WLGVykXZIGMZUfI4kwBwW1wk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755179934; x=1755784734; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OJ+rylSJPE6o39FoCnY4KkQB9DfgSfwdhCCftXE9SzY=; b=dVto9r1m90SjFItxLB/mBY/9j8uwRv6JfQ7SESxtSMIoEmnpzjxP2fEMEp3na7WMP1 RwW/CW+GdBMH+V2IaRO1E+WVtubw2jj7ttGGDnVEg+Mh4imkMJwVrvA0A1amI27mdYws xegldpfA14Za0RPPNLofce4EPuN5FF4C6GQmpU0sIbtST497ZOJvtKI8i82v/5iT7oO2 jHYUJV+/7Rwwzq05oJh0jkl2+kUPI/j/QTE1kTBafbAROkGvkhxJqP6TXhfep2LcL8b4 bBpLlViBqA8pQFVM+JUDCSfK+20exrdY4Zh1euhy7u2AXDqaDr5xYy/md+tfiU/lH/xv ufmw== X-Gm-Message-State: AOJu0YxNll/LQANjH6Yoy4o0E27eiT7IpGmC/x6SB7IdsePs3j0i+xes VXYrYALQqJTQQYQXCaT3dfolVXvPCYpKD0mGFiuoIZsvMuHNI0EzJYA7RHxiF66vqnAw31Livz+ BK3vBgSA= X-Gm-Gg: ASbGncvkYjHbyAmEU8AaqfvzXO8sd+Xcc2XBzDwyM1XbRo717s5iWwDThMLCyX+NjSL rabSUumDY16Sb0KQIIswFM2zc4Ws6nYQC/g0J97rKcsXEhs/QJGUn72RaO2AddWRr7oNDq9slPh qxQqMHzJsAtsV6XQX7jLqnnqm1z7rRhgdQ0OHbMdjmGXmVE6TMjCfCAzot+UCwRwFCLGQt2awsx cv8Ecyg5YaQgyBRFcPgT0QJuHOYXiggaQEK1anaBswz8qPdzaSPDiXIi2ZDD03iUdJLP1D33SvS TZLg9QFuuW13k9cTlnXyAfzgj1BNzrZiuJXHZjrIkGVG0mjol1v5ESLZrUSm/87pPnsaY7SPTXU 6+COoq8hSHmv28a7B3C/9em4vVyDhyMcXnw== X-Google-Smtp-Source: AGHT+IHbmuOFbPU7hzPFtVxkQlZrweFjyiJjwgTqHOoA+BOqLIAZvv44mxasSWfvuqC3me2DlNZ1BA== X-Received: by 2002:a17:90b:1c92:b0:321:75c1:65b2 with SMTP id 98e67ed59e1d1-32327a4e0d9mr5785519a91.18.1755179933621; Thu, 14 Aug 2025 06:58:53 -0700 (PDT) Received: from localhost.localdomain ([49.207.229.79]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3233100c1d0sm1919591a91.17.2025.08.14.06.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Aug 2025 06:58:53 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 2/3] xserver-xorg: Fix for CVE-2025-49176 Date: Thu, 14 Aug 2025 19:28:30 +0530 Message-Id: <20250814135831.981377-2-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250814135831.981377-1-vanusuri@mvista.com> References: <20250814135831.981377-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 14 Aug 2025 13:59:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221865 From: Vijay Anusuri Upstream-Status: Backport from https://gitlab.freedesktop.org/xorg/xserver/-/commit/03731b326a80b582e48d939fe62cb1e2b10400d9 & https://gitlab.freedesktop.org/xorg/xserver/-/commit/4fc4d76b2c7aaed61ed2653f997783a3714c4fe1 Signed-off-by: Vijay Anusuri --- .../xserver-xorg/CVE-2025-49176-1.patch | 92 +++++++++++++++++++ .../xserver-xorg/CVE-2025-49176-2.patch | 37 ++++++++ .../xorg-xserver/xserver-xorg_21.1.8.bb | 2 + 3 files changed, 131 insertions(+) create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49176-1.patch create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49176-2.patch diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49176-1.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49176-1.patch new file mode 100644 index 0000000000..24c0156540 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49176-1.patch @@ -0,0 +1,92 @@ +From 03731b326a80b582e48d939fe62cb1e2b10400d9 Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Mon, 7 Apr 2025 16:13:34 +0200 +Subject: [PATCH] os: Do not overflow the integer size with BigRequest +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The BigRequest extension allows requests larger than the 16-bit length +limit. + +It uses integers for the request length and checks for the size not to +exceed the maxBigRequestSize limit, but does so after translating the +length to integer by multiplying the given size in bytes by 4. + +In doing so, it might overflow the integer size limit before actually +checking for the overflow, defeating the purpose of the test. + +To avoid the issue, make sure to check that the request size does not +overflow the maxBigRequestSize limit prior to any conversion. + +The caller Dispatch() function however expects the return value to be in +bytes, so we cannot just return the converted value in case of error, as +that would also overflow the integer size. + +To preserve the existing API, we use a negative value for the X11 error +code BadLength as the function only return positive values, 0 or -1 and +update the caller Dispatch() function to take that case into account to +return the error code to the offending client. + +CVE-2025-49176 + +This issue was discovered by Nils Emmerich and +reported by Julian Suleder via ERNW Vulnerability Disclosure. + +Signed-off-by: Olivier Fourdan +Reviewed-by: Michel Dänzer +Part-of: + +Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/03731b326a80b582e48d939fe62cb1e2b10400d9] +CVE: CVE-2025-49176 +Signed-off-by: Vijay Anusuri +--- + dix/dispatch.c | 9 +++++---- + os/io.c | 4 ++++ + 2 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/dix/dispatch.c b/dix/dispatch.c +index b3e5feacc2..2308cfe6d1 100644 +--- a/dix/dispatch.c ++++ b/dix/dispatch.c +@@ -527,9 +527,10 @@ Dispatch(void) + + /* now, finally, deal with client requests */ + result = ReadRequestFromClient(client); +- if (result <= 0) { +- if (result < 0) +- CloseDownClient(client); ++ if (result == 0) ++ break; ++ else if (result == -1) { ++ CloseDownClient(client); + break; + } + +@@ -550,7 +551,7 @@ Dispatch(void) + client->index, + client->requestBuffer); + #endif +- if (result > (maxBigRequestSize << 2)) ++ if (result < 0 || result > (maxBigRequestSize << 2)) + result = BadLength; + else { + result = XaceHookDispatch(client, client->majorOp); +diff --git a/os/io.c b/os/io.c +index 1fffaf62c7..3e39c10e6f 100644 +--- a/os/io.c ++++ b/os/io.c +@@ -300,6 +300,10 @@ ReadRequestFromClient(ClientPtr client) + needed = get_big_req_len(request, client); + } + client->req_len = needed; ++ if (needed > MAXINT >> 2) { ++ /* Check for potential integer overflow */ ++ return -(BadLength); ++ } + needed <<= 2; /* needed is in bytes now */ + } + if (gotnow < needed) { +-- +GitLab + diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49176-2.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49176-2.patch new file mode 100644 index 0000000000..6476af9a85 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49176-2.patch @@ -0,0 +1,37 @@ +From 4fc4d76b2c7aaed61ed2653f997783a3714c4fe1 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: + +Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/4fc4d76b2c7aaed61ed2653f997783a3714c4fe1] +CVE: CVE-2025-49176 #Follow-up Patch +Signed-off-by: Vijay Anusuri +--- + os/io.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/os/io.c b/os/io.c +index e7b76b9cea..167b40a720 100644 +--- a/os/io.c ++++ b/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) { +-- +GitLab + diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb index 565489a926..6013d0e53c 100644 --- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb @@ -37,6 +37,8 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat file://CVE-2025-26601-4.patch \ file://CVE-2022-49737.patch \ file://CVE-2025-49175.patch \ + file://CVE-2025-49176-1.patch \ + file://CVE-2025-49176-2.patch \ " SRC_URI[sha256sum] = "38aadb735650c8024ee25211c190bf8aad844c5f59632761ab1ef4c4d5aeb152" From patchwork Thu Aug 14 13:58:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 68518 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2060CA0EE4 for ; Thu, 14 Aug 2025 13:59:02 +0000 (UTC) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mx.groups.io with SMTP id smtpd.web10.23312.1755179941003176472 for ; Thu, 14 Aug 2025 06:59:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=XzhabJlw; spf=pass (domain: mvista.com, ip: 209.85.216.47, mailfrom: vanusuri@mvista.com) Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-323266d38c2so1245258a91.0 for ; Thu, 14 Aug 2025 06:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1755179940; x=1755784740; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=g6EtRucJCV4WKrGShs8iSEqhS6jqqhRdRjuV8q132f0=; b=XzhabJlwVVyG3QjH/ItEo+tBFXNfnlprN0MnZVfgidHyIT/2Y7fwcDUG1PMvHt/+Xf pagOBNpCqzrh5mCUD0L7QT35bppuq82GGLTyi3rBDXZl9vfo+WzwMdzQigv/vADUUZVI Cr1pRA6wc2aW7dl7c7asy2OVWXs7ue3sfQQHk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755179940; x=1755784740; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g6EtRucJCV4WKrGShs8iSEqhS6jqqhRdRjuV8q132f0=; b=q3IdWl15nqfF26ds9dwoBYpSzXFPZgXbrCOHRaJqC/d5WQcc6lbgeMBc0dswbE+Bo9 1fGo1BCbYN3cgjOJ13VoY8CLhiQXggX1wmgiZiDgOxIg8Hrr5KpvomhsS+hxLKXPhgxt V4ziApyGg4kEzeVtDmayeB0qED23Yc8Cpu5ywlfDMi0nI8u0h3uhmU4SGadTovUqFTeN bps8xoHUHGCQbsaGrl+vA3HW5iftxHdLY6KiOKn3xkZr7SrKc4cs7HfB27sD/P6ymYUK SJ9CJlghczuBDDONWRk+NS+X7DWhgh/b0aOjy7n/+odv+hOIME6myq8BH9eQjHBtvlY4 51Uw== X-Gm-Message-State: AOJu0YzNd04z+glf3hpFR48W45iDidBpAWYz3CKhlGeQGFRBq94U+EcT F26YRq+wLr+cqnVOqLfAmE321ISqFSYxa2u5kDSuXHdB1SU+ZY71tr8kIkHeztwFFNGOHzLg6c3 n/FYyibk= X-Gm-Gg: ASbGncuKbwINDLmnnk0oqCZ3mK1guK+K8vc8AKQpEmWv/TUcn4C/CG4SsxFTCTagEZo 3aTmblAkvdZ0Dmx82HBN4MkNeqNLmgdc3nvy+Qt3vkmFX80e8jeoH91GOE1JljW/LV9Iux7qr/X Im+OzgQhWwh8qikQuKOrJ2X+pdbompLw/xZAOUrYShqpcdqRT1w/OQbiysDoxKe8xlIDb8NSuts BQrtlkVzlKiWwzE1I1tHidEgooDMrDdLNx9CoHL9uLcXn56SqZUO8rd+wJcjVUNLjnhM6JjIVpF jWNpgRBD+SuJw75Yk+BI8m4PlhOVSwMmCmmfuO4WQC3t8L4/lvSz8xy7IV8BTww7/C5CVVMOo9t 82Piqii7grJmS+ayN7ICvV3hJDx33bgHR+w== X-Google-Smtp-Source: AGHT+IGCzQfbEO7bXWluOfhKedkllv/FDWaP/P+xRG6ltB2iC1Z9+CzxRil9st0LSSVRcp3CyQzCXg== X-Received: by 2002:a17:90b:350d:b0:31f:210d:2e56 with SMTP id 98e67ed59e1d1-32327a8a382mr5206591a91.28.1755179939745; Thu, 14 Aug 2025 06:58:59 -0700 (PDT) Received: from localhost.localdomain ([49.207.229.79]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3233100c1d0sm1919591a91.17.2025.08.14.06.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Aug 2025 06:58:59 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 3/3] xserver-xorg: Fix for CVE-2025-49177 Date: Thu, 14 Aug 2025 19:28:31 +0530 Message-Id: <20250814135831.981377-3-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250814135831.981377-1-vanusuri@mvista.com> References: <20250814135831.981377-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 14 Aug 2025 13:59:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221866 From: Vijay Anusuri Upstream-Status: Backport from https://gitlab.freedesktop.org/xorg/xserver/-/commit/ab02fb96b1c701c3bb47617d965522c34befa6af Signed-off-by: Vijay Anusuri --- .../xserver-xorg/CVE-2025-49177.patch | 54 +++++++++++++++++++ .../xorg-xserver/xserver-xorg_21.1.8.bb | 1 + 2 files changed, 55 insertions(+) create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49177.patch diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49177.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49177.patch new file mode 100644 index 0000000000..d71d97d3c2 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-49177.patch @@ -0,0 +1,54 @@ +From ab02fb96b1c701c3bb47617d965522c34befa6af Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Mon, 28 Apr 2025 10:05:36 +0200 +Subject: [PATCH] xfixes: Check request length for SetClientDisconnectMode + +The handler of XFixesSetClientDisconnectMode does not check the client +request length. + +A client could send a shorter request and read data from a former +request. + +Fix the issue by checking the request size matches. + +CVE-2025-49177 + +This issue was discovered by Nils Emmerich and +reported by Julian Suleder via ERNW Vulnerability Disclosure. + +Fixes: e167299f6 - xfixes: Add ClientDisconnectMode +Signed-off-by: Olivier Fourdan +Reviewed-by: Peter Hutterer +Part-of: + +Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/ab02fb96b1c701c3bb47617d965522c34befa6af] +CVE: CVE-2025-49177 +Signed-off-by: Vijay Anusuri +--- + xfixes/disconnect.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/xfixes/disconnect.c b/xfixes/disconnect.c +index 7793272..209e3d8 100644 +--- a/xfixes/disconnect.c ++++ b/xfixes/disconnect.c +@@ -67,6 +67,7 @@ ProcXFixesSetClientDisconnectMode(ClientPtr client) + ClientDisconnectPtr pDisconnect = GetClientDisconnect(client); + + REQUEST(xXFixesSetClientDisconnectModeReq); ++ REQUEST_SIZE_MATCH(xXFixesSetClientDisconnectModeReq); + + pDisconnect->disconnect_mode = stuff->disconnect_mode; + +@@ -80,7 +81,7 @@ SProcXFixesSetClientDisconnectMode(ClientPtr client) + + swaps(&stuff->length); + +- REQUEST_AT_LEAST_SIZE(xXFixesSetClientDisconnectModeReq); ++ REQUEST_SIZE_MATCH(xXFixesSetClientDisconnectModeReq); + + swapl(&stuff->disconnect_mode); + +-- +2.25.1 + diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb index 6013d0e53c..1fceec89f7 100644 --- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb @@ -39,6 +39,7 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat file://CVE-2025-49175.patch \ file://CVE-2025-49176-1.patch \ file://CVE-2025-49176-2.patch \ + file://CVE-2025-49177.patch \ " SRC_URI[sha256sum] = "38aadb735650c8024ee25211c190bf8aad844c5f59632761ab1ef4c4d5aeb152"