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

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

diff --git a/queue-4.19/mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch b/queue-4.19/mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch
new file mode 100644 (file)
index 0000000..7113bec
--- /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
+@@ -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");
index 661bf1cea1fcd956b556ad83bfce2284032e8d66..3546f51ac82c92867bbce2946505eb8a177b1fd9 100644 (file)
@@ -22,3 +22,4 @@ media-v4l2-mem2mem-apply-dst_queue_off_base-on-mmap-buffers-across-ioctls.patch
 acpi-video-force-backlight-native-for-more-tongfang-devices.patch
 makefile.debug-re-enable-debug-info-for-.s-files.patch
 hv_netvsc-fix-race-between-vf-offering-and-vf-association-message-from-host.patch
+mm-proc-pid-smaps_rollup-fix-no-vma-s-null-deref.patch