From: Clemens Ladisch <clemens@ladisch.de>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
Arnd Bergmann <arnd@arndb.de>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/8] char: hpet: fix information leak to userland
Date: Mon, 18 Oct 2010 15:10:20 +0000 [thread overview]
Message-ID: <4CBC635C.6030500@ladisch.de> (raw)
In-Reply-To: <1287326477-7940-1-git-send-email-segooon@gmail.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Clemens Ladisch <clemens@ladisch.de>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
Arnd Bergmann <arnd@arndb.de>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/8] char: hpet: fix information leak to userland
Date: Mon, 18 Oct 2010 17:10:20 +0200 [thread overview]
Message-ID: <4CBC635C.6030500@ladisch.de> (raw)
In-Reply-To: <1287326477-7940-1-git-send-email-segooon@gmail.com>
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
next prev parent reply other threads:[~2010-10-18 15:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-17 14:41 [PATCH 2/8] char: hpet: fix information leak to userland Vasiliy Kulikov
2010-10-17 14:41 ` Vasiliy Kulikov
2010-10-18 15:10 ` Clemens Ladisch [this message]
2010-10-18 15:10 ` Clemens Ladisch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CBC635C.6030500@ladisch.de \
--to=clemens@ladisch.de \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=ebiederm@xmission.com \
--cc=fweisbec@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=segooon@gmail.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.