Skip to content

Commit 7a29fa4

Browse files
[AUTO-CHERRYPICK] [Medium] xorg-x11-server: Fix CVE-2024-0408 - branch main (#12413)
Co-authored-by: Sreenivasulu Malavathula (HCL Technologies Ltd) <v-smalavathu@microsoft.com>
1 parent 220b01c commit 7a29fa4

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 45680d2a0072f9ea99334eb6027d5b4adfc6c1ff Mon Sep 17 00:00:00 2001
2+
From: Sreenivasulu Malavathula <v-smalavathu@microsoft.com>
3+
Date: Thu, 6 Feb 2025 00:59:38 -0600
4+
Subject: [PATCH] Address CVE-2024-0408
5+
6+
---
7+
glx/glxcmds.c | 8 ++++++++
8+
1 file changed, 8 insertions(+)
9+
10+
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
11+
index 75e4282..6a5e939 100644
12+
--- a/glx/glxcmds.c
13+
+++ b/glx/glxcmds.c
14+
@@ -48,6 +48,7 @@
15+
#include "indirect_util.h"
16+
#include "protocol-versions.h"
17+
#include "glxvndabi.h"
18+
+#include "xace.h"
19+
20+
static char GLXServerVendorName[] = "SGI";
21+
22+
@@ -1371,6 +1372,13 @@ DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId,
23+
if (!pPixmap)
24+
return BadAlloc;
25+
26+
+ err = XaceHook(XACE_RESOURCE_ACCESS, client, glxDrawableId, RT_PIXMAP,
27+
+ pPixmap, RT_NONE, NULL, DixCreateAccess);
28+
+ if (err != Success) {
29+
+ (*pGlxScreen->pScreen->DestroyPixmap) (pPixmap);
30+
+ return err;
31+
+ }
32+
+
33+
/* Assign the pixmap the same id as the pbuffer and add it as a
34+
* resource so it and the DRI2 drawable will be reclaimed when the
35+
* pbuffer is destroyed. */
36+
--
37+
2.45.2
38+

SPECS/xorg-x11-server/xorg-x11-server.spec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Summary: X.Org X11 X server
2222
Name: xorg-x11-server
2323
Version: 1.20.10
24-
Release: 13%{?dist}
24+
Release: 14%{?dist}
2525
License: MIT
2626
Vendor: Microsoft Corporation
2727
Distribution: Mariner
@@ -98,6 +98,9 @@ Patch523: 0023-xwayland-Fix-setting-of-_XWAYLAND_RANDR_EMU_MONITOR_.patch
9898
Patch524: 0024-xwayland-Remove-unnecessary-xwl_window_is_toplevel-c.patch
9999
Patch525: 0025-xwayland-Make-window_get_client_toplevel-non-recursi.patch
100100

101+
# a flaw was founnd in the x.org server in GLX PBuffer
102+
Patch601: CVE-2024-0408.patch
103+
101104
BuildRequires: audit-devel
102105
BuildRequires: autoconf
103106
BuildRequires: automake
@@ -400,6 +403,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
400403
%{_datadir}/aclocal/xorg-server.m4
401404

402405
%changelog
406+
* Thu Feb 06 Sreeniavsulu Malavathula <v-smalavathu@microsoft.com> - 1.20.10-14
407+
- Patch to fix CVE-2024-0408
408+
403409
* Thu Nov 14 2024 Suresh Babu Chalamalasetty <schalam@microsoft.com> - 1.20.10-13
404410
- Fix for CVE-2024-9632
405411

0 commit comments

Comments
 (0)