]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 May 2024 14:13:41 +0000 (16:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 May 2024 14:13:41 +0000 (16:13 +0200)
added patches:
dyndbg-fix-old-bug_on-in-control-parser.patch

queue-4.19/dyndbg-fix-old-bug_on-in-control-parser.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/dyndbg-fix-old-bug_on-in-control-parser.patch b/queue-4.19/dyndbg-fix-old-bug_on-in-control-parser.patch
new file mode 100644 (file)
index 0000000..efb605b
--- /dev/null
@@ -0,0 +1,36 @@
+From 00e7d3bea2ce7dac7bee1cf501fb071fd0ea8f6c Mon Sep 17 00:00:00 2001
+From: Jim Cromie <jim.cromie@gmail.com>
+Date: Mon, 29 Apr 2024 13:31:11 -0600
+Subject: dyndbg: fix old BUG_ON in >control parser
+
+From: Jim Cromie <jim.cromie@gmail.com>
+
+commit 00e7d3bea2ce7dac7bee1cf501fb071fd0ea8f6c upstream.
+
+Fix a BUG_ON from 2009.  Even if it looks "unreachable" (I didn't
+really look), lets make sure by removing it, doing pr_err and return
+-EINVAL instead.
+
+Cc: stable <stable@kernel.org>
+Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
+Link: https://lore.kernel.org/r/20240429193145.66543-2-jim.cromie@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ lib/dynamic_debug.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/lib/dynamic_debug.c
++++ b/lib/dynamic_debug.c
+@@ -242,7 +242,11 @@ static int ddebug_tokenize(char *buf, ch
+               } else {
+                       for (end = buf; *end && !isspace(*end); end++)
+                               ;
+-                      BUG_ON(end == buf);
++                      if (end == buf) {
++                              pr_err("parse err after word:%d=%s\n", nwords,
++                                     nwords ? words[nwords - 1] : "<none>");
++                              return -EINVAL;
++                      }
+               }
+               /* `buf' is start of word, `end' is one past its end */
index 18818e2516e4d6b948dcbfe487f64fad067d512b..1db6f2574d0298d07c6b5928372172341b007f21 100644 (file)
@@ -57,3 +57,4 @@ firewire-nosy-ensure-user_length-is-taken-into-account-when-fetching-packet-cont
 usb-gadget-composite-fix-os-descriptors-w_value-logic.patch
 usb-gadget-f_fs-fix-a-race-condition-when-processing-setup-packets.patch
 tipc-fix-uaf-in-error-path.patch
+dyndbg-fix-old-bug_on-in-control-parser.patch