195 points · by beefhash · 8y ago · 69 comments
GnuPG and a few other security-conscious programs try to avoid this by using mlock() [1]. Unfortunately, by default the ZFS ARC can grow beyond the limit for wired pages, which will make those mlock() calls start failing once the system has been up long enough [2].
[1] http://pubs.opengroup.org/onlinepubs/7908799/xsh/mlock.html
[2] https://ximalas.info/2012/04/10/not-enough-room-for-wired-pa...
Relying on all tools correctly identifying their sensitive datasets and protecting them though mlock() is doomed to fail. If anything, a proper security concept should whitelist insensitive datasets, instead of blacklisting sensitive datasets.
I don't get why any modern OS would use unencrypted SWAP. The default should be either encrypted SWAP, or no SWAP at all. The downsides are negligible compared to the upsides.
When I was setting up dm-crypt for my Linux dev box at work I opted for using an encrypted swap as it really made sense: why keep on-disk stuff encrypted if swapped memory is in plain sight.
It turned out to be a somewhat bad decision, because when the system did run out of memory (thank you, Firefox and Skype) and began swapping, the whole box just freezes as the kernel was too busy encrypting more and more stuff, not having time to even run the OOM killer.
Maybe the systems use unencrypted swap to avoid triggering such bugs in default setups.
I also ran into this when setting memory limits on docker containers. It basically made them freeze for entire minutes when they hit the limit instead of killing them. So instead I wrote my own script to check and signal them to gracefully exit before memory runs out (and after a few more seconds SIGKILL them).
/s
469 days ago https://news.ycombinator.com/item?id=12484248
647 days ago https://news.ycombinator.com/item?id=11318508
For those who already have read it, document has been addended multiple times (see bottom of doc)
Thank you, I was just wondering how up to date this is.
Re: sendmail, check out the age of most of those CVEs (2006 or earlier). But also, see https://lists.freebsd.org/pipermail/freebsd-arch/2017-Decemb... .
OpenBSD shines because of the ongoing code audit, the minimalism, and the ability to easily make it into whatever you want. I don't care for any other OS for serious business. I will almost always use OpenBSD for servers, with RedHat or CentOS being the only other choice because of SELinux.
I would also venture to say that OpenBSD has the absolute best documentation of any OS out there, even better than FreeBSD.
SELinux is great for areas that are into DAC/MAC/RBAC, plus the aforementioned lengthy support. I see more and more customers wanting Red Hat/CentOS than any other Linux distro and for good reason. It just works. Things like CPanel only run on these distros. Red Hat/CentOS are also very predictable and they offer superb documentation. More and more people are uncomfortable with things like Debian because there is no throat to choke if they need support or if something goes pear shaped.
I have worked on Linux for 20 years now and I have never, ever seen Debian or Slackware or even Ubuntu in a TRULY mission-critical role. People may disagree, but there are reasons why Red Hat/CentOS are chosen. They are typically very stable, use tested software, and are well documented for the use cases they excel in. Red Hat runs some truly mission critical stuff like power grids, and more and more SCADA systems, now that they are being upgraded due to threats.
How about a router? I've been considering getting some single-board computer (probably an APU2[1]) and turning it into a router, possibly using OpenBSD + pf. Or maybe just install Pfsense. Or maybe use Linux and...iptables? (Not sure how that stack would look exactly)
Just a thought - if an unprivileged user could download the vulnerability list, couldn't a malicious but unprivileged local user just "download" an empty vulnerability list? At least it would take a user account created specifically for this purpose. (Which I admit would be a good idea!)
You might want to try HardenedBSD instead of regular FreeBSD though, to get all the exploit mitigation stuff.
The net result is that the compatibility argument, usually unintentionally, results in the status quo being kept for years. And when it already takes so long for these changes to make it out to users due to slow upgrade cycles, slow repackaging by downstream maintainers, slow uptake of new defaults, etc., with this same argument happening at each and every level… it often results in little to no progress over the span of years to common threats and pitfalls that are making people vulnerable today. That’s also why some of us try so hard to make sure developers get things right early on in their designs, since fixing it after the fact can be such an ordeal.
Of course, we understand the plight of maintainers not wanting to disrupt their users. It’s a difficult situation from both sides of the debate for sure. And also of course developing new features is more likely to make both users and developers happier than fixing security bugs is, at least in the short term. Just wanted to put the opposite perspective here as well since it felt underrepresented in previous discussions.
One thing to note, this isn’t necessarily indicative of my agreement with all of his analysis or belief that many of these are severe and need urgent fixing. This is more targeted at the meta-discussion around overzealous security people.
So, you may or may not know that, but you need FreeBSD and OpenBSD and they also need you! Every cent counts and so does every contributor, that helps the foundations keep their non-profit status. Also, you CAN be the change, if you specify what you'd like your donation to be used for (like more secure defaults for the OS).
That doesn't mean the Switch runs FreeBSD, just that Nintendo used some code from the kernel, which could be as small as adapting a single driver to their in-house OS.