]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Oct 2022 15:56:47 +0000 (17:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Oct 2022 15:56:47 +0000 (17:56 +0200)
added patches:
mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch

queue-6.0/mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch [new file with mode: 0644]
queue-6.0/series

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 (file)
index 0000000..f767dc7
--- /dev/null
@@ -0,0 +1,34 @@
+From sethjenkins@google.com  Thu Oct 27 17:53:55 2022
+From: Seth Jenkins <sethjenkins@google.com>
+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 <akpm@linux-foundation.org>, Seth Jenkins <sethjenkins@google.com>, Alexey Dobriyan <adobriyan@gmail.com>
+Message-ID: <20221027153652.899495-1-sethjenkins@google.com>
+
+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.
+
+Fixes: 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value seq_file")
+Signed-off-by: Seth Jenkins <sethjenkins@google.com>
+Reviewed-by: Alexey Dobriyan <adobriyan@gmail.com>
+Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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");
index a34e2e0ef7cb8b301db0848637e4e77a4a98464e..ce8d2214090219491848f2cca4eef8ebf512521b 100644 (file)
@@ -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