[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4CBC635C.6030500@ladisch.de>
Date: Mon, 18 Oct 2010 17:10:20 +0200
From: Clemens Ladisch <clemens@...isch.de>
To: Vasiliy Kulikov <segooon@...il.com>
CC: kernel-janitors@...r.kernel.org,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Arnd Bergmann <arnd@...db.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/8] char: hpet: fix information leak to userland
Vasiliy Kulikov wrote:
> Structure info is copied to userland with some padding fields unitialized.
> It leads to leaking of stack memory.
> --- a/drivers/char/hpet.c
> +++ b/drivers/char/hpet.c
> @@ -581,6 +581,7 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg,
> break;
> case HPET_INFO:
> {
> + memset(info, 0, sizeof(*info));
> if (devp->hd_ireqfreq)
> info->hi_ireqfreq =
> hpet_time_div(hpetp, devp->hd_ireqfreq);
This makes the following assignment "info->hi_ireqfreq = 0;" superfluous.
Regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists