389
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 26 Feb 2025
389 points (94.3% liked)
Open Source
33247 readers
207 users here now
All about open source! Feel free to ask questions, and share news, and interesting stuff!
Useful Links
- Open Source Initiative
- Free Software Foundation
- Electronic Frontier Foundation
- Software Freedom Conservancy
- It's FOSS
- Android FOSS Apps Megathread
Rules
- Posts must be relevant to the open source ideology
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
- !libre_culture@lemmy.ml
- !libre_software@lemmy.ml
- !libre_hardware@lemmy.ml
- !linux@lemmy.ml
- !technology@lemmy.ml
Community icon from opensource.org, but we are not affiliated with them.
founded 5 years ago
MODERATORS
The choice of C++ + Swift feels strange and off-putting to me. Swift, at least, is pretty safe as languages go, but does leave me scratching my head a bit. C++, though, frankly should have no place in a new browser project. For a piece of software whose whole purpose is to essentially download and run untrusted code, C++ is unacceptable.
It's realistically not gonna happen, but what I'd really like to see is Servo developed into a full browser.
Could you explain how their language choice affects the security of the software? Because it's open source and easier to find cracks?
No, the industry consensus is actually that open source tends to be more secure. The reason C++ is a problem is that it's possible, and very easy, to write code that has exploitable bugs. The largest and most relevant type of bug it enables is what's known as a memory safety bug. Elsewhere in this thread I linked this:
https://www.chromium.org/Home/chromium-security/memory-safety/
Which says 70% of exploits in chrome were due to memory safety issues. That page also links to this article, if you want to learn more about what "memory safety" means from a layperson's perspective:
https://alexgaynor.net/2019/aug/12/introduction-to-memory-unsafety-for-vps-of-engineering/
Cool, it makes sense I guess. But why would other languages not also be succeptible to memory injections?
In simple terms, they just don't allow you to write code that would be unsafe in those ways. There are different ways of doing that, but it's difficult to explain to a layperson. For one example, though, we can talk about "out of bounds access".
Suppose you have a list of 10 numbers. In a memory unsafe language, you'd be able to tell the computer "set the 1 millionth number to be '50'". Simply put, this means you could modify data you're not supposed to be able to. In a safe language, the language might automatically check to make sure you're not trying to access something beyond the end of the list.