linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: FirstName LastName <sethjenkins@google.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>,
	linux-mm@kvack.org, stable@vger.kernel.org
Subject: Re: [PATCH] mm: /proc/pid/smaps_rollup: fix no vma's null-deref
Date: Tue, 4 Oct 2022 11:46:21 -0700	[thread overview]
Message-ID: <20221004114621.7b539d2c3618b25037c4f2d0@linux-foundation.org> (raw)
In-Reply-To: <20221003224531.1930646-1-sethjenkins@google.com>

On Mon,  3 Oct 2022 18:45:31 -0400 FirstName LastName <sethjenkins@google.com> wrote:

> From: Seth Jenkins <sethjenkins@google.com>
> 
> 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.


  parent reply	other threads:[~2022-10-04 18:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03 22:45 [PATCH] mm: /proc/pid/smaps_rollup: fix no vma's null-deref FirstName LastName
2022-10-04 12:53 ` Alexey Dobriyan
2022-10-04 18:46 ` Andrew Morton [this message]
2022-10-04 21:05   ` Seth Jenkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221004114621.7b539d2c3618b25037c4f2d0@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=jannh@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sethjenkins@google.com \
    --cc=stable@vger.kernel.org \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).