]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2020 15:59:05 +0000 (16:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2020 15:59:05 +0000 (16:59 +0100)
added patches:
efi-add-a-sanity-check-to-efivar_store_raw.patch

queue-4.19/efi-add-a-sanity-check-to-efivar_store_raw.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/efi-add-a-sanity-check-to-efivar_store_raw.patch b/queue-4.19/efi-add-a-sanity-check-to-efivar_store_raw.patch
new file mode 100644 (file)
index 0000000..41d36ec
--- /dev/null
@@ -0,0 +1,37 @@
+From d6c066fda90d578aacdf19771a027ed484a79825 Mon Sep 17 00:00:00 2001
+From: Vladis Dronov <vdronov@redhat.com>
+Date: Sun, 8 Mar 2020 09:08:55 +0100
+Subject: efi: Add a sanity check to efivar_store_raw()
+
+From: Vladis Dronov <vdronov@redhat.com>
+
+commit d6c066fda90d578aacdf19771a027ed484a79825 upstream.
+
+Add a sanity check to efivar_store_raw() the same way
+efivar_{attr,size,data}_read() and efivar_show_raw() have it.
+
+Signed-off-by: Vladis Dronov <vdronov@redhat.com>
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200305084041.24053-3-vdronov@redhat.com
+Link: https://lore.kernel.org/r/20200308080859.21568-25-ardb@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/firmware/efi/efivars.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/firmware/efi/efivars.c
++++ b/drivers/firmware/efi/efivars.c
+@@ -272,6 +272,9 @@ efivar_store_raw(struct efivar_entry *en
+       u8 *data;
+       int err;
++      if (!entry || !buf)
++              return -EINVAL;
++
+       if (is_compat()) {
+               struct compat_efi_variable *compat;
index dea2482a6335e52a1fde629bb641e5a000755f1c..1ee8c47f59e985a213d00d7a2cb99b1b285ad406 100644 (file)
@@ -85,3 +85,4 @@ i2c-acpi-put-device-when-verifying-client-fails.patch
 ipv6-restrict-ipv6_addrform-operation.patch
 net-smc-check-for-valid-ib_client_data.patch
 net-smc-cancel-event-worker-during-device-removal.patch
+efi-add-a-sanity-check-to-efivar_store_raw.patch