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


Groups > linux.kernel > #1679152

Re: [PATCH v2] ARM: fix randomized task_struct

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] ARM: fix randomized task_struct
Date Sat, 01 Jul 2017 00:00:01 +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>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9iZvJe7/NoRibQBC8lVdHu/Y86YkQyhW8gsAyAeiyqQ=; b=nq6iBmQDNlCPs2vtXzbu0eZbxE0XF1lGD7RQ80PfsrDRIiBcZGG/dIrDRNDyzu7ROJ uTB4KK3UG9avWiTc2Lj8ZiI6jVPMBzuYEVXhE+xf9mIxR3hQZ7dJPgZHdmYRvCZjMKMx wlfKXqaHfH6set1yYpV9bGqE/WrED4RGNxweXyMuALMea3Aix42FhvTq+RUQVit0xldS 8i/Y6Qn/MHAr3IYVhF5XwbRoS/BaXcSDtnxZV+5d/sTyb14YlPXLKR9Ks2jbRU5U8qi2 TPmGdw11df3K6ooOVxd2Osf0rDocei2g4pCCxuSCt5Zwb8b1CPHfHGv47iALICLAZ2w0 iPig==
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9iZvJe7/NoRibQBC8lVdHu/Y86YkQyhW8gsAyAeiyqQ=; b=ShxYqnAXc8tqwbvGtSFbrmsmCA6JzXzweA3A90l2qG1fXj1uxhkVgT1pNKmtH8mt1k fQ0NvKHksaqD5WTfnxFfQZQiI3aAywaWUlbuj35rv96xhmyR7BOM5GzCCOpEv2MBLAPz mVWHb1tnhvH7HHhUEHTjikG0kQe6BoUTGMGMY=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9iZvJe7/NoRibQBC8lVdHu/Y86YkQyhW8gsAyAeiyqQ=; b=or50LH6MXvXfIC12ube4ppoELLlb374tDXB48h7iPmUGGVJYcgUprEaHJHl9pwdD2j q6T/0Yoy/cZXdqsDr2w+O2s5HJpNyBzVqoS4ZOjG9oHiOn9vYze5EsESVCXuisGBGJnU YHE/DeuLlO7WjpUj6C+c0/65wWQMaLjVquy/mBAP/WNpa88wQnQJtIacoxpW/WZh0dDf WB1iMZANHcCzTEXomogEAMkjWofEm4YyFvrAJubhGWSBpEAMh75C1W/D44SHl3asZc55 dWzz1H4S9KwDVrVKbijwuED/oS32Zkfwf0rNKeQKkRvrz+kjO6v5EzrFFyEPJOvJ9hET ei2w==
X-Gm-Message-State AKS2vOx+MKZmLgRnlvQMX7/gva6fyyiid4AqiCTIFn+xIc0dAPNu8VdZ Jp0N3KfgRbmcaARyY61I3NMtCCcsWnrH
X-Received by 10.107.178.13 with SMTP id b13mr27255646iof.148.1498859659028; Fri, 30 Jun 2017 14:54:19 -0700 (PDT)
MIME-Version 1.0
X-Google-Sender-Auth MEPA7VM5hoY_LrTHrZHHWAo1ffs
Content-Type text/plain; charset="UTF-8"
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 39
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Fri, 30 Jun 2017 14:54:18 -0700
X-Original-Message-ID <CAGXu5jJwruzcWt0bvO=fm+9XX3OuZBp1W_O+V314R6xrwLAFLQ@mail.gmail.com>
X-Original-References <20170630160450.4093529-1-arnd@arndb.de> <CAGXu5j+TbpcmNFUxdYFKB=JZKDgkkEVZxyqUSOfQpwfMt9a+hg@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1679152

Show key headers only | 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 | Next — Previous 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