<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>polkit on Rich Mirch</title>
    <link>https://blog.mirch.io/tags/polkit/</link>
    <description>Recent content in polkit on Rich Mirch</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 09 Dec 2018 19:32:04 +0000</lastBuildDate>
    <atom:link href="https://blog.mirch.io/tags/polkit/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>CVE-2018-19788 PoC - polkit: Improper handling of user with uid &amp;gt; INT_MAX leading to authentication bypass</title>
      <link>https://blog.mirch.io/2018/12/09/cve-2018-19788-poc-polkit-improper-handling-of-user-with-uid-int_max-leading-to-authentication-bypass/</link>
      <pubDate>Sun, 09 Dec 2018 19:32:04 +0000</pubDate>
      <guid>https://blog.mirch.io/2018/12/09/cve-2018-19788-poc-polkit-improper-handling-of-user-with-uid-int_max-leading-to-authentication-bypass/</guid>
      <description>&lt;p&gt;While reviewing my Twitter feed I noticed a recent popular tweet from &lt;a href=&#34;https://twitter.com/0xdea&#34;&gt;@0xdea&lt;/a&gt;.
&lt;a href=&#34;https://twitter.com/0xdea/status/1070308598146850818&#34;&gt;https://twitter.com/0xdea/status/1070308598146850818&lt;/a&gt;
I was intrigued and wanted to see if there was a way to leverage this to execute arbitrary code as root.&lt;/p&gt;
&lt;p&gt;First we need to understand what the value of INT_MAX is. Fortunately the getconf command can be used to find the value or you can find it in /usr/include/limits.h.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;root@localhost ~&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# getconf INT_MAX&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;2147483647&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;root@localhost ~&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# grep &amp;#39;define INT_MAX&amp;#39; /usr/include/limits.h&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# define INT_MAX 2147483647&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To exploit the vulnerability the user must have a UID value larger than 2147483647. I used the same value of 4000000000 that &lt;a href=&#34;https://twitter.com/0xdea&#34;&gt;@0xdea&lt;/a&gt; posted.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
