TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

OpenBSD may soon gain further memory protections: immutable userland mappings

179 pointsby fcambusover 2 years ago

8 comments

kyledrakeover 2 years ago
This security tech usually ends up in other platforms too, strongly recommend donating to their work: <a href="https:&#x2F;&#x2F;www.openbsdfoundation.org&#x2F;donations.html" rel="nofollow">https:&#x2F;&#x2F;www.openbsdfoundation.org&#x2F;donations.html</a>
评论 #32693963 未加载
评论 #32693103 未加载
评论 #32693642 未加载
评论 #32694446 未加载
评论 #32694175 未加载
评论 #32694226 未加载
teknopurgeover 2 years ago
I&#x27;m not adding insight to this thread, but I love the OpenBSD project. Theo and the team are goat engineers and industry advocates.
alberthover 2 years ago
This is beyond my knowledge but is this akin to macOS binary&#x2F;memory protection for the base system OS?
评论 #32693857 未加载
评论 #32693835 未加载
评论 #32693499 未加载
rwmjover 2 years ago
I&#x27;m curious why Theo used a new syscall. Wouldn&#x27;t it be sufficient to add a new MAP_IMMUTABLE flag to mmap which would &quot;fix&quot; the given range of pages&#x27; mappings and protections permanently? Can&#x27;t call it MAP_FIXED sadly :-)
评论 #32696084 未加载
roopyover 2 years ago
What exploit technique is this mitigating?
评论 #32695592 未加载
staticassertionover 2 years ago
I was just discussing this sort of thing with some colleagues. Because the stack frame for main contains a bunch of other stuff - environment variables, cli args, etc - it makes it unreliable to try to instrument Linux systems and collect that information. A process can change its name, args, env, at any time. That sort of information is really helpful for forensics.<p>Currently your only option is to pull data directly from kernel structures, which is fine, but most people aren&#x27;t doing that.<p>And then of course there&#x27;s other cool stuff like being able to &#x27;lock&#x27; system calls to the system provided libc, which openbsd can do since they already only support their provided libc.<p>Unfortunately none of this is likely to get to Linux at any point because:<p>a) I bet some insane userland processes fuck with their stacks<p>b) Linux doesn&#x27;t mandate any libc<p>edit: Seems like there&#x27;s some &quot;what is this&quot; being asked. Here&#x27;s my loose understand!<p>For starters, libc is the interface to the kernel. Very few programs make syscalls directly (except go programs i guess? lol) on Linux, but on openbsd it&#x27;s just flat out not allowed. OpenBSD doesn&#x27;t have the &quot;GNU&#x2F;Linux&quot; dichotomy - it&#x27;s all one package deal. As such, they get to mandate how userland calls into the kernel.<p>Of course, you don&#x27;t have to listen to openbsd today, because you can just... make those system calls directly. Easy. And this is relevant for security because attackers will do something called ROP, which effectively &quot;reuses&quot; bits of your already-executable code to issue system calls (you can google &quot;return to libc&quot; or &quot;ret2libc&quot;).<p>So, first thing&#x27;s first, have the kernel actually ensure that the sycall is issued from the memory that libc is mapped into. Cool, solved sort of.<p>But what if the attacker overwrites that libc? Now you&#x27;ve verified that the call is coming from libc but you don&#x27;t have <i>integrity</i>.<p>With immutability the kernel will now enforce that system calls come from libc <i>and</i> that the code can&#x27;t be overwritten.<p>Of course, this can extend beyond libc, but I&#x27;m assuming that&#x27;s the main point. This would presumably be a general system call that programs can use themselves to do all sorts of fun things.<p>edit: Can&#x27;t respond to replies, HN rate limited me :) sorry. Sounds like I need to read up a bit more, this doesn&#x27;t address the use case I&#x27;d had in mind sadly, but still very cool nonetheless.
评论 #32693582 未加载
评论 #32693239 未加载
评论 #32696559 未加载
评论 #32695911 未加载
评论 #32693709 未加载
jartover 2 years ago
Now all we need is for PROT_EXEC to not imply PROT_READ like Android.
评论 #32693641 未加载
评论 #32694358 未加载
评论 #32697853 未加载
评论 #32693741 未加载
dangover 2 years ago
Url changed from <a href="https:&#x2F;&#x2F;undeadly.org&#x2F;cgi?action=article;sid=20220902100648" rel="nofollow">https:&#x2F;&#x2F;undeadly.org&#x2F;cgi?action=article;sid=20220902100648</a>, which points to this.