Microsoft points at Linux and shouts: Look, look! Privilege-escalation flaws here, too!
- Reference: 1651097757
- News link: https://www.theregister.co.uk/2022/04/27/microsoft-linux-vulnerability/
- Source link:
It's nice of Redmond to point out these flaws and have them fixed in any affected distributions; the US tech giant is a big user of Linux and relies on the open-source OS throughout its empire. It's just a little perplexing the biz went to [1]all the effort of a big write-up and giving the flaws a catchy name, Nimbuspwn, when countless privilege-elevation holes are fixed in the Windows operating system each month, and we can't recall Microsoft lately making this much of a song and dance over them.
"The growing number of vulnerabilities on Linux environments emphasize the need for strong monitoring of the platform's operating system and its components," wrote Jonathan Bar Or of the Microsoft 365 Defender Research Team, which, again, is perhaps a bit rich for the Windows goliath to bring up.
[2]
It's not that Linux doesn't have security vulnerabilities – it has plenty, and they ought to be publicized – it's just that glasshouses and stones come to mind. If you're using a vulnerable Linux distro, grab its latest updates to patch the flaw. It appears networkd-dispatcher was updated three weeks ago, to [3]version 2.2 , to close the holes.
[4]
[5]
Microsoft said it spotted the vulnerabilities – now tracked as [6]CVE-2022-29799 and [7]CVE-2022-29800 – while performing code reviews and dynamic analysis on services that run as root. We're told that analysts noticed an "odd pattern" in [8]networkd-dispatcher , an open-source tool that can be used to detect and act on connection status changes.
The security weaknesses uncovered in the review included insecure directory traversal, symlink races, and time-of-check-time-of-use race conditions, which can be exploited to elevate one's privileges, allowing them to deploy malware or perform other malicious activities through arbitrary root code execution.
[9]
"Moreover, the Nimbuspwn vulnerabilities could potentially be leveraged as a vector for root access by more sophisticated threats, such as malware or ransomware, to achieve greater impact on vulnerable devices," Bar Or wrote.
All three vulnerabilities were found by following the flow of execution to a _run_hooks_for_state method, which is responsible for finding and running scripts. With the time-of-check-time-of-use race condition, "there is a certain time between the scripts being discovered and them being run," he wrote. "An attacker can abuse this vulnerability to replace scripts that networkd-dispatcher believes to be owned by root to ones that are not."
Microsoft said it also found minor info-leaking bugs in [10]Blueman and [11]PackageKit on Linux.
[12]
According to Casey Bisson, head of product and developer relations at code security vendor BluBracket, these privilege-escalation holes could be useful for miscreants seeking to gain a stronger foothold in a Linux-dependent organization so that espionage or extortionware activities can be carried out.
"This is an interesting set of vulnerabilities affecting Linux desktop users," Bisson told The Register . "The risk footprint could be broad. Linux desktops aren't just for hobbyists. Tens of thousands of Google employees use a derivative of Debian as their desktop OS, and there are a number of other notable corporate, government and research facilities that have large Linux desktop deployments."
[13]AWS's Log4j patches blew holes in its own security
[14]Attackers exploit Spring4Shell flaw to let loose the Mirai botnet
[15]FBI: BlackCat ransomware scratched 60-plus orgs
[16]Microsoft ups bug bounties 30% for cloud lines, pays more for 'scenario-based' exploits
Open-source software continues to be a target of spies and crooks looking to exploit vulnerabilities. The [17]high-profile flaw found in the Log4j library late last year continues to be abused, and more recently fiends have looked to leverage the [18]Spring4Shell vulnerability in the Spring Framework.
Bud Broomhead, CEO of cybersecurity firm Viakoo, told The Register bugs like Nimbuspwn require action not just by users to fetch and install patches, but also distribution managers to spot fixes and push out updates in the first place. "By their nature they are harder to remediate and often have an extended vulnerability period because traditional solutions for detection and remediation may not apply, and because there are multiple Linux distributions – over 600 – there may equally be many patches needing to be applied," Broomhead said.
Bar Or wrote that networkd-dispatcher's maintainer Clayton Craft was notified of the holes and fixes were released; these should be filtering their way down to endpoints as they update their packages.
"Defending against the evolving threat landscape requires the ability to protect and secure users' computing experiences, be it a Windows or non-Windows device," Bar Or opined. "This case displayed how the ability to coordinate such research via expert, cross-industry collaboration is vital to effectively mitigate issues, regardless of the vulnerable device or platform in use." ®
Get our [19]Tech Resources
[1] https://www.microsoft.com/security/blog/2022/04/26/microsoft-finds-new-elevation-of-privilege-linux-vulnerability-nimbuspwn/
[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_security/patches&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YmoRas1@c6X14bEYfCxoAwAAAAQ&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[3] https://gitlab.com/craftyguy/networkd-dispatcher/-/tags/2.2
[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_security/patches&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YmoRas1@c6X14bEYfCxoAwAAAAQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_security/patches&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YmoRas1@c6X14bEYfCxoAwAAAAQ&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[6] https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-29799
[7] https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-29800
[8] https://gitlab.com/craftyguy/networkd-dispatcher
[9] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_security/patches&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YmoRas1@c6X14bEYfCxoAwAAAAQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[10] https://github.com/blueman-project/blueman/security/advisories/GHSA-3r9p-m5c8-8mw8
[11] https://access.redhat.com/security/cve/cve-2022-0987
[12] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_security/patches&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YmoRas1@c6X14bEYfCxoAwAAAAQ&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[13] https://www.theregister.com/2022/04/20/aws_log4j_patches/
[14] https://www.theregister.com/2022/04/11/spring4shell-flaw-exploited-mirai-botnet/
[15] https://www.theregister.com/2022/04/25/in_brief_security/
[16] https://www.theregister.com/2022/04/18/in-brief-security/
[17] https://www.theregister.com/2022/04/20/aws_log4j_patches/
[18] https://www.theregister.com/2022/04/11/spring4shell-flaw-exploited-mirai-botnet/
[19] https://whitepapers.theregister.com/
Please note.
The systemd-cancer is not now, nor will it ever be, a necessary part of Linux.
It's a third-party addon that sits on top of systemd-networkd, a network manager. It had a vulnerability because its author didn't think hard enough about the possibility of malicious strings being sent to it via DBus. None of this has anything to do with systemd, per se. The same vulnerability could equally well have existed in the NetworkManager equivalent, NetworkManager-dispatcher, which does the same thing on top of NetworkManager; it just doesn't happen to because it wasn't written the same way.
Hey Microsoft ...
... whataboutitis is not becoming.
Ugh! Scripts.
Linux has far far too many scripts. They are pretty much vulnerable to timing problems by definition.
Seems to me that for anything important, you should not use:
check file properties; open file; trust file data.
but rather should use:
open file; using only the yielded fd, check file properties; using only the yielded fd, trust file data.
but, I'm not sure that all of the properties of interest are available via just the fd.
Re: Ugh! Scripts.
"Linux has far far too many scripts."
Talk about unclear on the concept ...
Re: Ugh! Scripts.
fstat and fexecve do what is required via file descriptors but I could not find a direct way to do fexecve in python. The indirect way is:
with open(x_path) as x:
___ x_fd = '/proc/self/fd/'+str(x.fileno())
___ subprocess.Popen([x_path], executable=x_fd, close_fds=False)
(Replace ___ with spaces because comments do not support the pre tag.)
But that app has nothing to do with Linux as in not-in-kernel. Go to Red Hat...
And re. bugs, then one of the things, I enjoy in the Linux world, is how finding bugs are welcomed.
That is so far from my previous +30 years with MicroSoft, where it's refusal, denial or "it's a feature".
Let's not forget AntennaGate: "You're holding it wrong"
Auto update and reboot anyone?
"these should be filtering their way down to endpoints as they update their packages."
This is why Linux is more vulnerable than something like Windows, These patches are advertised why before they are available due to the end user, so teh bad guys are handed a window of opportunity on a plate. There is nothing like advertising.
Open source developers and users need to get a handle on this stuff so they can manage it a lot better so you those windows do not open.
The flip of this is that most normal people (should Linux go to great unwashed by one of those 600 distributions) would not have a clue if their distro had this or some other (if they even cared) component/library/plugin/widget and really should just set their OS to automatically (if that is an option they can find) update everything as soon as anything is released....er just like Windows does with a little pop up to tell you reboot would be good. I am sure the Linux community would be supportive of this.
Re: Auto update and reboot anyone?
Yet another person unclear on the concept.
Cry me a river
Linux fanboy's feeling hurt, because Microsoft did what for ex. Google did a million times over in the opposite direction (like publicize a Windows vulnerability, quite often even prior to public patch being released to fix it), and because his pet operating system has been exposed as "not even a tiny bit more secure" than the one he despises (and that not even just now, but every single month, for 25 years now). News at 11.
Re: Cry me a river
Eh? I'm writing this from a desktop Linux distro right now, and it doesn't even have networkd-dispatcher in its package management system, let alone have it installed. So I'm not crying that my OS is not "not even a tiny bit more secure". To the contrary, my operating system still isn't recording my voice or phoning home 5500 times a day (literally), so I'm actually quite happy....
https://thehackernews.com/2016/02/microsoft-windows10-privacy.html
Re: Cry me a river
"It's better to keep your mouth shut and be thought a fool than to open it and remove all doubt." —Unknown
Note
Note, this flaw is in a third-party addon for systemd-networkd (called networkd-dispatcher) which most distributions don't even package, let alone install by default. It seems like it's installed by default on Ubuntu and Mint - at least in some configurations - for some reason, and Mint also has some quirks which might make exploiting it easier (from what I read it's likely quite hard to exploit on Ubuntu even if it's technically vulnerable).
"most distributions don't even package"
It gets more desperate the more you look at it. It's not on our Debian 11 workstations.
That it's in default Ubuntu, so some people out there are using it, is Redmond's saving grace.
C.
from the man page: "networkd-dispatcher - Dispatcher service for systemd-networkd connection status changes"
Ah, systemd.