linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dell_rbu: Don't fallback to userhelper when loading firmware
@ 2016-05-16 15:41 Mario Limonciello
  2016-05-16 17:12 ` Laura Abbott
  0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2016-05-16 15:41 UTC (permalink / raw)
  To: ming.lei; +Cc: LKML, Mario Limonciello

dell_rbu previously would allow a userspace application to craft the
payload after dell_rbu was loaded and abuse the udev userspace API.

Instead require the payload to be crafted and placed in
/lib/firmware/dell_rbu ahead of time.

This adjusts dell_rbu to immediately load the firmware from
/lib/firmware/dell_rbu when "init" is passed into image_type using the
kernel helper.
---
 drivers/firmware/dell_rbu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c
index d5f5b98..5ecf043 100644
--- a/drivers/firmware/dell_rbu.c
+++ b/drivers/firmware/dell_rbu.c
@@ -677,7 +677,7 @@ static ssize_t write_rbu_image_type(struct file *filp, struct kobject *kobj,
 		if (!rbu_data.entry_created) {
 			spin_unlock(&rbu_data.lock);
 			req_firm_rc = request_firmware_nowait(THIS_MODULE,
-						      FW_ACTION_NOHOTPLUG,
+						      FW_ACTION_HOTPLUG,
 						      "dell_rbu",
 						      &rbu_device->dev,
 						      GFP_KERNEL,
-- 
2.7.4

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

* Re: [PATCH] dell_rbu: Don't fallback to userhelper when loading firmware
  2016-05-16 15:41 [PATCH] dell_rbu: Don't fallback to userhelper when loading firmware Mario Limonciello
@ 2016-05-16 17:12 ` Laura Abbott
  2016-05-16 17:43   ` Mario_Limonciello
  0 siblings, 1 reply; 3+ messages in thread
From: Laura Abbott @ 2016-05-16 17:12 UTC (permalink / raw)
  To: Mario Limonciello, ming.lei; +Cc: LKML

On 05/16/2016 08:41 AM, Mario Limonciello wrote:
> dell_rbu previously would allow a userspace application to craft the
> payload after dell_rbu was loaded and abuse the udev userspace API.
>
> Instead require the payload to be crafted and placed in
> /lib/firmware/dell_rbu ahead of time.
>
> This adjusts dell_rbu to immediately load the firmware from
> /lib/firmware/dell_rbu when "init" is passed into image_type using the
> kernel helper.

Looks like you missed the Signed-off-by line.

Can you also drop the Kconfig dependency on CONFIG_FW_LOADER_USER_HELPER?

Thanks,
Laura

> ---
>  drivers/firmware/dell_rbu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c
> index d5f5b98..5ecf043 100644
> --- a/drivers/firmware/dell_rbu.c
> +++ b/drivers/firmware/dell_rbu.c
> @@ -677,7 +677,7 @@ static ssize_t write_rbu_image_type(struct file *filp, struct kobject *kobj,
>  		if (!rbu_data.entry_created) {
>  			spin_unlock(&rbu_data.lock);
>  			req_firm_rc = request_firmware_nowait(THIS_MODULE,
> -						      FW_ACTION_NOHOTPLUG,
> +						      FW_ACTION_HOTPLUG,
>  						      "dell_rbu",
>  						      &rbu_device->dev,
>  						      GFP_KERNEL,
>

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

* RE: [PATCH] dell_rbu: Don't fallback to userhelper when loading firmware
  2016-05-16 17:12 ` Laura Abbott
@ 2016-05-16 17:43   ` Mario_Limonciello
  0 siblings, 0 replies; 3+ messages in thread
From: Mario_Limonciello @ 2016-05-16 17:43 UTC (permalink / raw)
  To: labbott, ming.lei; +Cc: linux-kernel



> -----Original Message-----
> From: Laura Abbott [mailto:labbott@redhat.com]
> Sent: Monday, May 16, 2016 12:12 PM
> To: Limonciello, Mario <Mario_Limonciello@Dell.com>;
> ming.lei@canonical.com
> Cc: LKML <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] dell_rbu: Don't fallback to userhelper when loading
> firmware
> 
> On 05/16/2016 08:41 AM, Mario Limonciello wrote:
> > dell_rbu previously would allow a userspace application to craft the
> > payload after dell_rbu was loaded and abuse the udev userspace API.
> >
> > Instead require the payload to be crafted and placed in
> > /lib/firmware/dell_rbu ahead of time.
> >
> > This adjusts dell_rbu to immediately load the firmware from
> > /lib/firmware/dell_rbu when "init" is passed into image_type using the
> > kernel helper.
> 
> Looks like you missed the Signed-off-by line.
> 
> Can you also drop the Kconfig dependency on
> CONFIG_FW_LOADER_USER_HELPER?
> 
> Thanks,
> Laura

Sure thing.

> 
> > ---
> >  drivers/firmware/dell_rbu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c
> > index d5f5b98..5ecf043 100644
> > --- a/drivers/firmware/dell_rbu.c
> > +++ b/drivers/firmware/dell_rbu.c
> > @@ -677,7 +677,7 @@ static ssize_t write_rbu_image_type(struct file *filp,
> struct kobject *kobj,
> >  		if (!rbu_data.entry_created) {
> >  			spin_unlock(&rbu_data.lock);
> >  			req_firm_rc =
> request_firmware_nowait(THIS_MODULE,
> > -
> FW_ACTION_NOHOTPLUG,
> > +						      FW_ACTION_HOTPLUG,
> >  						      "dell_rbu",
> >  						      &rbu_device->dev,
> >  						      GFP_KERNEL,
> >

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

end of thread, other threads:[~2016-05-16 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-16 15:41 [PATCH] dell_rbu: Don't fallback to userhelper when loading firmware Mario Limonciello
2016-05-16 17:12 ` Laura Abbott
2016-05-16 17:43   ` Mario_Limonciello

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).