From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 411C4C433E1 for ; Mon, 17 Aug 2020 19:24:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E055920658 for ; Mon, 17 Aug 2020 19:24:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="kl0qMavr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E055920658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 18DBC6B0002; Mon, 17 Aug 2020 15:24:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 13EC56B0005; Mon, 17 Aug 2020 15:24:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0053B6B0006; Mon, 17 Aug 2020 15:24:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0021.hostedemail.com [216.40.44.21]) by kanga.kvack.org (Postfix) with ESMTP id DF0CE6B0002 for ; Mon, 17 Aug 2020 15:24:41 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7807D364B for ; Mon, 17 Aug 2020 19:24:41 +0000 (UTC) X-FDA: 77161037562.26.quiet50_5813bbd27019 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 9CE631801F0C7 for ; Mon, 17 Aug 2020 19:24:32 +0000 (UTC) X-HE-Tag: quiet50_5813bbd27019 X-Filterd-Recvd-Size: 4895 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Mon, 17 Aug 2020 19:24:32 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id 189so7936759pgg.13 for ; Mon, 17 Aug 2020 12:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=n32LWoSrsD3yQ3rMPfKnibY9bI4SixyCGhqWBe/ljHM=; b=kl0qMavriKg0e81CBNLz0jae/dnxJ+iW38gvYVPjCqfQaZ+mAYzLkbyiP+bHcdJX/r 4GaLIsElPRD0nX/WfT98jtJoPe7Y1PB20/5qoA4l7Luu2OOw/7Cf7PPJ1w11WT14NtFQ 1t42W+NHFHCPaxa6F7e5H3S27ECjJwNGgvJrg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=n32LWoSrsD3yQ3rMPfKnibY9bI4SixyCGhqWBe/ljHM=; b=gxg/BW4KkZl01zd/fq3loX5H78O1kR7nu7jT1m1uE59vw5+etY82iNuQ2+Dk0c7n2T 5Lbb0LeuvArIaQiyNkqEkmihEyS31X2nJBHdZwwyfaVXJ4OYQA6AlAu/CoGOLDLnI9V6 q1r6uKq+YiUO5oh8DLgO4WV4D26cmtWgT0TaA18cjsbUq7p1CkfH4BXT5HM6sZ291TAB o+qr7QeNZHMy6IIFI8XwrO08gQmYQWm4uIQ/CTCgKm+Dj8YzBe5QvDaRRzCL+10bUpGN nv4uGlzOLTOgt2qgjFGzhWJnEDXN1P+igwM3Fp5hyBiNbADUQkHhVOij1jkdbPjeycfQ +9mQ== X-Gm-Message-State: AOAM533v3y9/LLLVJs29xtLImkTmSR6oSzO8STfPFtMRuOMhbSvcnhfN EkJlteCj5SnXy/D1lx3dnqMjmw== X-Google-Smtp-Source: ABdhPJxCnvr7OdyyfXgIjuvAGgqlvP3yekGPuJmDIAr7WhUPsbyprRa3J1vBwlaotiAdfvEJElUFww== X-Received: by 2002:a62:928d:: with SMTP id o135mr9014150pfd.22.1597692271280; Mon, 17 Aug 2020 12:24:31 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i1sm21321974pfo.212.2020.08.17.12.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 12:24:30 -0700 (PDT) Date: Mon, 17 Aug 2020 12:24:29 -0700 From: Kees Cook To: "Eric W. Biederman" Cc: Alexander Popov , Jann Horn , Will Deacon , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Masahiro Yamada , Masami Hiramatsu , Steven Rostedt , Peter Zijlstra , Krzysztof Kozlowski , Patrick Bellasi , David Howells , Johannes Weiner , Laura Abbott , Arnd Bergmann , Greg Kroah-Hartman , kasan-dev@googlegroups.com, linux-mm@kvack.org, kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, notify@kernel.org, Kexec Mailing List Subject: Re: [PATCH RFC 2/2] lkdtm: Add heap spraying test Message-ID: <202008171222.3F206231E@keescook> References: <20200813151922.1093791-1-alex.popov@linux.com> <20200813151922.1093791-3-alex.popov@linux.com> <87zh6t9llm.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zh6t9llm.fsf@x220.int.ebiederm.org> X-Rspamd-Queue-Id: 9CE631801F0C7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Aug 17, 2020 at 01:24:37PM -0500, Eric W. Biederman wrote: > Alexander Popov writes: > > > Add a simple test for CONFIG_SLAB_QUARANTINE. > > > > It performs heap spraying that aims to reallocate the recently freed heap > > object. This technique is used for exploiting use-after-free > > vulnerabilities in the kernel code. > > > > This test shows that CONFIG_SLAB_QUARANTINE breaks heap spraying > > exploitation technique. > > > > Signed-off-by: Alexander Popov > > Why put this test in the linux kernel dump test module? > > I have no problem with tests, and I may be wrong but this > does not look like you are testing to see if heap corruption > triggers a crash dump. Which is what the rest of the tests > in lkdtm are about. Seeing if the test triggers successfully > triggers a crash dump. The scope of LKDTM has shifted a bit, and I'm fine with tests that don't cause crashes as long as they're part of testing system-wide defenses, etc. It's easier to collect similar tests together (even if they don't break the system). -- Kees Cook