You're probably not vulnerable to the CUPS CVE
xeiaso.net
xeiaso.net
On other hand if you run any sort of "Unix" based infra for desktops and like, there is real potential risks specially if printers are part of this.
This is more so an IT problem, not web server problem and there it can be a real deal, with possible real impacts down the line.
● cups-browsed.service - Make remote CUPS printers available locally Loaded: loaded (/lib/systemd/system/cups-browsed.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2024-09-27 06:40:23 EDT; 59min ago
Edit: 22.04.5 got them too
I’m pretty sure that even in 2024 printing is pretty common, isn’t it?
… isn’t it?
And scribbling on paper is still unparallelled as a thinking device for rearranging things, catching repetitive turns of phrase, and the like. A tablet with a pen works to some extent, but I cannot surround myself with tablets showing parts of the same document like I can with sheets of paper, and that’s helpful for long-form texts. No word processor with mouse-and-keyboard input can compare.
“Dear macOS users. You’re vulnerable, too. Update now!”
Computers aren’t made to avoid printing. Their task is printing faster on more paper. At least this is what happened ^^And yea sure you can manually configure your printer, but it's a pain in the ass compared to zeroconf auto-discovery.
This is a terrible take. The average user is not going to go find out the IP of the printer and go on their computer and configure it. Discovery is the primary way people print now.
And... CUPS is how 99% of people print on Mac or Linux.
I mean it depends a bit on your living situation.
I mean at jobs (e.g. self employed) you have to sometimes print things I guess often enough for it to be a viable attack.
And as a student if you might also sometimes prefer paper, but most universities have printer pools you mostly use over USB and that is just way cheaper then your own printer.
Sure if you play games like D&D you might print character sheets (or templates for them) but how often?
I think the last time I had to print anything was when I sold my car like 7 years ago (doesn't make sense to own one where I live).
And sure not everyone will have that experience but the combination of run Linux + has network discovery enabled and "publicly" accessible (i.e. no strict firewall) + uses a printer over the network before it's fixed + gets attacked with it seems not "that" high, actually as long as the fix is delivered quite fast and it wasn't abused for years it seem quite unlikely.
> /etc/cups/cupsd.conf
> Listen localhost:631
After some checking, I found out by default CUPSD only runs at localhost. So, yeah, you don't have to worry about this in Fedora either.
In general I would say don't look at config files to verify this kind of thing. Use something like 'ss -lp' to get a list of what processes on your machine are actually listening on (anything that isn't 127.0.0.* or [::1] is generally going to mean network-accessible)
>cupsd 2843 root 7u IPv6 12941 0t0 TCP [::1]:631 (LISTEN)
>cupsd 2843 root 8u IPv4 12942 0t0 TCP 127.0.0.1:631 (LISTEN)
There is no open UDP port for CUPSD, so relax.
I've seen this over and over again with Linux people, granted this view might be skewed because of the public reach of the project, but still.. they seem to view any communication regarding CVEs or security concerns or design recommendations as adversarial and tend go into the "I know more about Linux than you" and "Everything is fine until you convince me it's not, which will be never" mode.
Not wanting to turn this into a dunking contest but, it's the general feeling I have about this.
Peter says wolf too many times?
Maybe a CVE should have a complex score (severity / spread): 9.9 / 4.
severity 9.9 : easy to exploit if you run this .. you're cooked
spread 4 : you most likely are not running this or it's by default in a way that you're not cooked
They use the 'they/them' pronouns.
Do you run a large open source project or website that gets security contacts? The vast majority of security reports are poorly written and bogus, with the person either trying to get money or pad their resume with CVE. I think that contributes to developer's wariness of these things, and the "please prove that this is a real security issue" attitude you often see.
May I reference:
Beg bounties - https://news.sophos.com/en-us/2021/02/08/have-a-domain-name-...
The bogus CVE problem - https://lwn.net/Articles/944209/
There's an example in this thread: https://news.ycombinator.com/item?id=41668979
The post isn't meant to be dismissive of there being a vulnerability, it's dismissive of it being "so bad you can pawn all Linux systems ever", especially in context of servers. And if I had to guess it partially exist so that if people (as in people doing sysadmin stuff) consult here she can point them to the blog post instead of repeating herself over and over.
Through in general I agree that there are parts of the Linux community which do not handle security concerns well at all.
But also there is a trend of people which do not understand what they are talking about and refuse to learn or people which just want a ton of attention blowing up security issues out of proportion again and again. And that is bad kinda like the story of the child who yelling wolf except it's like 50 adults yelling wolf. It also can lead to all kind of other personal annoyances like you having to unnecessarily doing overtime and wasting time with having people to tell again and again "yes we are fine, this doesn't affect us, actually this doesn't affect most server setups. Yes they said otherwise, yes they knowingly misrepresented facts when they announced that there will be a vulnerability beforehand, no they never had a good reputation but we have to take them serious anyway, etc. etc.". So I have quite a bit of understanding for some people in the field being sometimes quite annoyed (not for all of them tho).
(Also to I think you might be reading a bit too much into here blog post and my comments above where meant to be "in general" not specific to the blog post.)
What I find interesting is that people generally seem to not know that 0.0.0.0 means "all interfaces" and have a lot of stuff running and accessible from the network. I've seen developers running their live reload server, different software (i.e. syncthing), webservers, even databases (someone running postgres on their laptop)! So, I've long thought that this is the part that actually confuses people and it even happens to otherwise technologically competent people.
I also have often run into software where configuring the default listen address and port seemed to be way harder than it should, sometimes even requiring changes in the source code. So, I really think we need to start shipping some kind of client side firewall with a good UX by default (something like little snitch?).
Since docker by default runs your code in a separate network namespace, in that context '127.0.0.1' really means "accessible inside the container, effectively nowhere", and '0.0.0.0' means "accessible only on the local machine" (except that's not actually true, check out this open issue lol https://github.com/moby/moby/issues/22054 )
I think that's one reason for some software's default of 0.0.0.0 - people are cargo-culting from stuff that runs in docker and/or people want their stuff to run in docker and work by default.
This is only going to get worse as snap and flatpack become more common, since they have the same property.
I don't think that right? It just means "is available to be mapped out of the container", but you still have to use -p or such for it to do anything
$ docker run --rm --name listen busybox sh -c 'echo hi | nc -l -p 8000'
# in another terminal
$ docker inspect listen -f '{{ .NetworkSettings.IPAddress }}'
172.17.0.3
$ nc 172.17.0.3 8000 < /dev/null
hi
Works just fine for accessing it on your local machine. The -p flag is meant to "publish" a port so it's available remotely, from outside of your machine (i.e. to serve nginx to the public internet on a webserver with '-p 80:80' or whatever).This is not a solution but makes it worse. Adding more vulnerable code widens the attack surface. The history of so called security software (aka snakeoil) has shown that it doesn’t protects but causes more harm.
A Linux system shall show with “# ss -lpn” [1] only ports and process which are known and reachable. It easy to use and that the functions people want - knowing who is doing what. And that’s the path Linux and BSD have taken successfully in the past.
Firewalls are a valid way for administrating networks itself. And while firewalls come lean and integrated on Linux, they should be used carefully. I think system-monitor tools should show open sockets and ports, like they show processes itself, in a list.
[1] https://www.evilsocket.net/2024/09/26/Attacking-UNIX-systems... -> The author use the old netstat. And recommends to just turn the service off. That ensures that CUPS doesn’t make other mistakes. A thing a firewall will not do.
PS: At least the Wiki of Archlinux recommends for quite some time not to install `cups-browsed` because it isn't usually need for printer discovery (IPP-Everywhere/AirPrint). At least since December 2022.
What I'm proposing is a backwards compatible "sane default" for people who may not understand. They should get a pop up which has them confirm that the service they are starting will be open to the network they are currently in. macOS has pop ups like this for many things and it seems to mostly work, it shouldn't be that hard.
I don't fully understand your point about firewalls being a valid way for administrating networks themselves (only). Linux ships with netfilter by default, nothing stands in the way of better defaults.
Desktop Linux ships with sane defaults, other then Windows. Most of us will not have cups-browsed installed.
The notifications/permissions you mention are good proposal! Actually we want permissions and it happens already with Flatpak. And the operating-system should even ask for it outside of Flatpak. It doesn’t need a Firewall and therefore creating wrong[1] (i.e. DROP) responses.
What system-monitors still lack is showing network connections like they show processes. The should all come with a tab which displays something like ss -tulpen.
* Less code, less issues
* Overview about what is actually used.
* Permissions prevent undesired changes to this state.
We don’t want to block a dangerous application with a firewall. We want to turn it off. Update it or remove it? I want to be a step ahead and keep the port closed.So I desire correct network responses, minimum code acting to reduce error probability. That is already the case. But I want more, permissions and overview of current state for all kinds of users. Not the case, ss is and netstat are good but for professional users and even for professional not the best.
The difference in the firewalls in networks is, that admins care about a network, cannot control all systems, lack historical overview and (sadly) know that various network services aren’t save. Then, use Firewall. Maybe it is just tape around a problem but it is intended for that problem.
PS: A nice article on Ubuntuusers (German) explains why Ubuntu doesn’t use a Firewall despite Netfilter is integrated: https://wiki.ubuntuusers.de/Personal_Firewalls/
The background is that Windows users keep asking again and again why Ubuntu ships without a Firewall. Linux ships with one but it is not supposed to be used as „Desktop Firewall“.
The Chaos Computer Club finally made fun of commercially available Desktop Firewalls with a lot of stupid extra code[2] (Don’t compare them to Netfilter!) twenty years ago: https://ulm.ccc.de/ccc/chaosseminar/2004_12_personal_firewal...
Fake message from DNS1. Fake message from DNS2. The Desktop Firewall removes Windows from network because it blocks now the real DNS. It is old but even today the same things happen again and again.
[1] Bad. This is not what we want in a proper network. [2] It is not a mere firewall. It is not integrated into the system like Netfilter. It just a lot of extra code and tries to be smart. Which fails.
Host firewalls like ferm or ufw also make it easy to ignore these port bindings because it'll be blocked anyway. Whether that's the right mindset ("just bolt something else on"), idk, but that's the current practice
It's not great to have an unauthenticated RCE on a machine that is _not_ accessible from the internet, either. Inside-the-network RCE is useful for lateral movement and privilege escalation. RCE that you can find by looking for an open UDP port - instead of a vuln scan on 80/443 - is even better.
Initial entry is an important vuln abuse case, but not the _only_ abuse case.
300k and counting.
Weirdly enough, my printer is running cups-browsed, and available via my Public IP. I'm assuming some hack to transition one kind of machine to another - though that means it is running a full kernel, which is kinda astonishing.
But the POC works to control it, so...
Seriously, how are we still at this level of discussion?
In general I agree, most people affected probably didn't choose to expose the port it just "somehow accidentally happened".
+ All ports below 505.
+ Any port requested by NAT.
+ Any DynDNS request.
The printer made a NAT request, and now it's public.
> This may vary by distro and cloud image, but in general your servers should not be vulnerable to this. Your desktops may be.
... if you're not running CUPS then you're not affected. Noted.
and multiple distros e.g. only start it temporary if you are about to print. So even if you run cups in some cases you also have to actively print for it to be exploitable.
Oh no, there are two distribution-mandated package managers on my system but I refuse to acknowledge the existence of the second one because it offends my sensibilities. Well, add another step to your Ansible template, I guess: "apt autoremove --purge snapd && apt-mark hold snapd".
The people who have no idea what services are listening on their machine due to some default that someone else decided upon absolutely deserve to get owned, yes, because that's a totally reasonable mentality to have.
Sarcasm in case it wasn't obvious. At what point did it just become normal to be so user-hostile?
This is the quintessential wrong way of thinking about computers and security. It's the equivalent of the "OK, but.. [insert BS argument trying to deflect]". There is no "but", "Your" system has a bug/vulnerability/non-compliance - FIX it and help the users/customers instead of waterboarding us with pseudo-moralistic quips about "deserving" and whatnot.
The Universe is quite a big place with realities, situations and contexts you wouldn't even fathom. Be humble.
( Hope I wasn't too blunt :) )
Is that so hard to understand? You have to take security seriously. My point is that a firewall is the bare minimum you should be thinking about when setting up your server.
Don't blame or anger at people for not knowing their stacks entirely. There's so much to keep track of that it's totally understandable that something like this can fall through the cracks.
That's the whole point!!!
1. To predict or believe that something will happen
I expect it to get hacked because it's written in C.
2. To consider obligatory or required.
I expect servers to be secure!