|
|
Subscribe / Log in / New account

Linux gets fix for code-execution flaw (Ars Technica)

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 13, 2014 12:49 UTC (Tue) by torquay (guest, #92428)
In reply to: Linux gets fix for code-execution flaw (Ars Technica) by spender
Parent article: Linux gets fix for code-execution flaw (Ars Technica)

Why aren't these grsecurity features in the mainline kernel?
I'd be willing to take a (small) performance hit in order to have a more secure kernel by design.


to post comments

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 13, 2014 13:14 UTC (Tue) by NAR (subscriber, #1313) [Link] (5 responses)

At first glance RANDSTRUCT could cause problems with binary-only modules and might also hinder debugging.

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 13, 2014 13:19 UTC (Tue) by jpfrancois (subscriber, #65948) [Link]

Not to mention deployment. no binary distribution is possible, every machine must compile it's own kernel.

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 13, 2014 14:23 UTC (Tue) by spender (guest, #23067) [Link]

Any binary-only modules that would have problems with the specific randomization performed by RANDSTRUCT would be a clear case of GPL violation. We haven't yet received any reports of problems with binary-only modules.

-Brad

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 13, 2014 14:24 UTC (Tue) by PaXTeam (guest, #24616) [Link]

> At first glance RANDSTRUCT could cause problems with binary-only modules

only if the binary module incorporates randomized kernel structures which is then evidence for some deep reliance on kernel code and a potential license issue (and i'm sure some kernel devs would say it's a good thing in fact ;).

> and might also hinder debugging.

i don't get this one, why?

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 13, 2014 14:47 UTC (Tue) by torquay (guest, #92428) [Link] (1 responses)

Were these patches submitted to lkml and rejected? If so, what were the reasons?

It seems silly not to have them -- the prevention and frustration of entire classes of exploitations is a lot better than fixing each individual exploitation separately.

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 14, 2014 6:28 UTC (Wed) by Lionel_Debroux (subscriber, #30014) [Link]

Subsets of PaX were definitely submitted to LKML over time, e.g. patches constifying individual structs made purely of function pointers (before a GCC plugin replaced those individual hunks). Some patches went in, others weren't picked by maintainers.

Nowadays, spender, PaXTeam and ephox are known to be more inclined to work on improving the features of PaX / grsecurity from a technical POV (as a proof of that: in a post below, spender mentions a new protection in progress), than to deal with the politics of mainline submission.

What to do to meaningfully improve end user security of Linux ? I don't know.
* split PaX / grsecurity into more mergeable chunks ? Definitely, as there's no way mainline is going to integrate a nearly 4 MB patch touching a couple thousand files. But if mainline integration of the most interesting features is not going to occur no matter what, why bother ?

* submit low-hanging fruit from PaX / grsecurity to mainline ? Definitely. Several hunks get in, once in a while. But without the more powerful features, the actual contribution to end user security would be limited.

* expect mainline to start taking security seriously ? Unrealistic. For mainline - and in general, for the vast majority of users, even in known pervasive surveillance times - performance in micro-benchmarks and macro-benchmarks has much higher priority than serious security, and the useful prospect of closing entire classes of exploitations.

* except distros to start taking security seriously ? Unrealistic.
Even if PaX / grsecurity were fully integrated to mainline, most distros wouldn't enable it by default, due to
1) the performance cost of up to several dozen percents (with all protections enabled)
and either
2a) the unusability of unmodified sloppy desktop userspace on an enforcing grsecurity kernel (pax_softmode=0) with most grsecurity features enabled. I recently tried doing that on Mint: in enforcing mode, Cinnamon simply fails to start, with the FLOSS GPU drivers (which are known to be more compatible with grsecurity than nvidia and fglrx). With pax_softmode=1, Cinnamon starts, but I quickly noticed that `paxctl -PeMRXS` modified executables using some Webkit-based stuff get killed by the mprotect protection.
or
2b) the work required to selectively use paxctl to disable individual PaX protections, and periodically revisit those decisions (when some underlying libraries get fixed, it can become possible to re-enable e.g. mprotect hardening - but who's going to spend time noticing that ?).

* use another kernel, one whose makers pretend they take security seriously, e.g. OpenBSD ? As pointed by spender multiple times over the years (e.g. in exp_moosecox.c), OpenBSD defenses against exploitation are usually later to the party than PaX+grsecurity / Linux / even Windows defenses. And OpenBSD "market share" is low, so its actual contribution to end user security is limited - like grsecurity's.

I can't think of who, in the top kernel dev community, would have enough time and reputation to improve mainline Linux security though patiently submitting the bulk of PaX / grsecurity to mainline, one feature at a time...

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 13, 2014 14:59 UTC (Tue) by luto (guest, #39314) [Link] (2 responses)

FWIW, the mainline kernel effectively does KERNEXEC on Ivy Bridge and newer chips and UDEREF on Haswell chips.

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 13, 2014 15:26 UTC (Tue) by pbonzini (subscriber, #60935) [Link]

Unfortunately SMAP (processor feature to do UDEREF) ended up not being in Haswell. It will be in Broadwell.

Linux gets fix for code-execution flaw (Ars Technica)

Posted May 13, 2014 15:38 UTC (Tue) by PaXTeam (guest, #24616) [Link]

haswell doesn't have SMAP, only broadwell will (supposedly) have it. also the PaX features do more than these hw features, e.g.,

1. KERNEXEC on i386 does not only make userland non-executable from the kernel, but also makes all kernel data non-executable. this requires extra effort on top of SMEP and it isn't done in the mainline kernel properly.

2. UDEREF on i386 also enforces set_fs() separation that SMAP cannot do, separate accessors would be needed for that.

more info: https://forums.grsecurity.net/viewtopic.php?f=7&t=3046


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds