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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EC0EC433F5 for ; Tue, 4 Oct 2022 21:06:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbiJDVGO (ORCPT ); Tue, 4 Oct 2022 17:06:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbiJDVGL (ORCPT ); Tue, 4 Oct 2022 17:06:11 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 276E96AE9D for ; Tue, 4 Oct 2022 14:06:10 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id bj12so31460215ejb.13 for ; Tue, 04 Oct 2022 14:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=PGXp3VOaj51mo3NAOboUEy2QOQRbII2zrb0XhYBKtGM=; b=ei9P+Bd8IeYaUbJs/c5FUcgm+e2dtUe8rcWZVo37eSWgUxP4UD6QIGM56JRbUsdKAq 4ChHOm92aseqM7vhWHDHYMlhdU4mpHqDSVbRYUQtjYgUHVj3Ewp87aHLGcd92ibTqxNU 2IGstbKW8X5ojiiNgUj0SQuMnL9V9JtF3auD/RllL0djegSirzfVdKiYefVkgtWql0Ui FPpD9GZc3H9ebBi3c7N2NFImWUYv8+LyW95cg8EwHPK4pjqhyJKcUIGMqHjkSE/9cOIM FjV23SIMC2JLakD2F+Htd1704Wd9H3+8iaB5WOQW5T8vEPL0q7CVDVkVUWIg8kMr3WjP Mnmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=PGXp3VOaj51mo3NAOboUEy2QOQRbII2zrb0XhYBKtGM=; b=kjSl2UE5zHwswt5T5L9wj4ard48NoD1vcvjV4Sb/N2Mo+5fqtF6QfLefY2Dl+4FHwi faJtnm9NzSixsA4Gn0k6ER/gOmRlNLAN1dhcDauO0HaPGVmDdFy25wqYtICAs28G/rfv UmF8Ohk08abRTZL7whihBRXePZBitFWjC759U5dLYcC4zhXgc/qPEBUQ1jIp534/rsIx 854CzR8BBVES7OQR7KM9T0PpoOOK4uV9t5meAbwOIIG/jlh+GxJqf4OJWD3DI8YUDCPN zmIRWTKU5BxI+WdBFWJuq0+NUFXTKNhgVwM0hhzRZkhTHGfnKqwoL9bmZCzx1/0HhSTZ DrsQ== X-Gm-Message-State: ACrzQf286av+bpZ1FmFhq62ltPhjjeYEJ4Kp11paLsixDakZd/Y7Qojv drS9250UuSuQrSIghh+W3w4XbfbMzLv9RiGquOGKRg== X-Google-Smtp-Source: AMsMyM6miuRPK7ev9MZ5sjWqzSrdpKNre547CDGwOeRVZ1Z48m1CIIGuRzThsoRIBOpqKcU0yJDkhB88phMaaOnIcJE= X-Received: by 2002:a17:907:6d28:b0:782:32ad:7b64 with SMTP id sa40-20020a1709076d2800b0078232ad7b64mr22349233ejc.23.1664917568615; Tue, 04 Oct 2022 14:06:08 -0700 (PDT) MIME-Version: 1.0 References: <20221003224531.1930646-1-sethjenkins@google.com> <20221004114621.7b539d2c3618b25037c4f2d0@linux-foundation.org> In-Reply-To: <20221004114621.7b539d2c3618b25037c4f2d0@linux-foundation.org> From: Seth Jenkins Date: Tue, 4 Oct 2022 17:05:57 -0400 Message-ID: Subject: Re: [PATCH] mm: /proc/pid/smaps_rollup: fix no vma's null-deref To: Andrew Morton Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Dobriyan , Vlastimil Babka , Jann Horn , linux-mm@kvack.org, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I concur, mm-stable looks fine to me as well. Jann and I conversed today and the tentative decision since this isn't considered a high-priority security bug is to wait for maple tree to merge into Linus's branch before submitting this patch to stable. On Tue, Oct 4, 2022 at 2:46 PM Andrew Morton wrote: > > On Mon, 3 Oct 2022 18:45:31 -0400 FirstName LastName wrote: > > > From: Seth Jenkins > > > > Commit 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value > > seq_file") introduced a null-deref if there are no vma's in the task in > > show_smaps_rollup. > > > > --- a/fs/proc/task_mmu.c > > +++ b/fs/proc/task_mmu.c > > @@ -969,7 +969,7 @@ static int show_smaps_rollup(struct seq_file *m, void *v) > > vma = vma->vm_next; > > } > > > > - show_vma_header_prefix(m, priv->mm->mmap->vm_start, > > + show_vma_header_prefix(m, priv->mm->mmap ? priv->mm->mmap->vm_start : 0, > > last_vma_end, 0, 0, 0, 0); > > seq_pad(m, ' '); > > seq_puts(m, "[rollup]\n"); > > The current mm tree is very different here. In fact the bug might not > exist any more. Please take a look at the mm-stable branch at > git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm? > > If no fixes are needed in mm-stable then I guess the process is to > propose this patch to the stable tree maintainers. >