public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] firewire: info leak in ioctl_get_info()
@ 2013-10-19  9:10 Dan Carpenter
  2013-10-19 10:24 ` Clemens Ladisch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2013-10-19  9:10 UTC (permalink / raw)
  To: kernel-janitors

There is a 4 byte hole in the bus_reset struct at the end of the struct
after ->generation.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
index d7d5c8a..d34adb3 100644
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -353,6 +353,8 @@ static void fill_bus_reset_event(struct fw_cdev_event_bus_reset *event,
 {
 	struct fw_card *card = client->device->card;
 
+	memset(event, 0, sizeof(*event));
+
 	spin_lock_irq(&card->lock);
 
 	event->closure	     = client->bus_reset_closure;

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

* Re: [patch] firewire: info leak in ioctl_get_info()
  2013-10-19  9:10 [patch] firewire: info leak in ioctl_get_info() Dan Carpenter
@ 2013-10-19 10:24 ` Clemens Ladisch
  2013-10-19 11:03 ` Stefan Richter
  2013-10-19 11:08 ` Dan Carpenter
  2 siblings, 0 replies; 4+ messages in thread
From: Clemens Ladisch @ 2013-10-19 10:24 UTC (permalink / raw)
  To: kernel-janitors

Dan Carpenter wrote:
> There is a 4 byte hole in the bus_reset struct at the end of the struct
> after ->generation.

queue_bus_reset_event() uses kzalloc(), and ioctl_get_info() does not copy
the hole.

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
> index d7d5c8a..d34adb3 100644
> --- a/drivers/firewire/core-cdev.c
> +++ b/drivers/firewire/core-cdev.c
> @@ -353,6 +353,8 @@ static void fill_bus_reset_event(struct fw_cdev_event_bus_reset *event,
>  {
>  	struct fw_card *card = client->device->card;
>
> +	memset(event, 0, sizeof(*event));
> +
>  	spin_lock_irq(&card->lock);
>
>  	event->closure	     = client->bus_reset_closure;


Regards,
Clemens

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

* Re: [patch] firewire: info leak in ioctl_get_info()
  2013-10-19  9:10 [patch] firewire: info leak in ioctl_get_info() Dan Carpenter
  2013-10-19 10:24 ` Clemens Ladisch
@ 2013-10-19 11:03 ` Stefan Richter
  2013-10-19 11:08 ` Dan Carpenter
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Richter @ 2013-10-19 11:03 UTC (permalink / raw)
  To: kernel-janitors

On Oct 19 Clemens Ladisch wrote:
> Dan Carpenter wrote:
> > There is a 4 byte hole in the bus_reset struct at the end of the struct
> > after ->generation.
> 
> queue_bus_reset_event() uses kzalloc(), and ioctl_get_info() does not copy
> the hole.

Yep.  In other words, the ioctl_get_info() information leak has been
fixed by commit 790198f74c9d "firewire: cdev: fix user memory corruption
(i386 userland on amd64 kernel)".  Its subject doesn't say so, but the
changelog does.
-- 
Stefan Richter
-===-==-= =-=- =--=
http://arcgraph.de/sr/

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

* Re: [patch] firewire: info leak in ioctl_get_info()
  2013-10-19  9:10 [patch] firewire: info leak in ioctl_get_info() Dan Carpenter
  2013-10-19 10:24 ` Clemens Ladisch
  2013-10-19 11:03 ` Stefan Richter
@ 2013-10-19 11:08 ` Dan Carpenter
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2013-10-19 11:08 UTC (permalink / raw)
  To: kernel-janitors

On Sat, Oct 19, 2013 at 12:24:30PM +0200, Clemens Ladisch wrote:
> Dan Carpenter wrote:
> > There is a 4 byte hole in the bus_reset struct at the end of the struct
> > after ->generation.
> 
> queue_bus_reset_event() uses kzalloc(), and ioctl_get_info() does not copy
> the hole.
> 

Gar...  Sorry you are right.  I appologize for that.

regards,
dan carpenter


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

end of thread, other threads:[~2013-10-19 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-19  9:10 [patch] firewire: info leak in ioctl_get_info() Dan Carpenter
2013-10-19 10:24 ` Clemens Ladisch
2013-10-19 11:03 ` Stefan Richter
2013-10-19 11:08 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox