summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'patchsets/motif/2.3.8/13_all_xpm-comments.patch')
-rw-r--r--patchsets/motif/2.3.8/13_all_xpm-comments.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/patchsets/motif/2.3.8/13_all_xpm-comments.patch b/patchsets/motif/2.3.8/13_all_xpm-comments.patch
new file mode 100644
index 0000000..6653df4
--- /dev/null
+++ b/patchsets/motif/2.3.8/13_all_xpm-comments.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/900763
+CVE-2022-46285
+Patch ported from the following commit for libXpm:
+
+From a3a7c6dcc3b629d765014816c566c63165c63ca8 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat, 17 Dec 2022 12:23:45 -0800
+Subject: [PATCH] Fix CVE-2022-46285: Infinite loop on unclosed comments
+
+--- motif-2.3.8/lib/Xm/Xpmdata.c
++++ motif-2.3.8/lib/Xm/Xpmdata.c
+@@ -171,6 +171,10 @@
+ notend = 0;
+ ungetc(*s, file);
+ }
++ else if (c == EOF) {
++ /* hit end of file before the end of the comment */
++ return XpmFileInvalid;
++ }
+ }
+ return 0;
+ }