Re: [patch] firewire: info leak in ioctl_get_info()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
>
> 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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux