Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1512938
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Daniel Micay <danielmicay@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random |
| Date | Mon, 31 Oct 2016 23:10:01 +0100 |
| Message-ID | <sysWd-8j5-9@gated-at.bofh.it> (permalink) |
| References | <sylrH-3r1-9@gated-at.bofh.it> <synjQ-4H2-31@gated-at.bofh.it> <synDb-4Pf-9@gated-at.bofh.it> <syrGN-7md-15@gated-at.bofh.it> <syrQt-7pC-19@gated-at.bofh.it> <sys09-7Ib-1@gated-at.bofh.it> <sys9Q-7LH-9@gated-at.bofh.it> <sysjv-7Pf-23@gated-at.bofh.it> <systc-7Sy-5@gated-at.bofh.it> |
| X-Original-To | Florian Weimer <fw@deneb.enyo.de> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version; bh=T8m2gwipPuHDZz+csmUzrgaGu+N964s0Jxtv6hLxjyY=; b=LpcRCFrl6wEo1agIly6dBv0xyYeRyTBtgfB/wjFbgbBizKAvQmBC+37YQmVxNHopjW ic3lbDm3dF936ka3H3d9Knp6GjcuqvyuVCFXC9Qp6sWefIxk8GgRXjkB3FQ5zF0ZIY3H WB4b8IDLzQwulE8MG4/XPnYdJwm2OYDSEfxNQp4JHSE519GH9EHgeb+d+WdAFwW2Ngv1 QqCaWza1/IXBLKzU+HmjIKh5SVUBGYbM2HLKmYi5vhKn4+7A5uA6UhddfDhWvO+Y8GOJ bpMtX3vpkZaCZunuGskqHk2ZCWrFCWjPoJVLZOZ/TAgNSHUG/1PdIsECILEjerqAOvI5 SrJA== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version; bh=T8m2gwipPuHDZz+csmUzrgaGu+N964s0Jxtv6hLxjyY=; b=YB/awJtwqoIP24QCAYA5N6YEm23s26vEc6eNafOdtn0DyAK3CD36qW2MH23zKcXB2c EN8czspa3fJe8zD4lpsmi4rPuh/e7RCqqwFtlo1xQzuPQuTZa7zfpjAx62LpuicHfmDf 1omG/v+Kbxt9mtS0Q3utiTeE8GP4ri+fL65WFg42lPnkLp6DTBzX7CJZ/vdVi136gngL +x4aZlrBLJCtO4beCaXKhCJ/2Hw9A0nTRlmVpTfmAdmiHF4Q/dRthH/NM1u5kAL8au3Y cck7VKRi61euSXJUoHXL5EcB76YgWXFE61kcIDeYWgyq/QIPW7n4LxDPES4bjYbVaUoI Liuw== |
| X-Gm-Message-State | ABUngvfgLGWVGsw6bRROvxOgWl7hKDwYCo/jIVUp5R/KJCZYAbXcTTQzDxGJcW1zbrMpHQ== |
| X-Received | by 10.237.38.226 with SMTP id q89mr10972095qtd.153.1477951339264; Mon, 31 Oct 2016 15:02:19 -0700 (PDT) |
| Content-Type | multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-8kaCEivm//HN2xHpycpf" |
| X-Mailer | Evolution 3.22.2 |
| MIME-Version | 1.0 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 87 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Jann Horn <jann@thejh.net>, Kees Cook <keescook@chromium.org>, kernel-hardening@lists.openwall.com, Andrew Morton <akpm@linux-foundation.org>, Michal Hocko <mhocko@suse.com>, Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>, LKML <linux-kernel@vger.kernel.org> |
| X-Original-Date | Mon, 31 Oct 2016 18:02:14 -0400 |
| X-Original-Message-ID | <1477951334.8761.15.camel@gmail.com> |
| X-Original-References | <1477922641-2221-1-git-send-email-jann@thejh.net> <CAGXu5j+Hz=AmmTAh3+QOv1wTG3HA60LPK0Dq6F8uybNQ5e+sHw@mail.gmail.com> <20161031162918.GA2994@pc.thejh.net> <87mvhks0vs.fsf@mid.deneb.enyo.de> <1477947388.8761.3.camel@gmail.com> <1477947674.8761.4.camel@gmail.com> <87ins8rzqm.fsf@mid.deneb.enyo.de> <1477948871.8761.9.camel@gmail.com> <8760o8ryh3.fsf@mid.deneb.enyo.de> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1512938 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Mon, 2016-10-31 at 22:38 +0100, Florian Weimer wrote: > * Daniel Micay: > > > -fstack-stack is supposed to handle a single guard by default, and > > that's all there is for thread stacks by default. > > Okay, then I'll really have to look at the probing offsets again. > It's been on my to-do list since about 2012, and arguably, it *is* a > user-space thing. This is concerning too: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66479 It might be prevented for VLAs by using -fsanitize=vla-bound -fsanitize- trap=vla-bound but probably not alloca (or the older -fsanitize- undefined-trap-on-error for GCC, since for some reason it doesn't seem to have the new way). > And I just realized that we should probably fail at dlopen time if > some tries to open a DSO which needs an executable stack, rather than > silently changing all thread stacks to executable. *sigh* > > > > > Note: talking about userspace after the entropy bit. The kernel > > > > doesn't > > > > really -fstack-check, at least in even slightly sane code... > > > > > > > > > There used to be lots of discussions about kernel stack sizes ... > > > > It should just be banning VLAs, alloca and large stack frames > > though, if > > it's not already. There wasn't even support for guard pages with > > kernel > > stacks until recently outside grsecurity, > > Which is not surprising, considering that one prime motivation for > small stacks was to conserve 32-bit address space. But I'm glad that > there is now a guard page. Hopefully, it does not affect performance, > and on 64-bit, at least there isn't the address space limit to worry > about. I think it might actually improve performance overall. > > and -fstack-check relies on them so it doesn't seem like a great > > solution for the kernel. > > -fsplit-stack could enforce stack usage limits even without guard > pages, but of course, there is some run-time overhead, and the limit > has to come from somewhere (typically the TCB). Yeah, that's how Rust provided stack safety on LLVM. They ended up removing it and they only have stack safety on Windows now, since LLVM doesn't yet provide stack probing outside Windows. So much for being a memory safe language... it's ultimately LLVM's fault though. There were actually working patches submitted for this by people working on Rust but *it never landed* due to endless bikeshedding + scope creep.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] fork: make whole stack_canary random Jann Horn <jann@thejh.net> - 2016-10-31 15:10 +0100
Re: [PATCH] fork: make whole stack_canary random Kees Cook <keescook@chromium.org> - 2016-10-31 17:10 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Jann Horn <jann@thejh.net> - 2016-10-31 17:30 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Florian Weimer <fw@deneb.enyo.de> - 2016-10-31 21:50 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Jann Horn <jann@thejh.net> - 2016-10-31 22:00 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Daniel Micay <danielmicay@gmail.com> - 2016-10-31 22:00 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Daniel Micay <danielmicay@gmail.com> - 2016-10-31 22:10 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Florian Weimer <fw@deneb.enyo.de> - 2016-10-31 22:20 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Jann Horn <jann@thejh.net> - 2016-10-31 22:30 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Florian Weimer <fw@deneb.enyo.de> - 2016-10-31 22:30 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Daniel Micay <danielmicay@gmail.com> - 2016-10-31 22:30 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Daniel Micay <danielmicay@gmail.com> - 2016-10-31 22:30 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Florian Weimer <fw@deneb.enyo.de> - 2016-10-31 22:40 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Daniel Micay <danielmicay@gmail.com> - 2016-10-31 23:10 +0100
Re: [kernel-hardening] Re: [PATCH] fork: make whole stack_canary random Florian Weimer <fw@deneb.enyo.de> - 2016-10-31 23:20 +0100
csiph-web