All of lore.kernel.org
 help / color / mirror / Atom feed
From: keescook@chromium.org (Kees Cook)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: mm: Mark .rodata as RO
Date: Tue, 16 Feb 2016 12:35:42 -0800	[thread overview]
Message-ID: <CAGXu5j+4uYjTjULw7hzdaYhN+JGqtybEpyT2Cihuj-2gXe=saA@mail.gmail.com> (raw)
In-Reply-To: <56C36EFF.9060900@labbott.name>

On Tue, Feb 16, 2016 at 10:48 AM, Laura Abbott <laura@labbott.name> wrote:
> On 2/16/16 10:10 AM, Kees Cook wrote:
>>
>> On Fri, Feb 12, 2016 at 10:25 AM, Mark Rutland <mark.rutland@arm.com>
>> wrote:
>>>
>>> On Fri, Feb 12, 2016 at 10:13:19AM -0600, Jeremy Linton wrote:
>>>>
>>>> Currently the .rodata section is actually still executable when
>>>> DEBUG_RODATA
>>>> is enabled. This changes that so the .rodata is actually read only, no
>>>> execute.
>>>>
>>>> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
>>
>>
>> Yikes, good catch. Is anyone running the lkdtm tests that check these
>> things?
>>
>
> I don't think the current lkdtm test would have caught this since the exec
> test is using rw data and not ro data. That test could be expanded though
> to include a rodata buffer as well.

Oh, yeah, excellent point. I'll send a patch.

-Kees

-- 
Kees Cook
Chrome OS & Brillo Security

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Laura Abbott <laura@labbott.name>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Jeremy Linton <jeremy.linton@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"Suzuki K. Poulose" <suzuki.poulose@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>
Subject: [kernel-hardening] Re: [PATCH] arm64: mm: Mark .rodata as RO
Date: Tue, 16 Feb 2016 12:35:42 -0800	[thread overview]
Message-ID: <CAGXu5j+4uYjTjULw7hzdaYhN+JGqtybEpyT2Cihuj-2gXe=saA@mail.gmail.com> (raw)
In-Reply-To: <56C36EFF.9060900@labbott.name>

On Tue, Feb 16, 2016 at 10:48 AM, Laura Abbott <laura@labbott.name> wrote:
> On 2/16/16 10:10 AM, Kees Cook wrote:
>>
>> On Fri, Feb 12, 2016 at 10:25 AM, Mark Rutland <mark.rutland@arm.com>
>> wrote:
>>>
>>> On Fri, Feb 12, 2016 at 10:13:19AM -0600, Jeremy Linton wrote:
>>>>
>>>> Currently the .rodata section is actually still executable when
>>>> DEBUG_RODATA
>>>> is enabled. This changes that so the .rodata is actually read only, no
>>>> execute.
>>>>
>>>> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
>>
>>
>> Yikes, good catch. Is anyone running the lkdtm tests that check these
>> things?
>>
>
> I don't think the current lkdtm test would have caught this since the exec
> test is using rw data and not ro data. That test could be expanded though
> to include a rodata buffer as well.

Oh, yeah, excellent point. I'll send a patch.

-Kees

-- 
Kees Cook
Chrome OS & Brillo Security

  reply	other threads:[~2016-02-16 20:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12 16:13 [PATCH] arm64: mm: Mark .rodata as RO Jeremy Linton
2016-02-12 18:25 ` Mark Rutland
2016-02-16 18:10   ` Kees Cook
2016-02-16 18:10     ` [kernel-hardening] " Kees Cook
2016-02-16 18:48     ` Laura Abbott
2016-02-16 18:48       ` [kernel-hardening] " Laura Abbott
2016-02-16 20:35       ` Kees Cook [this message]
2016-02-16 20:35         ` 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='CAGXu5j+4uYjTjULw7hzdaYhN+JGqtybEpyT2Cihuj-2gXe=saA@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.