stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] efi: Add a sanity check to efivar_store_raw()" failed to apply to 4.19-stable tree
@ 2020-03-16 12:57 gregkh
  2020-03-16 13:26 ` Vladis Dronov
  0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2020-03-16 12:57 UTC (permalink / raw)
  To: vdronov, ardb, mingo, stable; +Cc: stable


The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

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: [PATCH] efi: Add a sanity check to efivar_store_raw()

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

diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c
index 69f13bc4b931..aff3dfb4d7ba 100644
--- a/drivers/firmware/efi/efivars.c
+++ b/drivers/firmware/efi/efivars.c
@@ -208,6 +208,9 @@ efivar_store_raw(struct efivar_entry *entry, const char *buf, size_t count)
 	u8 *data;
 	int err;
 
+	if (!entry || !buf)
+		return -EINVAL;
+
 	if (in_compat_syscall()) {
 		struct compat_efi_variable *compat;
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: FAILED: patch "[PATCH] efi: Add a sanity check to efivar_store_raw()" failed to apply to 4.19-stable tree
  2020-03-16 12:57 FAILED: patch "[PATCH] efi: Add a sanity check to efivar_store_raw()" failed to apply to 4.19-stable tree gregkh
@ 2020-03-16 13:26 ` Vladis Dronov
  0 siblings, 0 replies; 2+ messages in thread
From: Vladis Dronov @ 2020-03-16 13:26 UTC (permalink / raw)
  To: gregkh; +Cc: ardb, mingo, stable

Hello,

----- Original Message -----
> From: gregkh@linuxfoundation.org
> Subject: FAILED: patch "[PATCH] efi: Add a sanity check to efivar_store_raw()" failed to apply to 4.19-stable tree
>
> The patch below does not apply to the 4.19-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.

Backported to 4.19/4.14/4.9/4.4-stable:

https://lore.kernel.org/stable/20200316131938.31453-1-vdronov@redhat.com/T/#u
 
> thanks,
>
> greg k-h

Best regards,
Vladis Dronov | Red Hat, Inc. | The Core Kernel | Senior Software Engineer


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-16 13:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-16 12:57 FAILED: patch "[PATCH] efi: Add a sanity check to efivar_store_raw()" failed to apply to 4.19-stable tree gregkh
2020-03-16 13:26 ` Vladis Dronov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).