summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:43:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:43:38 +0000
commit1ff870768c5cacf4bdc05cce822ac61837666b0f (patch)
tree94a1b1fd6d42485c062620781ed0ac16e05bf60c /debian/patches
parentMerging upstream version 4.19.269. (diff)
downloadlinux-1ff870768c5cacf4bdc05cce822ac61837666b0f.tar.xz
linux-1ff870768c5cacf4bdc05cce822ac61837666b0f.zip
Adding debian version 4.19.269-1.debian/4.19.269-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/bugfix/all/efi-random-Properly-limit-the-size-of-the-random-see.patch37
-rw-r--r--debian/patches/series1
2 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/bugfix/all/efi-random-Properly-limit-the-size-of-the-random-see.patch b/debian/patches/bugfix/all/efi-random-Properly-limit-the-size-of-the-random-see.patch
new file mode 100644
index 000000000..68f7e4e94
--- /dev/null
+++ b/debian/patches/bugfix/all/efi-random-Properly-limit-the-size-of-the-random-see.patch
@@ -0,0 +1,37 @@
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Thu, 1 Dec 2022 00:28:51 +0100
+Subject: efi: random: Properly limit the size of the random seed
+Forwarded: https://lore.kernel.org/stable/Y4fq5mGUbcKV8VwM@decadent.org.uk/T/
+
+Commit be36f9e7517e ("efi: READ_ONCE rng seed size before munmap")
+added a READ_ONCE() and also changed the call to
+add_bootloader_randomness() to use the local size variable. Neither
+of these changes was actually needed and this was not backported to
+the 4.19 stable branch.
+
+Commit 161a438d730d ("efi: random: reduce seed size to 32 bytes")
+reverted the addition of READ_ONCE() and added a limit to the value of
+size. This depends on the earlier commit, because size can now differ
+from seed->size, but it was wrongly backported to the 4.19 stable
+branch by itself.
+
+Apply the missing change to the add_bootloader_randomness() parameter
+(except that here we are still using add_device_randomness()).
+
+Fixes: 0513592520ae ("efi: random: reduce seed size to 32 bytes")
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+---
+ drivers/firmware/efi/efi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/firmware/efi/efi.c
++++ b/drivers/firmware/efi/efi.c
+@@ -570,7 +570,7 @@ int __init efi_config_parse_tables(void
+ sizeof(*seed) + size);
+ if (seed != NULL) {
+ pr_notice("seeding entropy pool\n");
+- add_device_randomness(seed->bits, seed->size);
++ add_device_randomness(seed->bits, size);
+ early_memunmap(seed, sizeof(*seed) + size);
+ } else {
+ pr_err("Could not map UEFI random seed!\n");
diff --git a/debian/patches/series b/debian/patches/series
index 62c6dfe2b..277514ee7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -106,6 +106,7 @@ bugfix/all/USB-drop-HDC_LOCAL_MEM-flag.patch
bugfix/all/usb-dont-create-dma-pools-for-HCD.patch
bugfix/all/usb-add-a-hcd_uses_dma-helper.patch
bugfix/all/usb-hcd-Fix-a-NULL-vs-IS_ERR-bug-in-usb_hcd_setup_lo.patch
+bugfix/all/efi-random-Properly-limit-the-size-of-the-random-see.patch
# Miscellaneous features
features/all/e1000e-Add-support-for-Comet-Lake.patch