[PATCH 0/2] STRICT_KERNEL_RWX weakened on ARM by CONFIG_ARM_LPAE=y

Russell King - ARM Linux linux at armlinux.org.uk
Thu Nov 9 01:37:34 PST 2017


On Wed, Nov 08, 2017 at 05:23:43PM -0800, Kees Cook wrote:
> On Wed, Nov 8, 2017 at 4:41 PM, Philip Derrin <philip at cog.systems> wrote:
> > Hi,
> >
> > This patch series fixes a bug which makes CONFIG_STRICT_KERNEL_RWX ineffective
> > when CONFIG_ARM_LPAE is enabled. Specifically, the kernel text and rodata are
> > mapped writeable. This has been the case since DEBUG_RODATA for ARM was first
> > merged in 3.19.
> >
> > The cause was an incorrect conflict resolution in 1e3479225acb ("ARM: 8275/1:
> > mm: fix PMD_SECT_RDONLY undeclared compile error") between the commit that
> > implemented DEBUG_RODATA, 80d6b0c2eed2 ("ARM: mm: allow text and rodata
> > sections to be read-only"), and another that moved the LPAE read-only bit into
> > a software bit, ded947798469 ("ARM: 8109/1: mm: Modify pte_write and pmd_write
> > logic for LPAE").
> >
> > The incorrect mappings were not apparent in the debugfs kernel_page_tables
> > dump because that was checking only the software RO bit, not the hardware RO
> > bit.
> 
> Thanks for catching this! Please consider both patches:
> 
> Reviewed-by: Kees Cook <keescook at chromium.org>

Where are these patches, and why weren't they copied to the arm kernel
list?

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up



More information about the linux-arm-kernel mailing list