From: Greg Kroah-Hartman Date: Thu, 20 Nov 2025 15:57:29 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v6.6.117~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d14cdbd4f4c1e4d37b5597e6628faf04043d450c;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: gcov-add-support-for-gcc-15.patch strparser-fix-signed-unsigned-mismatch-bug.patch --- diff --git a/queue-5.4/gcov-add-support-for-gcc-15.patch b/queue-5.4/gcov-add-support-for-gcc-15.patch new file mode 100644 index 0000000000..3c70c73c37 --- /dev/null +++ b/queue-5.4/gcov-add-support-for-gcc-15.patch @@ -0,0 +1,40 @@ +From ec4d11fc4b2dd4a2fa8c9d801ee9753b74623554 Mon Sep 17 00:00:00 2001 +From: Peter Oberparleiter +Date: Tue, 28 Oct 2025 12:51:25 +0100 +Subject: gcov: add support for GCC 15 + +From: Peter Oberparleiter + +commit ec4d11fc4b2dd4a2fa8c9d801ee9753b74623554 upstream. + +Using gcov on kernels compiled with GCC 15 results in truncated 16-byte +long .gcda files with no usable data. To fix this, update GCOV_COUNTERS +to match the value defined by GCC 15. + +Tested with GCC 14.3.0 and GCC 15.2.0. + +Link: https://lkml.kernel.org/r/20251028115125.1319410-1-oberpar@linux.ibm.com +Signed-off-by: Peter Oberparleiter +Reported-by: Matthieu Baerts +Closes: https://github.com/linux-test-project/lcov/issues/445 +Tested-by: Matthieu Baerts +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + kernel/gcov/gcc_4_7.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/kernel/gcov/gcc_4_7.c ++++ b/kernel/gcov/gcc_4_7.c +@@ -19,7 +19,9 @@ + #include + #include "gcov.h" + +-#if (__GNUC__ >= 14) ++#if (__GNUC__ >= 15) ++#define GCOV_COUNTERS 10 ++#elif (__GNUC__ >= 14) + #define GCOV_COUNTERS 9 + #elif (__GNUC__ >= 10) + #define GCOV_COUNTERS 8 diff --git a/queue-5.4/series b/queue-5.4/series index d5a5f47928..4a8d1cdcfc 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -149,3 +149,5 @@ asoc-cs4271-fix-regulator-leak-on-probe-failure.patch drm-vmwgfx-validate-command-header-size-against-svga.patch alsa-usb-audio-fix-null-pointer-dereference-in-snd_u.patch mm-ksm-fix-flag-dropping-behavior-in-ksm_madvise.patch +gcov-add-support-for-gcc-15.patch +strparser-fix-signed-unsigned-mismatch-bug.patch diff --git a/queue-5.4/strparser-fix-signed-unsigned-mismatch-bug.patch b/queue-5.4/strparser-fix-signed-unsigned-mismatch-bug.patch new file mode 100644 index 0000000000..036a265db9 --- /dev/null +++ b/queue-5.4/strparser-fix-signed-unsigned-mismatch-bug.patch @@ -0,0 +1,47 @@ +From 4da4e4bde1c453ac5cc2dce5def81d504ae257ee Mon Sep 17 00:00:00 2001 +From: Nate Karstens +Date: Thu, 6 Nov 2025 16:28:33 -0600 +Subject: strparser: Fix signed/unsigned mismatch bug + +From: Nate Karstens + +commit 4da4e4bde1c453ac5cc2dce5def81d504ae257ee upstream. + +The `len` member of the sk_buff is an unsigned int. This is cast to +`ssize_t` (a signed type) for the first sk_buff in the comparison, +but not the second sk_buff. On 32-bit systems, this can result in +an integer underflow for certain values because unsigned arithmetic +is being used. + +This appears to be an oversight: if the intention was to use unsigned +arithmetic, then the first cast would have been omitted. The change +ensures both len values are cast to `ssize_t`. + +The underflow causes an issue with ktls when multiple TLS PDUs are +included in a single TCP segment. The mainline kernel does not use +strparser for ktls anymore, but this is still useful for other +features that still use strparser, and for backporting. + +Signed-off-by: Nate Karstens +Cc: stable@vger.kernel.org +Fixes: 43a0c6751a32 ("strparser: Stream parser for messages") +Reviewed-by: Jacob Keller +Reviewed-by: Sabrina Dubroca +Link: https://patch.msgid.link/20251106222835.1871628-1-nate.karstens@garmin.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + net/strparser/strparser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/strparser/strparser.c ++++ b/net/strparser/strparser.c +@@ -238,7 +238,7 @@ static int __strp_recv(read_descriptor_t + strp_parser_err(strp, -EMSGSIZE, desc); + break; + } else if (len <= (ssize_t)head->len - +- skb->len - stm->strp.offset) { ++ (ssize_t)skb->len - stm->strp.offset) { + /* Length must be into new skb (and also + * greater than zero) + */