Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 495244 - =sys-kernel/hardened-sources-3.12.6 fails to boot with RLIMIt_STACK
Summary: =sys-kernel/hardened-sources-3.12.6 fails to boot with RLIMIt_STACK
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-24 15:31 UTC by Vadim A. Misbakh-Soloviov (mva)
Modified: 2014-09-14 00:12 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_495244.txt,19.22 KB, text/plain)
2013-12-24 15:35 UTC, Vadim A. Misbakh-Soloviov (mva)
Details
boot1.log (file_495244.txt,1.12 KB, text/plain)
2013-12-24 15:36 UTC, Vadim A. Misbakh-Soloviov (mva)
Details
boot2.log (file_495244.txt,1.05 KB, text/plain)
2013-12-24 15:37 UTC, Vadim A. Misbakh-Soloviov (mva)
Details
.config (file_495244.txt,58.75 KB, text/plain)
2013-12-24 15:39 UTC, Vadim A. Misbakh-Soloviov (mva)
Details
diff_harden_vanilla (file_495244.txt,8.16 KB, patch)
2013-12-29 17:52 UTC, Vadim A. Misbakh-Soloviov (mva)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-24 15:31:09 UTC
I just updated hardened kernel to 3.12.6 and can't boot: grsec crashes init with
> grsec: denied resource overstep by requesting 3221225472 for RLIMIT_STACK against limit 8388608 for /sbin/init[swapper/0:1] uid/euid:0/0 gid/egid:0/0, parent /[swapper/0:0] uid/euid:0/0 gid/egid:0/0
> BUG: unable to handle kernel NULL pointer dereference at    (nil)

(see attached boot logs)

P.S. 3.12.5 boots like a charm


Reproducible: Always
Comment 1 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-24 15:35:45 UTC
Created attachment 366104 [details]
emerge --info

This is emerge info
Comment 2 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-24 15:36:34 UTC
Created attachment 366106 [details]
boot1.log

This is original bootlog
Comment 3 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-24 15:37:50 UTC
Created attachment 366108 [details]
boot2.log

This is bootlog, where I disabled hwclock stuff (time syncing) by blueness suggestion.
Kernel still doesn't boot.
Comment 4 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-24 15:39:43 UTC
Created attachment 366110 [details]
.config

This is kernel's .config file I using for all my builds (including 3.12.5)
Comment 5 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-28 20:14:01 UTC
=hardened-sources-3.12.6-r2 seems to be fixed now
Comment 6 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-29 05:35:37 UTC
Although, now I've some troubles with IPv6 neighbour discovery between Xen domUs (not sure, if it is related only to xen or at all).
Comment 7 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-29 15:14:50 UTC
So, despite of original issue (with restricting init to start) is fixed, hardened 3.12.6 is still broken:
somewhy it makes kernel to ignore acpi_rsdp cmdline option (so, kernel can't find RSDP table and then limits CPU core to 1 for entire system).
I just tested with vanilla 3.12.6 and it works fine there.
Comment 8 PaX Team 2013-12-29 15:31:21 UTC
acpi_rsdp is used only under CONFIG_KEXEC which depends on !CONFIG_GRKERNSEC_KMEM which you have enabled.
Comment 9 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-29 16:16:51 UTC
Yup.

1) somewhy it enables itself on make nconfig execution,
2) It's strange, but last time I tested it with manually disabled CONFIG_GRKERNSEC_KMEM and enabled KEXEC, it wasn't working too. But now, after a day full of debugging, it working on last my attempt, thanks.


So, as for now, it is one more issue with .6 hardened kernel (that okay in .5):

I can't point it's source exactly, but that is the situation:
a) it is few virtual machines (Xen domUs)
b) they has link-local IPv6 addressed (fe80:: ones) and ULA ones (from fc00::/7) for internal networking (nfs, dns, DB and so on)
c) on hardened <=3.12.5 all works fine
d) on 3.12.6 some machines gone unreachable (for any kind of traffic, will it be tcp, udp, icmp, ...) with ULA-address for some others, unless unreachable machine itself pings machine that missed it. But it stays accessible with link-local addresses (that is non need neighbour discovery).

I'd suggest it is something with ND (neigbour discovery) or much globally,  multicasting (or one more new grsec option hardening networking in strange way). But I don't even know where to debug.
Comment 10 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-29 17:33:39 UTC
uhm, lol, strange: 3.12.6 produces such network behaviour (described abode) even if it is installed only on virthost (dom0).
Comment 11 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-29 17:52:10 UTC
Created attachment 366464 [details, diff]
diff_harden_vanilla

there is a diff between config of vanilla 3.12.6 host kernel (where it is no such behaviour) and latest (-r2) hardened sources.


Can something of that option lead to that behaviour? Or it, possibly, bug somewhere deeper in kernel code?
Comment 12 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-12-29 18:27:59 UTC
Although, looking at that fact, that 3.12.5-hardened-r1 works fine with identical to bugged-3.12.6-hardened-r2 kernel config, I'd suggest it is something in the hardened patches...
Comment 13 PaX Team 2014-01-02 20:02:16 UTC
spender regularly backports fixes from vanilla that are not yet in stable and it's possible that one of these broke ipv6 (and will probably break stable when it gets the patch in question). maybe you can look at http://www.grsecurity.net/~spender/changelog-test.txt and revert the network related backports (say, b1aac815c0891fe4a55a6b0b715910142227700f) and see if any one is the culprit.
Comment 14 Anthony Basile gentoo-dev 2014-09-14 00:12:15 UTC
3.12.6 has been off the tree for a while.  Given that this was probably a backported patch by spender which is probably resolved by now, I'm going to close this as obsolete.  Please reopen if you are still hitting this.