Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1679152

Re: [PATCH v2] ARM: fix randomized task_struct

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] ARM: fix randomized task_struct
Date 2017-07-01 00:00 +0200
Message-ID <tYc7f-2oS-9@gated-at.bofh.it> (permalink)
References <tY6Ey-7DT-5@gated-at.bofh.it> <tY8Q1-td-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2] ARM: fix randomized task_struct Arnd Bergmann <arnd@arndb.de> - 2017-06-30 18:10 +0200
  Re: [PATCH v2] ARM: fix randomized task_struct Kees Cook <keescook@chromium.org> - 2017-06-30 20:30 +0200
    Re: [PATCH v2] ARM: fix randomized task_struct Kees Cook <keescook@chromium.org> - 2017-07-01 00:00 +0200

csiph-web