From: Greg Kroah-Hartman Date: Mon, 13 May 2024 14:13:58 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.19.314~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=517d61d08208e3b905c58a24f6781c70999d67a9;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: dyndbg-fix-old-bug_on-in-control-parser.patch --- diff --git a/queue-5.4/dyndbg-fix-old-bug_on-in-control-parser.patch b/queue-5.4/dyndbg-fix-old-bug_on-in-control-parser.patch new file mode 100644 index 00000000000..4e941c489ea --- /dev/null +++ b/queue-5.4/dyndbg-fix-old-bug_on-in-control-parser.patch @@ -0,0 +1,36 @@ +From 00e7d3bea2ce7dac7bee1cf501fb071fd0ea8f6c Mon Sep 17 00:00:00 2001 +From: Jim Cromie +Date: Mon, 29 Apr 2024 13:31:11 -0600 +Subject: dyndbg: fix old BUG_ON in >control parser + +From: Jim Cromie + +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 +Signed-off-by: Jim Cromie +Link: https://lore.kernel.org/r/20240429193145.66543-2-jim.cromie@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + lib/dynamic_debug.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/lib/dynamic_debug.c ++++ b/lib/dynamic_debug.c +@@ -244,7 +244,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] : ""); ++ return -EINVAL; ++ } + } + + /* `buf' is start of word, `end' is one past its end */ diff --git a/queue-5.4/series b/queue-5.4/series index c2ae13f6b33..f74e06fee44 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -77,3 +77,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