{"id":1919,"date":"2018-10-29T00:53:25","date_gmt":"2018-10-29T00:53:25","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=1919"},"modified":"2018-10-31T09:31:07","modified_gmt":"2018-10-31T09:31:07","slug":"linux-systems-vulnerable-to-privilege-escalation-and-file-overwrite-exploit-in-x-org-server","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/29\/linux-systems-vulnerable-to-privilege-escalation-and-file-overwrite-exploit-in-x-org-server\/","title":{"rendered":"Linux systems vulnerable to privilege escalation and file overwrite exploit in X.Org server"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/betanews.com\/wp-content\/uploads\/2018\/10\/x-org-logo.jpg\" alt=\"X.Org logo\" width=\"640\" height=\"427\" \/><\/p>\n<p>An &#8220;incorrect command-line parameter validation&#8221; vulnerability in X.Org server makes it possible to escalate privileges as well as overwrite files. The problem affects Linux and BSD distributions using the open source X Window System implementation.<\/p>\n<p>The vulnerability has been present for a couple of years, but has been brought to light by security researcher Narendra Shinde. Unpatched system can be exploited by non-root users if X server is running with elevated privileges.<\/p>\n<p>See also:<\/p>\n<ul>\n<li><a href=\"https:\/\/betanews.com\/2018\/10\/26\/system76-open-source-thelio-linux\/\">Linux-friendly company System76 shares more open source Thelio computer details<\/a><\/li>\n<li><a href=\"https:\/\/betanews.com\/2018\/10\/22\/system76-ubuntu-pop_os-linux\/\">System76 releases Ubuntu-based Pop!_OS 18.10 Linux distribution<\/a><\/li>\n<li><a href=\"https:\/\/betanews.com\/2018\/10\/22\/linux-4-19-linus-torvalds-returns\/\">Linus Torvalds is back in charge as Linux kernel 4.19 is released<\/a><\/li>\n<\/ul>\n<p>A <a href=\"https:\/\/lists.x.org\/archives\/xorg-announce\/2018-October\/002927.html\" target=\"_blank\" rel=\"noopener\">security advisory<\/a> posted to the X.Org mailing list explains that: &#8220;Incorrect command-line parameter validation in the Xorg X server can lead to privilege elevation and\/or arbitrary files overwrite, when the X server is running with elevated privileges (ie when Xorg is installed with the setuid bit set and started by a non-root user)&#8221;.<\/p>\n<p>The vulnerability has been assigned CVE-2018-14665, and <a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/trivial-bug-in-xorg-gives-root-permission-on-linux-and-bsd-systems\/\" target=\"_blank\" rel=\"noopener\">Bleeping Computer<\/a> &#8212; saying it is &#8220;trivial to exploit&#8221; &#8212; explains how it works:<\/p>\n<blockquote><p>Privilege escalation can be accomplished via the -modulepath argument by setting an insecure path to modules loaded by the X.org server. Arbitrary file overwrite is possible through the -logfile argument, because of improper verification when parsing the option.<\/p><\/blockquote>\n<p>Although the exploit is not a major security issue in itself, in combination with other exploits it could prove highly problematic. The X.Org mailing list post says:<\/p>\n<blockquote><p>The commit <a href=\"https:\/\/gitlab.freedesktop.org\/xorg\/xserver\/commit\/032b1d79b7\" target=\"_blank\" rel=\"noopener\">https:\/\/gitlab.freedesktop.org\/xorg\/xserver\/commit\/032b1d79b7<\/a> which first appeared in xorg-server 1.19.0 introduced a regression in the security checks performed for potentially dangerous options, enabling the vulnerabilities listed above.<\/p>\n<p>Overwriting \/etc\/shadow with -logfile can also lead to privilege elevation since it&#8217;s possible to control some part of the written log file, for example using the -fp option to set the font search path (which is logged) and thus inject a line that will be considered as valid by some systems.<\/p><\/blockquote>\n<p>A <a href=\"https:\/\/gitlab.freedesktop.org\/xorg\/xserver\/commit\/50c0cf885a6e91c0ea71fb49fa8f1b7c86fe330e\" target=\"_blank\" rel=\"noopener\">patch<\/a> was added to the xserver repository on this week, but X.Org adds:<\/p>\n<blockquote><p>If a patched version of the X server is not available, X.Org recommends to remove the setuid bit (ie chmod 755) of the installed Xorg binary. Note that this can cause issues if people are starting the X window system using the &#8216;startx&#8217;, &#8216;xinit&#8217; commands or variations thereof.<\/p>\n<p>X.Org recommends the use of a display manager to start X sessions, which does not require Xorg to be installed setuid.<\/p><\/blockquote>\n<p><a href=\"https:\/\/betanews.com\/2018\/10\/28\/x-org-server-vulnerability\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>An &#8220;incorrect command-line parameter validation&#8221; vulnerability in X.Org server makes it possible to escalate privileges as well as overwrite files. The problem affects Linux and BSD distributions using the open source X Window System implementation. The vulnerability has been present for a couple of years, but has been brought to light by security researcher Narendra &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/29\/linux-systems-vulnerable-to-privilege-escalation-and-file-overwrite-exploit-in-x-org-server\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Linux systems vulnerable to privilege escalation and file overwrite exploit in X.Org server&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1919","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/1919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=1919"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/1919\/revisions"}],"predecessor-version":[{"id":2136,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/1919\/revisions\/2136"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=1919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=1919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=1919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}