[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2SQkrldCVDiTeia@casper.infradead.org>
Date: Thu, 19 Dec 2024 21:30:58 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Audra Mitchell <audra@...hat.com>
Cc: linux-mm@...ck.org, raquini@...hat.com, aris@...hat.com,
akpm@...ux-foundation.org, william.kucharski@...cle.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Stop PMD alignment for PIE shared objects
On Thu, Dec 19, 2024 at 04:15:52PM -0500, Audra Mitchell wrote:
> After commit 1854bc6e2420 ("mm/readahead: Align file mappings for non-DAX")
> any request through thp_get_unmapped_area would align to a PMD_SIZE,
> causing shared objects to have less randomization than previously (9 less
> bits for 2MB PMDs). As these lower 9 bits are the most impactful for
> ASLR, this change could be argued to have an impact on security.
Yes, very tiresome people have been making that argument for a long
time. Do you have anything further to add to the discussion that
happened here:
https://lore.kernel.org/linux-mm/20240118133504.2910955-1-shy828301@gmail.com/
particularly in light of 3afb76a66b55 existing.
> Fix this issue by checking that the request is aligned to the PMD_SIZE,
> otherwise fall back to mm_get_unmapped_area_vmflags().
NAK this version anyway. Even if the executable is, say, 2.1MB in size,
we still want the first 2MB of the file to be covered with a PMD
mapping.
Powered by blists - more mailing lists