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


Groups > linux.kernel > #1386657

(none)

Path csiph.com!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Thomas Garnier <thgarnie@google.com>
Newsgroups linux.kernel
Subject (none)
Date Mon, 25 Apr 2016 18:40:03 +0200
Message-ID <rrRIe-zA-9@gated-at.bofh.it> (permalink)
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=EcUN3UdDCIWfzNTtlWjUpnmZM7p5qLyxlBKELL+TzX0=; b=VjbyWBTHJH0eIBUeIFuv7YVaquaNgfMi04eK28t2cA+K6GNv6H7tIdmpSTh6VvUvpo RfiksWnyOuLD7ESVjmSWq4HDCO1zkPtcxGJOK6iOZGHByC56fjxDUK235BD4U0JRm1m5 eSRJVyQSSW3CA6Oti88s1x/4CZ/PRBLWB+NPJj5ZtGiBqbLLYjPbtbV2K1PqjRH2djYS oLIkH2KQKAMDTpfNRx00Mig0Qduvsgta/4Wel70xOO6ObPBMl6+9WfQQOoMRID3e4Cgp o0GowW/MJu62pWk/WztqEzQBx4BJi8rYjyYWvRliUMHjLLkwgDTSZfV7wj49joJCfCuK 5drQ==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EcUN3UdDCIWfzNTtlWjUpnmZM7p5qLyxlBKELL+TzX0=; b=dqlHsTgzZsq1lrdEe3rVkdJfXfLc8OJhYJoI9LQdtUsy7H+cHtkoYuYkw5I3tUnGI7 KCL0Scedmu7J51eQddORFbB1FF4hNFpiG3RtTepCFuwFHT+HQ2EupKl/zxaX/MKP0ikF 4fZShSWZAnT5wGeTQuhmfdPnXBHrHHo+KlYUT3Xe0He2/A0kKv6gEwhO3iPMpBmhuq88 GalZABpxetXZe1TjlWZbBSTSRdOH6++5NrNrjVT41Ja9EuluQFl7Zo+DdITpaL/Ys8rk RVvEhm/edJneErz6LhDJ/aVI8K7hgbk8d+ncpASOiSZtdq6Uh8Id23qPZqNgg/13zGkj 4KTw==
X-Gm-Message-State AOPr4FU2etZwHT7NeGrrkhrUhs+k0F0eYPRzZl6wRvyEBHKLii4+vvTB0WjXq3AVfvrBFtkC
X-Received by 10.98.15.142 with SMTP id 14mr50096019pfp.6.1461602258974; Mon, 25 Apr 2016 09:37:38 -0700 (PDT)
X-Mailer git-send-email 2.8.0.rc3.226.g39d4020
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 55
Organization linux.* mail to news gateway
X-Original-Cc x86@kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, gthelen@google.com, kernel-hardening@lists.openwall.com
X-Original-Date Mon, 25 Apr 2016 09:37:09 -0700
X-Original-Message-ID <1461602233-67310-1-git-send-email-thgarnie@google.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1386657

Show key headers only | View raw


This is PATCH v1 for KASLR memory implementation on x86_64. Minor changes
were done based on RFC v1 comments.

***Background:
The current implementation of KASLR randomizes only the base address of
the kernel and its modules. Research was published showing that static
memory can be overwitten to elevate privileges bypassing KASLR.

In more details:

    The physical memory mapping holds most allocations from boot and heap
    allocators. Knowning the base address and physical memory size, an
    attacker can deduce the PDE virtual address for the vDSO memory page.
    This attack was demonstrated at CanSecWest 2016, in the "Getting
    Physical Extreme Abuse of Intel Based Paged Systems"
    https://goo.gl/ANpWdV (see second part of the presentation). Similar
    research was done at Google leading to this patch proposal. Variants
    exists to overwrite /proc or /sys objects ACLs leading to elevation of
    privileges. These variants were tested against 4.6+.

This set of patches randomizes base address and padding of three
major memory sections (physical memory mapping, vmalloc & vmemmap).
It mitigates exploits relying on predictable kernel addresses. This
feature can be enabled with the CONFIG_RANDOMIZE_MEMORY option.

Padding for the memory hotplug support is managed by
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING. The default value is 10
terabytes.

The patches were tested on qemu & physical machines. Xen compatibility was
also verified. Multiple reboots were used to verify entropy for each
memory section.

***Problems that needed solving:
 - The three target memory sections are never at the same place between
   boots.
 - The physical memory mapping can use a virtual address not aligned on
   the PGD page table.
 - Have good entropy early at boot before get_random_bytes is available.
 - Add optional padding for memory hotplug compatibility.

***Parts:
 - The first part prepares for the KASLR memory randomization by
   refactoring entropy functions used by the current implementation and
   support PUD level virtual addresses for physical mapping.
   (Patches 01-02)
 - The second part implements the KASLR memory randomization for all
   sections mentioned.
   (Patch 03)
 - The third part adds support for memory hotplug by adding an option to
   define the padding used between the physical memory mapping section
   and the others.
   (Patch 04)

Thanks!

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


Thread

(none) Thomas Garnier <thgarnie@google.com> - 2016-04-25 18:40 +0200
  [PATCH 3/4] x86, boot: Implement ASLR for kernel memory sections (x86_64) Thomas Garnier <thgarnie@google.com> - 2016-04-25 18:40 +0200
  [PATCH 1/4] x86, boot: Refactor KASLR entropy functions Thomas Garnier <thgarnie@google.com> - 2016-04-25 18:40 +0200

csiph-web