From: Greg Kroah-Hartman Date: Mon, 16 Mar 2020 15:56:14 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.19.111~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24981041d181736c71f58cca326441e231b9ef40;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: efi-add-a-sanity-check-to-efivar_store_raw.patch --- diff --git a/queue-4.4/efi-add-a-sanity-check-to-efivar_store_raw.patch b/queue-4.4/efi-add-a-sanity-check-to-efivar_store_raw.patch new file mode 100644 index 00000000000..41d36ec91e1 --- /dev/null +++ b/queue-4.4/efi-add-a-sanity-check-to-efivar_store_raw.patch @@ -0,0 +1,37 @@ +From d6c066fda90d578aacdf19771a027ed484a79825 Mon Sep 17 00:00:00 2001 +From: Vladis Dronov +Date: Sun, 8 Mar 2020 09:08:55 +0100 +Subject: efi: Add a sanity check to efivar_store_raw() + +From: Vladis Dronov + +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 +Signed-off-by: Ard Biesheuvel +Signed-off-by: Ingo Molnar +Cc: +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 + + +--- + 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; + diff --git a/queue-4.4/series b/queue-4.4/series index d2d20a5f409..6bd9bfca01b 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -34,3 +34,4 @@ iommu-vt-d-fix-the-wrong-printing-in-rhsa-parsing.patch iommu-vt-d-ignore-devices-with-out-of-spec-domain-number.patch mwifiex-fix-heap-overflow-in-mmwifiex_process_tdls_action_frame.patch ipv6-restrict-ipv6_addrform-operation.patch +efi-add-a-sanity-check-to-efivar_store_raw.patch