Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HBSD: on i386 RWX pages were RX only
Submitted by: @lattera
- Loading branch information
Submitted by: @lattera
4b21e56There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just thought I'd give a bit of background for this commit to those following along.
From the discovery email (with a few modifications):
This commit (4b21e56) aims to do just that. OPNsense's kernel config sets PAX_INSECURE_MODE. We set it for i386 only because applications compiled on arm64 and amd64 generally do not have this problem (at least, not the set of applications OPNsense uses). As such, any non-i386 architecture is unaffected by the commit.
This commit effectively slightly weakens OPNsense's security posture on i386, due to allowing writable text segments (for TEXTRELs). However, i386 does not properly support non-executable pages, so nothing is really lost. Yeah, that's a seemingly contradictory statement; hopefully you understand what I mean. If not, then reply with a comment and I can explain further.
HardenedBSD would like to reiterate the importance of switching to 64-bit systems. Non-executable page enforcement is supported on the 64-bit architectures HardenedBSD supports (arm64 and amd64). The security posture of 64-bit architectures is far superior than 32-bit architectures.
4b21e56There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the additional info @lattera ! We plan to remove i386 with the HardenedBSD 12 adoption which would be in OPNsense 20.1 or 20.7.