From patchwork Thu Aug 16 22:17:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Popov X-Patchwork-Id: 10568263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12B5E139B for ; Thu, 16 Aug 2018 22:19:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 011CE2B8C4 for ; Thu, 16 Aug 2018 22:19:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E83542B8C8; Thu, 16 Aug 2018 22:19:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 0C4762B8C4 for ; Thu, 16 Aug 2018 22:19:14 +0000 (UTC) Received: (qmail 28649 invoked by uid 550); 16 Aug 2018 22:18:02 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 28433 invoked from network); 16 Aug 2018 22:17:53 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=0A8QEA2h1KI008+4dxNvYAN15l5CciWAGDhg8wfZFQ0=; b=D8qkixWbnrfW7gebEEoRtRN/Wctt5K9/Hz/Y9RAGMcY6drrZrHKxErOqqzE02ZtqS8 QwZDHvVtka7G8KRRBdkk5itRA0I/t9kjqTlbScsWGbar9K/7xg8S/pG560KkSPiwSwv2 71MBBpApO36R5/Ho4WyW6yV8pyT8ChyRX/H3pivr0Cx9i5WMwhzYpxXCbJ5a685xc2kE l6h67x5U7TrvzG0bXJeUqOoVg1lPp0eB9HZ7voP56vfYhxC4BKtiPJ/CuSNOEH5SPbRp H4Z5ugGpNQ2PxXnKC/u8bJIvhxfB1LqBiJ9AZhC5UlDGNk9DSJ6hE3Lk8WULF2eG1rKA Y8nA== X-Gm-Message-State: AOUpUlG+fHS94DaXq9i4jDTBdqWELs4I3WtBthpjXM0pFnhK49kvAgyt Wps1MlQ+Tw63/oC6ORpCKr7WbwQUpfM= X-Google-Smtp-Source: AA+uWPzMwpH/ALGXTRzkD7v3YKvfNeK0KBelrdqhpt5ryl2KdPYaXar/8SIklnKb71KmQL0dRReHRA== X-Received: by 2002:a19:e955:: with SMTP id g82-v6mr20303524lfh.44.1534457862316; Thu, 16 Aug 2018 15:17:42 -0700 (PDT) From: Alexander Popov To: kernel-hardening@lists.openwall.com, Kees Cook , PaX Team , Brad Spengler , Ingo Molnar , Andy Lutomirski , Tycho Andersen , Laura Abbott , Mark Rutland , Ard Biesheuvel , Borislav Petkov , Richard Sandiford , Thomas Gleixner , "H . Peter Anvin" , Peter Zijlstra , "Dmitry V . Levin" , Emese Revfy , Jonathan Corbet , Andrey Ryabinin , "Kirill A . Shutemov" , Thomas Garnier , Andrew Morton , Alexei Starovoitov , Josef Bacik , Masami Hiramatsu , Nicholas Piggin , Al Viro , "David S . Miller" , Ding Tianhong , David Woodhouse , Josh Poimboeuf , Steven Rostedt , Dominik Brodowski , Juergen Gross , Linus Torvalds , Greg Kroah-Hartman , Dan Williams , Dave Hansen , Mathias Krause , Vikas Shivappa , Kyle Huey , Dmitry Safonov , Will Deacon , Arnd Bergmann , Florian Weimer , Boris Lukashev , Andrey Konovalov , x86@kernel.org, linux-kernel@vger.kernel.org, alex.popov@linux.com Subject: [PATCH v15 5/7] doc: self-protection: Add information about STACKLEAK feature Date: Fri, 17 Aug 2018 01:17:02 +0300 Message-Id: <1534457824-7211-6-git-send-email-alex.popov@linux.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534457824-7211-1-git-send-email-alex.popov@linux.com> References: <1534457824-7211-1-git-send-email-alex.popov@linux.com> X-Virus-Scanned: ClamAV using ClamSMTP Add information about STACKLEAK feature to the "Memory poisoning" section of self-protection.rst. Signed-off-by: Alexander Popov --- Documentation/security/self-protection.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/security/self-protection.rst b/Documentation/security/self-protection.rst index e1ca698..f584fb7 100644 --- a/Documentation/security/self-protection.rst +++ b/Documentation/security/self-protection.rst @@ -302,11 +302,11 @@ sure structure holes are cleared. Memory poisoning ---------------- -When releasing memory, it is best to poison the contents (clear stack on -syscall return, wipe heap memory on a free), to avoid reuse attacks that -rely on the old contents of memory. This frustrates many uninitialized -variable attacks, stack content exposures, heap content exposures, and -use-after-free attacks. +When releasing memory, it is best to poison the contents, to avoid reuse +attacks that rely on the old contents of memory. E.g., clear stack on a +syscall return (``CONFIG_GCC_PLUGIN_STACKLEAK``), wipe heap memory on a +free. This frustrates many uninitialized variable attacks, stack content +exposures, heap content exposures, and use-after-free attacks. Destination tracking --------------------