From: Kees Cook <keescook@chromium.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "kernel-hardening@lists.openwall.com"
<kernel-hardening@lists.openwall.com>,
Russell King <linux@armlinux.org.uk>,
Will Deacon <will.deacon@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ARM: fix randomized task_struct
Date: Fri, 30 Jun 2017 14:54:18 -0700 [thread overview]
Message-ID: <CAGXu5jJwruzcWt0bvO=fm+9XX3OuZBp1W_O+V314R6xrwLAFLQ@mail.gmail.com> (raw)
In-Reply-To: <CAGXu5j+TbpcmNFUxdYFKB=JZKDgkkEVZxyqUSOfQpwfMt9a+hg@mail.gmail.com>
On Fri, Jun 30, 2017 at 11:27 AM, Kees Cook <keescook@chromium.org> wrote:
> On Fri, Jun 30, 2017 at 9:03 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> With the new task struct randomization, we can run into a build
>> failure for certain random seeds:
>>
>> arch/arm/kernel/entry-armv.S: Assembler messages:
>> arch/arm/kernel/entry-armv.S:803: Error: bad immediate value for offset (4096)
>>
>> Only two constants in asm-offset.h are affected, and I'm changing
>> both of them here to work correctly in all configurations.
>>
>> One more macro has the problem, but is currently unused, so this
>> removes it instead of adding complexity.
>>
>> Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> Fixes: c33d8b12fbbd ("task_struct: Allow randomized layout")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Looks great, thanks!
>
> Reviewed-by: Kees Cook <keescook@chromium.org>
>
> Russell, if you're happy with it can you Ack this? I'd like to carry
> the change in the randstruct tree (so all the dependencies are in the
> same tree).
I've also forced stack_canary into the end of task_struct and inflated
the size of the struct (to match randomization inflation due to
intentionally poor bitfield packing), verified the resulting .o files
have the adjustment and boot tested both cases.
Tested-by: Kees Cook <keescook@chromium.org>
-Kees
--
Kees Cook
Pixel Security
WARNING: multiple messages have this Message-ID (diff)
From: keescook@chromium.org (Kees Cook)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: fix randomized task_struct
Date: Fri, 30 Jun 2017 14:54:18 -0700 [thread overview]
Message-ID: <CAGXu5jJwruzcWt0bvO=fm+9XX3OuZBp1W_O+V314R6xrwLAFLQ@mail.gmail.com> (raw)
In-Reply-To: <CAGXu5j+TbpcmNFUxdYFKB=JZKDgkkEVZxyqUSOfQpwfMt9a+hg@mail.gmail.com>
On Fri, Jun 30, 2017 at 11:27 AM, Kees Cook <keescook@chromium.org> wrote:
> On Fri, Jun 30, 2017 at 9:03 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> With the new task struct randomization, we can run into a build
>> failure for certain random seeds:
>>
>> arch/arm/kernel/entry-armv.S: Assembler messages:
>> arch/arm/kernel/entry-armv.S:803: Error: bad immediate value for offset (4096)
>>
>> Only two constants in asm-offset.h are affected, and I'm changing
>> both of them here to work correctly in all configurations.
>>
>> One more macro has the problem, but is currently unused, so this
>> removes it instead of adding complexity.
>>
>> Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> Fixes: c33d8b12fbbd ("task_struct: Allow randomized layout")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Looks great, thanks!
>
> Reviewed-by: Kees Cook <keescook@chromium.org>
>
> Russell, if you're happy with it can you Ack this? I'd like to carry
> the change in the randstruct tree (so all the dependencies are in the
> same tree).
I've also forced stack_canary into the end of task_struct and inflated
the size of the struct (to match randomization inflation due to
intentionally poor bitfield packing), verified the resulting .o files
have the adjustment and boot tested both cases.
Tested-by: Kees Cook <keescook@chromium.org>
-Kees
--
Kees Cook
Pixel Security
WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "kernel-hardening@lists.openwall.com"
<kernel-hardening@lists.openwall.com>,
Russell King <linux@armlinux.org.uk>,
Will Deacon <will.deacon@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [kernel-hardening] Re: [PATCH v2] ARM: fix randomized task_struct
Date: Fri, 30 Jun 2017 14:54:18 -0700 [thread overview]
Message-ID: <CAGXu5jJwruzcWt0bvO=fm+9XX3OuZBp1W_O+V314R6xrwLAFLQ@mail.gmail.com> (raw)
In-Reply-To: <CAGXu5j+TbpcmNFUxdYFKB=JZKDgkkEVZxyqUSOfQpwfMt9a+hg@mail.gmail.com>
On Fri, Jun 30, 2017 at 11:27 AM, Kees Cook <keescook@chromium.org> wrote:
> On Fri, Jun 30, 2017 at 9:03 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> With the new task struct randomization, we can run into a build
>> failure for certain random seeds:
>>
>> arch/arm/kernel/entry-armv.S: Assembler messages:
>> arch/arm/kernel/entry-armv.S:803: Error: bad immediate value for offset (4096)
>>
>> Only two constants in asm-offset.h are affected, and I'm changing
>> both of them here to work correctly in all configurations.
>>
>> One more macro has the problem, but is currently unused, so this
>> removes it instead of adding complexity.
>>
>> Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> Fixes: c33d8b12fbbd ("task_struct: Allow randomized layout")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Looks great, thanks!
>
> Reviewed-by: Kees Cook <keescook@chromium.org>
>
> Russell, if you're happy with it can you Ack this? I'd like to carry
> the change in the randstruct tree (so all the dependencies are in the
> same tree).
I've also forced stack_canary into the end of task_struct and inflated
the size of the struct (to match randomization inflation due to
intentionally poor bitfield packing), verified the resulting .o files
have the adjustment and boot tested both cases.
Tested-by: Kees Cook <keescook@chromium.org>
-Kees
--
Kees Cook
Pixel Security
next prev parent reply other threads:[~2017-06-30 21:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 16:03 [PATCH v2] ARM: fix randomized task_struct Arnd Bergmann
2017-06-30 16:03 ` [kernel-hardening] " Arnd Bergmann
2017-06-30 16:03 ` Arnd Bergmann
2017-06-30 18:27 ` Kees Cook
2017-06-30 18:27 ` [kernel-hardening] " Kees Cook
2017-06-30 18:27 ` Kees Cook
2017-06-30 21:54 ` Kees Cook [this message]
2017-06-30 21:54 ` [kernel-hardening] " Kees Cook
2017-06-30 21:54 ` Kees Cook
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='CAGXu5jJwruzcWt0bvO=fm+9XX3OuZBp1W_O+V314R6xrwLAFLQ@mail.gmail.com' \
--to=keescook@chromium.org \
--cc=arnd@arndb.de \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=will.deacon@arm.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.