This is a note to let you know that I've just added the patch titled mm: /proc/pid/smaps_rollup: fix no vma's null-deref to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From sethjenkins@xxxxxxxxxx Thu Oct 27 17:53:55 2022 From: Seth Jenkins <sethjenkins@xxxxxxxxxx> Date: Thu, 27 Oct 2022 11:36:52 -0400 Subject: mm: /proc/pid/smaps_rollup: fix no vma's null-deref To: stable@xxxxxxxxxxxxxxx Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Seth Jenkins <sethjenkins@xxxxxxxxxx>, Alexey Dobriyan <adobriyan@xxxxxxxxx> Message-ID: <20221027153652.899495-1-sethjenkins@xxxxxxxxxx> From: Seth Jenkins <sethjenkins@xxxxxxxxxx> 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. Fixes: 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value seq_file") Signed-off-by: Seth Jenkins <sethjenkins@xxxxxxxxxx> Reviewed-by: Alexey Dobriyan <adobriyan@xxxxxxxxx> Tested-by: Alexey Dobriyan <adobriyan@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -843,7 +843,7 @@ static int show_smaps_rollup(struct seq_ last_vma_end = vma->vm_end; } - 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"); Patches currently in stable-queue which might be from sethjenkins@xxxxxxxxxx are queue-4.19/mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch