From: Jann Horn <jann@thejh.net>
To: Daniel Micay <danielmicay@gmail.com>
Cc: kernel-hardening@lists.openwall.com
Subject: Re: [kernel-hardening] Re: Stack guard canary massaging
Date: Mon, 31 Oct 2016 14:14:50 +0100 [thread overview]
Message-ID: <20161031131450.GA2836@pc.thejh.net> (raw)
In-Reply-To: <1477914064.3558.4.camel@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]
[-CC oss-security, this is just about kernel stuff]
On Mon, Oct 31, 2016 at 07:41:04AM -0400, Daniel Micay wrote:
> On Mon, 2016-10-31 at 12:22 +0100, Solar Designer wrote:
> > On Mon, Oct 31, 2016 at 11:48:45AM +0100, Florian Weimer wrote:
> > > Sorry for cross-posting.
> >
> > Sorry to bikeshed, but I think this isn't a kernel-hardening topic at
> > all, so the thread should continue on oss-security only, please.
> >
> > Florian, if there's a reason why you think it's kernel-hardening
> > related, please let me know. To me, it looks like userspace hardening
> > that is not even kernel-assisted (at least not directly in this place,
> > even though the kernel may have helped provide the random numbers).
> >
> > If your cross-posting was to reach more of the right people, then you
> > have already done so, and they can join oss-security now. ;-)
> >
> > Alexander
>
> The kernel supports SSP but it doesn't appear to do the same thing.
>
> arch/*/include/asm/stackprotector.h
>
> Why do the non-x86 implementations XOR in LINUX_VERSION_CODE though? Is
> it supposed to be a placeholder for a random at compile-time value? :\
Only for the init task though.
For the others, it's chosen in dup_task_struct() (in kernel/fork.c),
using get_random_int() - which returns a 32-bit number, either straight
from RDRAND or from an MD5-based RNG using percpu state.
As far as I can tell, this means that the init task is the only one
that can have a 64-bit canary (e.g. on amd64); all the others have
canaries where the more significant half is all zeroes. Although
bruteforcing 32 bits isn't exactly easy, this should probably be fixed.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-10-31 13:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 10:48 [kernel-hardening] Stack guard canary massaging Florian Weimer
2016-10-31 11:22 ` [kernel-hardening] " Solar Designer
2016-10-31 11:41 ` Daniel Micay
2016-10-31 13:14 ` Jann Horn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161031131450.GA2836@pc.thejh.net \
--to=jann@thejh.net \
--cc=danielmicay@gmail.com \
--cc=kernel-hardening@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.