]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2024 13:18:14 +0000 (15:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2024 13:18:14 +0000 (15:18 +0200)
added patches:
sunrpc-fix-loop-termination-condition-in-gss_free_in_token_pages.patch

queue-4.19/series
queue-4.19/sunrpc-fix-loop-termination-condition-in-gss_free_in_token_pages.patch [new file with mode: 0644]

index d47f40a0f87ec753d8340e31b40590a907754dbd..57f9eadbf44b5fa1213835d098d1405683afe0bd 100644 (file)
@@ -142,3 +142,4 @@ kconfig-fix-comparison-to-constant-symbols-m-n.patch
 ipvlan-dont-use-skb-sk-in-ipvlan_process_v-4-6-_outb.patch
 alsa-timer-set-lower-bound-of-start-tick-time.patch
 genirq-cpuhotplug-x86-vector-prevent-vector-leak-during-cpu-offline.patch
+sunrpc-fix-loop-termination-condition-in-gss_free_in_token_pages.patch
diff --git a/queue-4.19/sunrpc-fix-loop-termination-condition-in-gss_free_in_token_pages.patch b/queue-4.19/sunrpc-fix-loop-termination-condition-in-gss_free_in_token_pages.patch
new file mode 100644 (file)
index 0000000..9796304
--- /dev/null
@@ -0,0 +1,33 @@
+From 4a77c3dead97339478c7422eb07bf4bf63577008 Mon Sep 17 00:00:00 2001
+From: Chuck Lever <chuck.lever@oracle.com>
+Date: Sun, 2 Jun 2024 18:15:25 -0400
+Subject: SUNRPC: Fix loop termination condition in gss_free_in_token_pages()
+
+From: Chuck Lever <chuck.lever@oracle.com>
+
+commit 4a77c3dead97339478c7422eb07bf4bf63577008 upstream.
+
+The in_token->pages[] array is not NULL terminated. This results in
+the following KASAN splat:
+
+  KASAN: maybe wild-memory-access in range [0x04a2013400000008-0x04a201340000000f]
+
+Fixes: bafa6b4d95d9 ("SUNRPC: Fix gss_free_in_token_pages()")
+Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/sunrpc/auth_gss/svcauth_gss.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/sunrpc/auth_gss/svcauth_gss.c
++++ b/net/sunrpc/auth_gss/svcauth_gss.c
+@@ -1088,7 +1088,7 @@ static int gss_read_proxy_verf(struct sv
+       }
+       pages = DIV_ROUND_UP(inlen, PAGE_SIZE);
+-      in_token->pages = kcalloc(pages, sizeof(struct page *), GFP_KERNEL);
++      in_token->pages = kcalloc(pages + 1, sizeof(struct page *), GFP_KERNEL);
+       if (!in_token->pages) {
+               kfree(in_handle->data);
+               return SVC_DENIED;