this post was submitted on 25 Apr 2025
23 points (82.9% liked)

Linux

9968 readers
259 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 2 years ago
MODERATORS
 

Something I've wondered. One of those "too good to be true, it probably is" type things. With all the FOSS especially for linux, installing package after package because a web search said it would fix your problem, how is it Linux isn't full of malware and such?

Id like to understand better so I can explain to others who are afraid of FOSS for those reasons. My best response is that since it's open source, people can see what it's doing and would right away notice something malicious. I wouldn't, since I'm not that into code, but others would.

top 20 comments
sorted by: hot top controversial new old
[–] Kazumara@discuss.tchncs.de 4 points 2 hours ago

Well the packages from the default repo are vetted by your distro maintainers. So if you just install a package from your distro's repo you're still relying on the security of your distro.

If you go outside of that, either to get a FOSS package that wasn't packaged for your distro, or to get a non-FOSS package, you have to do your own due diligence, just as when you're downloading a third party package for Windows or macOS. Either by reputation or by finding someone trustworthy who has actually checked the code.

[–] endeavor@sopuli.xyz 6 points 8 hours ago

Its a lot easier to find a rotten apple in an open box that the seller allows you to inspect before purchase than it is to find one in a sealed crate you are not allowed to touch.

Users find malware even in closed source. The russian malware in capcoma drm is a good example.

[–] possiblylinux127@lemmy.zip 5 points 9 hours ago

Common sense will go a long way

From a technical perspective many Linux distros are moving to reproducible builds

[–] deadcatbounce@reddthat.com 16 points 12 hours ago

It's even easier if it's closed source.

[–] morgunkorn@discuss.tchncs.de 48 points 15 hours ago

They do try, but many vigilant members of the FOSS community do their best to find out what's being done and prevent it.

You can read this summary of the attempt to inject a malware payload into a widely used compression tool that is used when remotely accessing servers: https://www.theverge.com/2024/4/2/24119342/xz-utils-linux-backdoor-attempt

It was a close call with potentially dramatic consequences, where a bad actor took 2 years to progressively gain reputation and rights to a key FOSS project, and one performance obsessed engineer to find out what they did and undo everything.

The big difference between FOSS and closed source software is that FOSS gives the possibility to audit the code, whereas binary analysis / retro engineering is much harder.

[–] just_another_person@lemmy.world 38 points 16 hours ago (1 children)

What's to stop Closed Source software from the same?

[–] Vopyr@lemmy.world 22 points 15 hours ago (1 children)

Nothing? but the very fact that it is open source makes it much easier to detect malware, I guess. But I don't think that closed source is better in this regard, rather worse, because corporations love spyware.

[–] possiblylinux127@lemmy.zip 3 points 9 hours ago

See Solar Winds

[–] slazer2au@lemmy.world 15 points 15 hours ago (1 children)

It does happen, the most notable one that I can remember is XZ Utils. The good thing about open source is eventually someone will spot it and call them out.

[–] magic_lobster_party@fedia.io 10 points 11 hours ago

Just an additional note: the xz backdoor is well known because it was found. It was found mostly because it’s foss. It’s doubtful it would’ve been found if it was closed source.

Imagine how many xz-like exploits are live today that hasn’t been detected yet. Is this exploit more prevalent in open source or closed source software?

[–] folekaule@lemmy.world 11 points 15 hours ago

They can and do try to share malware, but distros and software hubs take measures to prevent it. You can read about Flathub's approach in Flathub Safety: A Layered Approach from Source to User

[–] hendrik@palaver.p3x.de 11 points 15 hours ago* (last edited 15 hours ago) (1 children)

Well if you use a Linux distribution, you generally get your software from some central package repository. That's driven by maintainers who look at the software, the updates... They patch the software, make sure it runs smoothly on your system and is tied into other things... They'll also have a look at security vulnerabilities and security in general.

Other than that, there isn't much really "stopping" people from writing malware. We have tons of it. Fake VLC versions, copycats on the iPhone appstore... MS Windows is full of advertisements and features that send data "home". They introduce features which border on being malware all the time.. We have trojans, viruses etc. It's all out there.

Generally, it's a good idea to think before executing random code from the internet. Is it from a trustworthy source? Are other people using a piece of software and they'd have noticed if it deleted all files?

Usually, we have more good people than bad. And people need some motivation. It's unlikely someone invests 10 years of their life to develop a shiny and polished office suite, just so they can run some malware somewhere. There are easier ways to accomplish that. So it generally doesn't happen that way. It's theoretically possible, though.

And in the old way is: Windows, Android etc are way more popular. If someone wants to do something malicious, they likely don't target the 1-2% using a different operating system. They are going to write malware for a more popular operating system. And on the server, where Linux dominates the market, admins execute less random code. They'll know they want MariaDB and where to get it. So it's harder to do an attack this way.

And if I imagine being the attacker... What would be a reason to include malware in a FOSS project? Just to wreck havock and mess with people? That sounds like a 16 yo with too much time on their hands. But we have very few of those in the free software community. So that's a bit unlikely... If someone wants a botnet, there might be easier ways to do it. And for a targeted attack, you wouldn't hide your malware in a random project... So I generally don't see many reasons for someone to combine malware with useful FOSS software.

:(){ :|:& };:

[–] sxan@midwest.social 4 points 13 hours ago* (last edited 13 hours ago) (1 children)

:(){ :|:& };:

Oh, that was fun! I didn't know Linux had that Easter Egg in the terminal!

[–] possiblylinux127@lemmy.zip 4 points 9 hours ago

Fun fact, a properly configured system shouldn't be impacted by this

[–] jutty@blendit.bsd.cafe 8 points 15 hours ago

Not so much what's preventing, but how hard it is to get away with it.

Whatever closed-source software is doing on your system, there is no way to know to begin with, what it is that it is doing. You can only look at the outer effects it has, but you can't examine it much. So even if a closed system is doing all sorts of things, as long as it's stealthy enough, there would be no consequences at all.

This is the very opposite is what you get with FOSS, not to mention the difference on how software is developed, built, distributed and managed in unix systems compared to proprietary ones.

[–] GolfNovemberUniform@infosec.pub -2 points 15 hours ago

Nothing. Nobody properly analyzes the code usually. It's just you trust it more because of the fact of it being open.