From: Greg Kroah-Hartman Date: Sun, 17 Oct 2021 08:16:18 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v4.19.212~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5135d68d5e0b1d487c805a366f33febc0e1ac5c;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: stable-clamp-sublevel-in-4.14.patch --- diff --git a/queue-4.14/series b/queue-4.14/series new file mode 100644 index 00000000000..90f7b387433 --- /dev/null +++ b/queue-4.14/series @@ -0,0 +1 @@ +stable-clamp-sublevel-in-4.14.patch diff --git a/queue-4.14/stable-clamp-sublevel-in-4.14.patch b/queue-4.14/stable-clamp-sublevel-in-4.14.patch new file mode 100644 index 00000000000..3e425467d0d --- /dev/null +++ b/queue-4.14/stable-clamp-sublevel-in-4.14.patch @@ -0,0 +1,44 @@ +From 42efb098c75f9d4b95f7cf35d3d52e80cc2fde82 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 5 Feb 2021 12:47:02 -0500 +Subject: stable: clamp SUBLEVEL in 4.14 + +From: Sasha Levin + +Right now SUBLEVEL is overflowing, and some userspace may start treating +4.14.256 as 4.15. While out of tree modules have different ways of +extracting the version number (and we're generally ok with breaking +them), we do care about breaking userspace and it would appear that this +overflow might do just that. + +Our rules around userspace ABI in the stable kernel are pretty simple: +we don't break it. Thus, while userspace may be checking major/minor, it +shouldn't be doing anything with sublevel. + +This patch applies a big band-aid to the 4.14 kernel in the form of +clamping the sublevel to 255. + +The clamp is done for the purpose of LINUX_VERSION_CODE only, and +extracting the version number from the Makefile or "make kernelversion" +will continue to work as intended. + +We might need to do it later in newer trees, but maybe we'll have a +better solution by then, so I'm ignoring that problem for now. + +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Makefile ++++ b/Makefile +@@ -1162,7 +1162,7 @@ endef + + define filechk_version.h + (echo \#define LINUX_VERSION_CODE $(shell \ +- expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ ++ expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 255); \ + echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) + endef +