From: Greg Kroah-Hartman Date: Thu, 27 Oct 2022 15:56:47 +0000 (+0200) Subject: 6.0-stable patches X-Git-Tag: v5.10.151~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4c9fab3b0720232dedb6222be6c22e8c1465e5b;p=thirdparty%2Fkernel%2Fstable-queue.git 6.0-stable patches added patches: mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch --- diff --git a/queue-6.0/mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch b/queue-6.0/mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch new file mode 100644 index 00000000000..f767dc79a7a --- /dev/null +++ b/queue-6.0/mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch @@ -0,0 +1,34 @@ +From sethjenkins@google.com Thu Oct 27 17:53:55 2022 +From: Seth Jenkins +Date: Thu, 27 Oct 2022 11:36:52 -0400 +Subject: mm: /proc/pid/smaps_rollup: fix no vma's null-deref +To: stable@vger.kernel.org +Cc: Andrew Morton , Seth Jenkins , Alexey Dobriyan +Message-ID: <20221027153652.899495-1-sethjenkins@google.com> + +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. + +Fixes: 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value seq_file") +Signed-off-by: Seth Jenkins +Reviewed-by: Alexey Dobriyan +Tested-by: Alexey Dobriyan +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -969,7 +969,7 @@ static int show_smaps_rollup(struct seq_ + 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"); diff --git a/queue-6.0/series b/queue-6.0/series index a34e2e0ef7c..ce8d2214090 100644 --- a/queue-6.0/series +++ b/queue-6.0/series @@ -91,3 +91,4 @@ ext4-introduce-ext4_fc_tag_base_len-helper.patch ext4-factor-out-ext4_fc_get_tl.patch ext4-fix-potential-out-of-bound-read-in-ext4_fc_repl.patch acpi-video-force-backlight-native-for-more-tongfang-devices.patch +mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch