Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp621393pxp; Wed, 9 Mar 2022 09:15:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJz72V1FJYUzMO0qXA8PcZIi8zIMHZd9xMdrKs7vKYTsyjeZpgHuUQWGhl7IH7biWuszlGFe X-Received: by 2002:a05:6808:138b:b0:2d9:a01a:4bb7 with SMTP id c11-20020a056808138b00b002d9a01a4bb7mr358967oiw.222.1646846106321; Wed, 09 Mar 2022 09:15:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646846106; cv=none; d=google.com; s=arc-20160816; b=XtSlsqIFhSm2ypSl5MP6dv7Cbaba4Usm/0K5WcTdocT4OuyuY307j8N6hGxrCtgeY3 g3qL022lIiW+0PkMA2uNoo6EakXh+1sxfmCxziVpUzFbthJUhR93dWBrOsazgxKRU8vj /siBZy2MslCm+cNarfqP+K09uQBtA3B1UEo467H0imN2XNYW5/21pyav78mKOboGLOxO 241an57z61HzIaHRBCMqKY+jJ/VPvD7rIjRTD0v0TrNZvHHE+l8goC8xrtelvPU96b/u vbWF8Qywu1HO5KeRq9TZFBRPHWHWUe47wlq8FYyEaU3izdQZeLMuIwI9CFmpy94FvMJA 3jCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gY50ygEuixJOL5+CoXoow1CeKmNwyNyKxbVe9LukYfQ=; b=EZ+7OemeXOYWmvDMJ/AXDxTfwjxzYYnbjsULk8/LEJu1IDm+4iunjY7WnaKgWCJZq9 ji+5nfwRIAH552CgFkjDywTvhizbSKPN5wZ4ocrKPtVfhJRvr7PVVmKEPihx5d3WRhYE ONk2agAXSdIuIptLy7kR0GgVg7N0AfLgWS8Tp1ji5ExPj3ZlSTrOfOIAkIbDoghCY+76 dJYcjTEYnhGI7XKtXYFieIrvTJNN7NuD63R5eIqSMwSQJPHx5TXLbYwryUlXJSFXd5go E3AX57p+dOEUnsf2EY5pGFXxNJLFU9U+6l9ycY0txvHWEIX4Is8QpSN3/WUCE9Zl2AUs eXnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PWj3A38T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a4ae84f000000b0032154b33c6dsi376705ooj.19.2022.03.09.09.14.50; Wed, 09 Mar 2022 09:15:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PWj3A38T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236058AbiCIQv2 (ORCPT + 99 others); Wed, 9 Mar 2022 11:51:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236714AbiCIQgp (ORCPT ); Wed, 9 Mar 2022 11:36:45 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F64B69CE4 for ; Wed, 9 Mar 2022 08:32:16 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id u17so596388pfk.11 for ; Wed, 09 Mar 2022 08:32:16 -0800 (PST) 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=gY50ygEuixJOL5+CoXoow1CeKmNwyNyKxbVe9LukYfQ=; b=PWj3A38TItrhsUjIRjWiaSik+i8qjhK1vVSzvImJ/IP/sBZ1SK16gd+4vLXNQJIbfz fq1MW9biuBNne5pe3fHiUnjTtyl3ymQBVPVACAAd0YvUvvBY80zbJXDXhDENAQEcfLCy w3cs3JW4i8Wm/1fIlJ8U/oZ/PDcWTWgkItkFw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gY50ygEuixJOL5+CoXoow1CeKmNwyNyKxbVe9LukYfQ=; b=4OJHOb6VUNQZKx5I/A+koLpv9BjcIhtedRj9SbT3n2ALywVkuAuN9m9vxSglLoCVw6 ZkMZIK8OlvsSsN+WotVMXfXQWMQ+PsrnTY699O4pX/yUiOKlt6D+l1H5sHkn7k8m/c1J IKihu848VjZjOPjKQH0akEfROgemHyOz3NwN6hrpVI3jRHFdhBji/IwyZwxrH0k7232y +/H51h1XQUQTAyEMJV54iOuHhFTjOhQ49pmMVWIs1w5IgmvQVHr1MBa1NRb67f0d603O FXdVSMpxu+dkWM8n9m3BqEw7AB0sUck2LnNI51gPJXVHTGU8ysJ9U5V4OQ4Hp2UY7y07 aK7A== X-Gm-Message-State: AOAM532vBJjxBQ2uLAHNEd39e+F/Qoo87jibY6AO/iUy2fhJruHC1Oa4 61jHhRQkDIxEjOPZycC4dSXFHA== X-Received: by 2002:a05:6a00:ad0:b0:4e1:2d96:2ab0 with SMTP id c16-20020a056a000ad000b004e12d962ab0mr549019pfl.3.1646843535989; Wed, 09 Mar 2022 08:32:15 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q24-20020aa79618000000b004e0e89985eesm3588763pfg.156.2022.03.09.08.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 08:32:15 -0800 (PST) Date: Wed, 9 Mar 2022 08:32:14 -0800 From: Kees Cook To: "Eric W. Biederman" Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Viro , Denys Vlasenko , Vlastimil Babka , "Liam R . Howlett" , Jann Horn , linux-mm@kvack.org Subject: Re: [GIT PULL] Fix fill_files_note Message-ID: <202203090830.7E971BD6C@keescook> References: <20220131153740.2396974-1-willy@infradead.org> <871r0nriy4.fsf@email.froward.int.ebiederm.org> <877dafq3bw.fsf@email.froward.int.ebiederm.org> <87bkzroica.fsf_-_@email.froward.int.ebiederm.org> <87h788fdaw.fsf_-_@email.froward.int.ebiederm.org> <202203081342.1924AD9@keescook> <877d93dr8p.fsf@email.froward.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877d93dr8p.fsf@email.froward.int.ebiederm.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 09, 2022 at 10:29:10AM -0600, Eric W. Biederman wrote: > Kees Cook writes: > > > On Tue, Mar 08, 2022 at 01:35:03PM -0600, Eric W. Biederman wrote: > >> > >> Kees, > >> > >> Please pull the coredump-vma-snapshot-fix branch from the git tree: > >> > >> git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git coredump-vma-snapshot-fix > >> > >> HEAD: 390031c942116d4733310f0684beb8db19885fe6 coredump: Use the vma snapshot in fill_files_note > >> > >> Matthew Wilcox has reported that a missing mmap_lock in file_files_note, > >> which could cause trouble. > >> > >> Refactor the code and clean it up so that the vma snapshot makes > >> it to fill_files_note, and then use the vma snapshot in fill_files_note. > >> > >> Eric W. Biederman (5): > >> coredump: Move definition of struct coredump_params into coredump.h > >> coredump: Snapshot the vmas in do_coredump > >> coredump: Remove the WARN_ON in dump_vma_snapshot > >> coredump/elf: Pass coredump_params into fill_note_info > >> coredump: Use the vma snapshot in fill_files_note > >> > >> fs/binfmt_elf.c | 66 ++++++++++++++++++++++-------------------------- > >> fs/binfmt_elf_fdpic.c | 18 +++++-------- > >> fs/binfmt_flat.c | 1 + > >> fs/coredump.c | 59 ++++++++++++++++++++++++++++--------------- > >> include/linux/binfmts.h | 13 +--------- > >> include/linux/coredump.h | 20 ++++++++++++--- > >> 6 files changed, 93 insertions(+), 84 deletions(-) > >> > >> --- > >> > >> Kees I realized I needed to rebase this on Jann Horn's commit > >> 84158b7f6a06 ("coredump: Also dump first pages of non-executable ELF > >> libraries"). Unfortunately before I got that done I got distracted and > >> these changes have been sitting in limbo for most of the development > >> cycle. Since you are running a tree that is including changes like this > >> including Jann's can you please pull these changes into your tree. > > > > Sure! Can you make a signed tag for this pull? > > Not yet. > > Hopefully I will get the time to set that up soon, but I am not at all > setup to do signed tags at this point. Okay, cool. Since I'd already review these before, I've pulled and it should be in -next now. > [...] > Thanks. That looks like a good place to start. I will try to clean up that work-flow and stuff it into my kernel-tools repo. -- Kees Cook