|
|
cacd8a |
From 2fda7c57e7ebe210cf5e2bb051a0a9271f85e80a Mon Sep 17 00:00:00 2001
|
|
|
cacd8a |
From: Matthieu Herrb <matthieu@herrb.eu>
|
|
|
cacd8a |
Date: Mon, 22 Oct 2018 14:33:25 -0400
|
|
|
cacd8a |
Subject: [PATCH xserver] Disable -logfile and -modulepath when running with
|
|
|
cacd8a |
elevated privileges
|
|
|
cacd8a |
|
|
|
cacd8a |
An unprivileged user was able to overwrite arbitrary files
|
|
|
cacd8a |
in directories in which it is able to chdir, potentially
|
|
|
cacd8a |
leading to privilege elevation.
|
|
|
cacd8a |
|
|
|
cacd8a |
CVE-2018-14665
|
|
|
cacd8a |
|
|
|
cacd8a |
An unprivileded user was able to load arbitrary modules
|
|
|
cacd8a |
from user controlled directories, leading to privilege
|
|
|
cacd8a |
elevation.
|
|
|
cacd8a |
|
|
|
cacd8a |
CVE-2018-XXXXX
|
|
|
cacd8a |
|
|
|
cacd8a |
Issues reported by Narendra Shinde
|
|
|
cacd8a |
|
|
|
cacd8a |
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
|
|
|
cacd8a |
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
cacd8a |
---
|
|
|
cacd8a |
hw/xfree86/common/xf86Init.c | 8 ++++++--
|
|
|
cacd8a |
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
cacd8a |
|
|
|
cacd8a |
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
|
|
|
cacd8a |
index 6c25eda739..0f57efa863 100644
|
|
|
cacd8a |
--- a/hw/xfree86/common/xf86Init.c
|
|
|
cacd8a |
+++ b/hw/xfree86/common/xf86Init.c
|
|
|
cacd8a |
@@ -935,14 +935,18 @@ ddxProcessArgument(int argc, char **argv, int i)
|
|
|
cacd8a |
/* First the options that are not allowed with elevated privileges */
|
|
|
cacd8a |
if (!strcmp(argv[i], "-modulepath")) {
|
|
|
cacd8a |
CHECK_FOR_REQUIRED_ARGUMENT();
|
|
|
cacd8a |
- xf86CheckPrivs(argv[i], argv[i + 1]);
|
|
|
cacd8a |
+ if (xf86PrivsElevated())
|
|
|
cacd8a |
+ FatalError("\nInvalid argument -modulepath "
|
|
|
cacd8a |
+ "with elevated privileges\n");
|
|
|
cacd8a |
xf86ModulePath = argv[i + 1];
|
|
|
cacd8a |
xf86ModPathFrom = X_CMDLINE;
|
|
|
cacd8a |
return 2;
|
|
|
cacd8a |
}
|
|
|
cacd8a |
if (!strcmp(argv[i], "-logfile")) {
|
|
|
cacd8a |
CHECK_FOR_REQUIRED_ARGUMENT();
|
|
|
cacd8a |
- xf86CheckPrivs(argv[i], argv[i + 1]);
|
|
|
cacd8a |
+ if (xf86PrivsElevated())
|
|
|
cacd8a |
+ FatalError("\nInvalid argument -logfile "
|
|
|
cacd8a |
+ "with elevated privileges\n");
|
|
|
cacd8a |
xf86LogFile = argv[i + 1];
|
|
|
cacd8a |
xf86LogFileFrom = X_CMDLINE;
|
|
|
cacd8a |
return 2;
|
|
|
cacd8a |
--
|
|
|
cacd8a |
2.19.0
|
|
|
cacd8a |
|