LWN: Comments on "A new Polkit vulnerability" https://lwn.net/Articles/882609/ This is a special feed containing comments posted to the individual LWN article titled "A new Polkit vulnerability". en-us Tue, 21 Oct 2025 07:45:42 +0000 Tue, 21 Oct 2025 07:45:42 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net A new Polkit vulnerability https://lwn.net/Articles/883875/ https://lwn.net/Articles/883875/ xnox <div class="FormattedComment"> I don&#x27;t see how being open prevents to be integrated with embargoes. Ubuntu uses Launchpad, which supports private builds, but also converting private builds to public. It allows building update privately, and publishing them publically which at publication time reveals source code and full build-logs.<br> <p> If there were enough resources committed, surely koji / fedora could implement the same. Push private tags, do builds, and unembargo them at publication time. A missing build infrastructure feature, and lack of timely security support. Not really anything to do with &quot;openness&quot;.<br> </div> Sat, 05 Feb 2022 02:30:23 +0000 A new Polkit vulnerability https://lwn.net/Articles/883644/ https://lwn.net/Articles/883644/ RedDwarf <div class="FormattedComment"> Some statistics of how often an updates-testing package doesn&#x27;t go to updates would help people make an informed decision here.<br> - Do I want &quot;testing&quot;? No.<br> - Do I want &quot;fast&quot;? Yes.<br> Since I need to compromise, I want to know how faster is fast, and how pre-tested is testing.<br> <p> </div> Thu, 03 Feb 2022 12:22:28 +0000 A new Polkit vulnerability https://lwn.net/Articles/882851/ https://lwn.net/Articles/882851/ matthias <div class="FormattedComment"> <font class="QuotedText">&gt; Does someone know if stopping the polkit service will prevent bugs like this from being exploitable?</font><br> <p> As long as the pkexec executable is available with the SUID bit in place, this is trivially exploitable. The executable itself is the problem.<br> </div> Thu, 27 Jan 2022 12:38:45 +0000 Fixing the kernel https://lwn.net/Articles/882850/ https://lwn.net/Articles/882850/ mathstuf <div class="FormattedComment"> Hmm, that `pr_warn_once` seems odd. I&#x27;ll get a warning for the first time something tries this, but nothing on subsequent attempts?<br> </div> Thu, 27 Jan 2022 12:35:44 +0000 A new Polkit vulnerability https://lwn.net/Articles/882847/ https://lwn.net/Articles/882847/ anselm <blockquote><em>Does someone know if stopping the polkit service will prevent bugs like this from being exploitable?</em></blockquote> <p> The polkit service as such has nothing to do with the bug. It is a problem with the way the <tt>pkexec</tt> executable deals with command line arguments, or more specifically the absence of command line arguments, combined with the fact that it is set-UID <tt>root</tt>. The exploit doesn't rely on polkit in particular at all. </p> Thu, 27 Jan 2022 11:52:47 +0000 A new Polkit vulnerability https://lwn.net/Articles/882845/ https://lwn.net/Articles/882845/ rahulsundaram <div class="FormattedComment"> <font class="QuotedText">&gt; Does someone know if stopping the polkit service will prevent bugs like this from being exploitable?</font><br> <p> Removing suid bit is suggested as a mitigation step for this vulnerability. That should help in general. Alternatively, locally generate an RPM with pkexec as a subpackage and just don&#x27;t install it for your servers. There is a fedora devel list discussion about doing that upstream but it will likely take a while to trickle down even if they do that.<br> </div> Thu, 27 Jan 2022 11:16:20 +0000 A new Polkit vulnerability https://lwn.net/Articles/882842/ https://lwn.net/Articles/882842/ tarvin <div class="FormattedComment"> On a typical RHEL/CentOS server, I claim that polkit is not being used, but it seems it cannot be removed, because NetworkManager depends on it. Even though NetworkManager can also be removed from some servers, one cannot have that as a general assumption.<br> <p> So it appears one cannot have a general policy for removing polkit, even though that would be nice (I fear more surprises like this could be waiting to pop up for polkit.)<br> But maybe some hardening can happen, still.<br> <p> My question:<br> Does someone know if stopping the polkit service will prevent bugs like this from being exploitable?<br> </div> Thu, 27 Jan 2022 11:08:31 +0000 Fixing the kernel https://lwn.net/Articles/882841/ https://lwn.net/Articles/882841/ nye <div class="FormattedComment"> And (perhaps) finally: <a rel="nofollow" href="https://lwn.net/ml/linux-kernel/20220127000724.15106-1-ariadne%40dereferenced.org/">https://lwn.net/ml/linux-kernel/20220127000724.15106-1-ar...</a><br> </div> Thu, 27 Jan 2022 09:54:02 +0000 A new Polkit vulnerability https://lwn.net/Articles/882835/ https://lwn.net/Articles/882835/ nim-nim <div class="FormattedComment"> <font class="QuotedText">&gt; I get that the processes are open. But I guess that by definition means this is a process that doesn&#x27;t accommodate the idea of security vulnerability embargoes</font><br> <p> Embargoes are predicated on the idea components are independant and you can prepare an update in a sekret top security facility isolated from everything else.<br> <p> In reality modern components are deeply interdependant, moving one part echoes far and wide, and requires notifying lots of people (see: log4j).<br> </div> Thu, 27 Jan 2022 09:09:22 +0000 A new Polkit vulnerability https://lwn.net/Articles/882808/ https://lwn.net/Articles/882808/ jebba <div class="FormattedComment"> Interesting old discussions about it on LWN too:<br> <p> <a href="https://lwn.net/Articles/342330/">https://lwn.net/Articles/342330/</a><br> </div> Wed, 26 Jan 2022 23:42:53 +0000 A new Polkit vulnerability https://lwn.net/Articles/882803/ https://lwn.net/Articles/882803/ brunowolff <div class="FormattedComment"> There is more to it than just getting pushed to stable for naive users. (People who know can get the build directly from koji. But you need to know you want the update.)<br> Composes of repos typically happens once a day with the set of packages in stable at around 0500 UTC. Typically the compose finishes 8 to 10 hours later and gets copied to the primary source for distribution. Before most people see the change, it needs to be copied to the mirror they use. I think some pick them up pretty quickly, but others might only check once a day.<br> <p> If you happen to be using rawhide right now, composes have been failing more than usual the last week, including the last two days. If this threat is a high priority for you (e.g. if you have multiple users on your system that you don&#x27;t fully trust to behave), then you need to pull a copy from koji or from this morning&#x27;s failed compose (which will have a lot of updates).<br> </div> Wed, 26 Jan 2022 22:29:36 +0000 A new Polkit vulnerability https://lwn.net/Articles/882794/ https://lwn.net/Articles/882794/ fenncruz <div class="FormattedComment"> Apparently this was found 9 years ago ( <a href="https://mobile.twitter.com/ryiron/status/1486207182404472832?t=yMoq4VMb5trujYUcdNTyWA&amp;s=19">https://mobile.twitter.com/ryiron/status/1486207182404472...</a>) on this blog <a href="https://ryiron.wordpress.com/2013/12/16/argv-silliness/">https://ryiron.wordpress.com/2013/12/16/argv-silliness/</a><br> </div> Wed, 26 Jan 2022 21:44:58 +0000 A new Polkit vulnerability https://lwn.net/Articles/882784/ https://lwn.net/Articles/882784/ rahulsundaram <div class="FormattedComment"> <font class="QuotedText">&gt; I just did that. So still no update available to me on this system. Not sure why if the patched build was available already.</font><br> <p> The patched builds are available in updates-testing repo. The commits go into a spec + patches repo in <a href="https://src.fedoraproject.org/">https://src.fedoraproject.org/</a> and then the builds happen via <a href="https://koji.fedoraproject.org/koji/">https://koji.fedoraproject.org/koji/</a><br> <p> Once the builds are available there, Bodhi is used to push the updates to updates-testing for public comments and testing via <a href="https://bodhi.fedoraproject.org/">https://bodhi.fedoraproject.org/</a><br> <p> In this case, for Fedora 35, this is the errata<br> <p> <a href="https://bodhi.fedoraproject.org/updates/FEDORA-2022-da040e6b94">https://bodhi.fedoraproject.org/updates/FEDORA-2022-da040...</a><br> <p> dnf install &lt;foo&gt; --enablerepo=updates-testing<br> <p> <font class="QuotedText">&gt; But as to the feasibility, why is it infeasible to have closed infrastructure on which to make commits, do builds and test?</font><br> <p> It isn&#x27;t infeasible but it is considerable amount of work to duplicate a good amount of the infrastructure somewhere privately, find the resources to test it privately and push it out slightly earlier while still allowing community volunteers to participate.<br> <p> <p> <p> <p> <p> </div> Wed, 26 Jan 2022 20:19:39 +0000 A new Polkit vulnerability https://lwn.net/Articles/882782/ https://lwn.net/Articles/882782/ dmoulding <pre> $ sudo dnf update polkit Fedora 35 - x86_64 37 kB/s | 13 kB 00:00 Fedora 35 openh264 (From Cisco) - x86_64 4.2 kB/s | 989 B 00:00 Fedora Modular 35 - x86_64 46 kB/s | 13 kB 00:00 Fedora 35 - x86_64 - Updates 35 kB/s | 10 kB 00:00 Fedora 35 - x86_64 - Updates 504 kB/s | 447 kB 00:00 Fedora Modular 35 - x86_64 - Updates 45 kB/s | 13 kB 00:00 Dependencies resolved. Nothing to do. Complete! </pre> <p>I just did that. So still no update available to me on this system. Not sure why if the patched build was available already. <p>But as to the feasibility, why is it infeasible to have closed infrastructure on which to make commits, do builds and test? Then when an embargo is lifted, the commits can be pushed to the public repo, builds done and released immediately, without having to wait for testing. Doesn't on the surface seem infeasible to me, but admittedly I'm not a developer for any distro (let alone Fedora) so I don't know what nuances would make this impractical. Wed, 26 Jan 2022 20:05:49 +0000 A new Polkit vulnerability https://lwn.net/Articles/882779/ https://lwn.net/Articles/882779/ zdzichu <div class="FormattedComment"> Your first sentence is wrong. Patched package was pushed to stable repositories at 2022-01-26 17:00:37 UTC (half hour before your comment).<br> It was available the testing repository since yesterday.<br> The package was built at 25 Jan 2022 18:11:31 UTC (<a href="https://koji.fedoraproject.org/koji/buildinfo?buildID=1904693">https://koji.fedoraproject.org/koji/buildinfo?buildID=190...</a>).<br> The code changes landed in the repo yesterday at 17:51:47 UTC (<a href="https://src.fedoraproject.org/rpms/polkit/c/a55ef1ff5db9b9b601e5c60fbaddd34663dd590c?branch=f35">https://src.fedoraproject.org/rpms/polkit/c/a55ef1ff5db9b...</a>)<br> <p> That&#x27;s for nitpicking. As for your main point – yes, Fedora openness does not align with embargoes. Only way to prepare packages earlier would be to use some shadow build infrastructure, not widely visible. That would mean losing transparency, thus losing trust which is double important for security updates.<br> <p> Actually, there is another way. Commits, builds, repo composes could get metadata tag like &quot;notVisibleBefore&quot; set to embargo lift timestamp. Before that time, it should only show changes to the owner. But this would require really intrusive surgery in many components (starting with git). It&#x27;s unfeasible. <br> </div> Wed, 26 Jan 2022 19:36:28 +0000 A new Polkit vulnerability https://lwn.net/Articles/882778/ https://lwn.net/Articles/882778/ mcatanzaro <div class="FormattedComment"> Normally it takes about two days to release an update for an urgent security issue, assuming the responsible packager reads bugmail regularly, notices on the first day, and no particular challenges with backporting the patch. Our infrastructure is not designed with speed as the top priority.<br> </div> Wed, 26 Jan 2022 19:23:58 +0000 A new Polkit vulnerability https://lwn.net/Articles/882775/ https://lwn.net/Articles/882775/ mcatanzaro <div class="FormattedComment"> Well packagers can of course prepare things locally in advance, but if you make public commits or use public build infrastructure, then you&#x27;ve broken the embargo. So yeah, the actual process of building the update cannot begin until after the embargo has ended.<br> <p> Distros with private infrastructure (e.g. RHEL) are able to prepare more easily.<br> </div> Wed, 26 Jan 2022 19:13:15 +0000 A new Polkit vulnerability https://lwn.net/Articles/882768/ https://lwn.net/Articles/882768/ mbunkus <div class="FormattedComment"> I may be totally incorrect in my assumptions, but I don&#x27;t think this is actually a huge problem for Fedora users in practice, due to a combination of several reasons:<br> <p> 1. The problem exists in pkexec, not Polkit in general.<br> 2. This means that attackers must be able to execute arbitrary user-level programs in order to exploit the flaw.<br> 3. Polkit is used mostly with desktop-style systems. Desktop-style systems are usually single-user, and that user has other ways of accessing root anyway.<br> 4. Fedora is used much more widely as desktop systems than server systems, especially not as server systems where arbitrary users can upload arbitrary code to run (e.g. web site hosting with PHP).<br> <p> Of course there are most likely huge Fedora-based machine farms in several organizations (universities maybe?) where arbitrary users do have unprivileged access that I&#x27;m simply not thinking about. Anyway, there&#x27;s always &quot;rm pkexec&quot; as a temporary workaround.<br> </div> Wed, 26 Jan 2022 18:21:40 +0000 A new Polkit vulnerability https://lwn.net/Articles/882765/ https://lwn.net/Articles/882765/ atnot <div class="FormattedComment"> There appears to be a lot of hastily written code in the wild that just sets argc/argv to NULL because it happened to work so far.<br> </div> Wed, 26 Jan 2022 18:05:36 +0000 Fixing the kernel https://lwn.net/Articles/882763/ https://lwn.net/Articles/882763/ hmh <div class="FormattedComment"> <a href="https://lwn.net/ml/linux-kernel/20220126114447.25776-1-ariadne@dereferenced.org/">https://lwn.net/ml/linux-kernel/20220126114447.25776-1-ar...</a> as well.<br> </div> Wed, 26 Jan 2022 17:40:30 +0000 A new Polkit vulnerability https://lwn.net/Articles/882759/ https://lwn.net/Articles/882759/ dmoulding <div class="FormattedComment"> As far as I can tell, Fedora 35 users (don&#x27;t know about other versions) still don&#x27;t have a patch for this available to them. Which, again, is supposed to be, I think, the whole reason there&#x27;s an embargo in the first place (so that users aren&#x27;t left with unpatched systems waiting on fixes after public disclosure).<br> <p> I get that the processes are open. But I guess that by definition means this is a process that doesn&#x27;t accommodate the idea of security vulnerability embargoes (which by definition cannot be handled &quot;in the open&quot;). Seems there could be a way to be open with everything, except embargoed fixes. I&#x27;d imagine that would be exactly along the lines of what the people who came up with this convention of embargoing security vulnerability disclosure had in mind.<br> <p> </div> Wed, 26 Jan 2022 17:28:15 +0000 A new Polkit vulnerability https://lwn.net/Articles/882741/ https://lwn.net/Articles/882741/ zdzichu <div class="FormattedComment"> Fedora has fully open process, including what gets build in the build system and associated sources.<br> </div> Wed, 26 Jan 2022 16:54:26 +0000 A new Polkit vulnerability https://lwn.net/Articles/882740/ https://lwn.net/Articles/882740/ yodermk <div class="FormattedComment"> Distro security teams can&#x27;t BEGIN to build packages before the embargo is lifted??? I thought the point of the embargo was to allow the packages to be ready at a coordinated time when the vuln was disclosed.<br> </div> Wed, 26 Jan 2022 16:51:32 +0000 Fixing the kernel https://lwn.net/Articles/882736/ https://lwn.net/Articles/882736/ corbet For the curious, requiring argc&gt;=1 is <a href="https://lwn.net/ml/linux-kernel/20220126043947.10058-1-ariadne@dereferenced.org/">currently under discussion</a> on linux-kernel. Wed, 26 Jan 2022 16:43:13 +0000 A new Polkit vulnerability https://lwn.net/Articles/882727/ https://lwn.net/Articles/882727/ ballombe <div class="FormattedComment"> ...and if you use sudo, and your account is compromised, it is just a matter of waiting for you to use sudo to get root.<br> </div> Wed, 26 Jan 2022 16:16:54 +0000 A new Polkit vulnerability https://lwn.net/Articles/882725/ https://lwn.net/Articles/882725/ mcatanzaro <div class="FormattedComment"> It was embargoed. We can&#x27;t begin building updated packages until after the embargo is lifted. If you break the embargo by preparing an update too soon, security people get mad. ;)<br> </div> Wed, 26 Jan 2022 15:43:46 +0000 A new Polkit vulnerability https://lwn.net/Articles/882657/ https://lwn.net/Articles/882657/ jreiser The Linux kernel definitely is NOT at fault. <tt>(0 == argv[0])</tt> is perfectly legal in the second argument to <tt>execve()</tt>, even for a file with the setuid bit set. Any bugs or surprises are the fault of the file named as the first argument to <tt>execve()</tt>. Wed, 26 Jan 2022 15:08:09 +0000 A new Polkit vulnerability https://lwn.net/Articles/882654/ https://lwn.net/Articles/882654/ dbnichol <div class="FormattedComment"> Using systemd unprivileged as it uses polkit for authorization. But if you&#x27;re always using sudo to gain privilege then probably nothing.<br> </div> Wed, 26 Jan 2022 14:02:59 +0000 A new Polkit vulnerability https://lwn.net/Articles/882644/ https://lwn.net/Articles/882644/ purslow <div class="FormattedComment"> In my Gentoo system, it&#x27;s required by KDE :<br> <p> emerge -cpv polkit<br> Calculating dependencies... done!<br> sys-auth/polkit-0.120-r1 pulled in by:<br> gnome-extra/polkit-gnome-0.105-r2 requires &gt;=sys-auth/polkit-0.102<br> sys-auth/polkit-pkla-compat-0.1 requires &gt;=sys-auth/polkit-0.110<br> sys-auth/polkit-qt-0.114.0 requires &gt;=sys-auth/polkit-0.103<br> sys-fs/udisks-2.9.4 requires &gt;=sys-auth/polkit-0.114<br> </div> Wed, 26 Jan 2022 12:04:10 +0000 A new Polkit vulnerability https://lwn.net/Articles/882640/ https://lwn.net/Articles/882640/ ballombe <div class="FormattedComment"> Agreed. None of my Debian servers had it installed.<br> </div> Wed, 26 Jan 2022 09:10:45 +0000 A new Polkit vulnerability https://lwn.net/Articles/882636/ https://lwn.net/Articles/882636/ rahulsundaram <div class="FormattedComment"> <font class="QuotedText">&gt; What would I miss, on servers / vms? I never consciously used it for sure, sudo does everything I need.</font><br> <p> It&#x27;s largely used on desktops, so probably nothing. <br> </div> Wed, 26 Jan 2022 08:07:22 +0000 A new Polkit vulnerability https://lwn.net/Articles/882634/ https://lwn.net/Articles/882634/ bof <div class="FormattedComment"> I uninstall polkit (actually, replace it with a higher version empty package) in prod.<br> <p> What would I miss, on servers / vms? I never consciously used it for sure, sudo does everything I need.<br> </div> Wed, 26 Jan 2022 07:19:57 +0000 A new Polkit vulnerability https://lwn.net/Articles/882632/ https://lwn.net/Articles/882632/ NYKevin <div class="FormattedComment"> That depends what the kernel does in response to this. If for example it sets argc to 1 and puts an empty string in argv[0] (and puts NULL in argv[1]), then I would be very surprised if any program cared.<br> <p> OTOH, there might be (read: I could imagine) some programs that fork-exec a helper program with NULL argv[0] just because it&#x27;s easier than passing the correct arguments, so if the kernel returns -EINVAL or something, those programs might break.<br> </div> Wed, 26 Jan 2022 04:52:10 +0000 A new Polkit vulnerability https://lwn.net/Articles/882630/ https://lwn.net/Articles/882630/ pabs <div class="FormattedComment"> From the advisory:<br> <p> Last-minute note: polkit also supports non-Linux operating systems such<br> as Solaris and *BSD, but we have not investigated their exploitability;<br> however, we note that OpenBSD is not exploitable, because its kernel<br> refuses to execve() a program if argc is 0.<br> <p> </div> Wed, 26 Jan 2022 04:25:34 +0000 A new Polkit vulnerability https://lwn.net/Articles/882629/ https://lwn.net/Articles/882629/ bjacob <div class="FormattedComment"> Self-reply - looks like this has been answered already on SO:<br> <a href="https://stackoverflow.com/questions/49817316/can-argc-be-zero-on-a-posix-system">https://stackoverflow.com/questions/49817316/can-argc-be-...</a><br> So argc can really be 0, and the standard saying so is the ISO C language standard.<br> So this isn&#x27;t a Linux bug but I think flussence&#x27;s meta point stands: there are probably many other programs that didn&#x27;t know that they had to be ready for argc==0, so this is is surprising, and surprising is insecure... so it might still be a good idea for the kernel to step in to ensure argc&gt;=1 and argv[0]!=NULL even though this isn&#x27;t the kernel&#x27;s fault. I&#x27;d be really curious though if there are legitimate usage patterns that would be broken by doing so..<br> </div> Wed, 26 Jan 2022 03:05:27 +0000 A new Polkit vulnerability https://lwn.net/Articles/882628/ https://lwn.net/Articles/882628/ bjacob <div class="FormattedComment"> I would like to hear a definitive comment on this. From the Qualys article, the specific kind of &#x27;garbage&#x27; that is being passed by the kernel, by means of execve, to the executed program, is that argc==0 and argv[0]==NULL. Is that garbage or something that I should be prepared to handle in programs that I write? Is there some specification (POSIX??) governing that?<br> </div> Wed, 26 Jan 2022 02:49:58 +0000 A new Polkit vulnerability https://lwn.net/Articles/882627/ https://lwn.net/Articles/882627/ JoeBuck <div class="FormattedComment"> Seems there&#x27;s a one-line no-risk fix; in main, if argc is 0, exit with error immediately. Right? Am I missing something?<br> <p> </div> Wed, 26 Jan 2022 02:47:27 +0000 A new Polkit vulnerability https://lwn.net/Articles/882626/ https://lwn.net/Articles/882626/ pabs <div class="FormattedComment"> pkexec doesn&#x27;t work when it isn&#x27;t setuid root, it gives this error:<br> <p> pkexec must be setuid root<br> <p> There was a discussion on Debian IRC about moving pkexec to a separate package from policykit, so most systems wouldn&#x27;t have it installed, unless they installed a package that needed it.<br> </div> Wed, 26 Jan 2022 02:45:08 +0000 A new Polkit vulnerability https://lwn.net/Articles/882622/ https://lwn.net/Articles/882622/ flussence <div class="FormattedComment"> If I&#x27;m reading this right, the exploit is putting garbage in execve(2) and the kernel isn&#x27;t doing any checking or rejecting of it, instead passing those values straight through to a (setuid) program that isn&#x27;t expecting the kernel to give it a bunch of nonsense.<br> <p> As much as I&#x27;d like to rag on polkit for being a pile of &quot;so complex there are no obvious deficiencies&quot; software running as root, this actually looks like a kernel bug. There may be other software affected by this that we&#x27;re not aware of yet.<br> </div> Wed, 26 Jan 2022 02:29:05 +0000 A new Polkit vulnerability https://lwn.net/Articles/882615/ https://lwn.net/Articles/882615/ Smon <div class="FormattedComment"> It looks like the same for archlinux. <br> Signature Date: 2022-01-25 20:05 UTC<br> Last Updated: 2022-01-25 22:59 UTC (53 minutes ago)<br> <a rel="nofollow" href="https://archlinux.org/packages/extra/x86_64/polkit/">https://archlinux.org/packages/extra/x86_64/polkit/</a><br> <p> Fast fix is to `chmod 0755 /usr/bin/pkexec`<br> </div> Tue, 25 Jan 2022 23:53:25 +0000