From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
Dave Airlie <airlied@redhat.com>
Subject: [6/8] drm: stop information leak of old kernel stack.
Date: Tue, 24 Aug 2010 15:16:59 -0700 [thread overview]
Message-ID: <20100824221820.587960452@clark.site> (raw)
In-Reply-To: <20100824224631.GA5458@kroah.com>
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
Content-Length: 1047
Lines: 36
From: Dave Airlie <airlied@redhat.com>
commit b9f0aee83335db1f3915f4e42a5e21b351740afd upstream.
non-critical issue, CVE-2010-2803
Userspace controls the amount of memory to be allocate, so it can
get the ioctl to allocate more memory than the kernel uses, and get
access to kernel stack. This can only be done for processes authenticated
to the X server for DRI access, and if the user has DRI access.
Fix is to just memset the data to 0 if the user doesn't copy into
it in the first place.
Reported-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/drm_drv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -504,7 +504,9 @@ int drm_ioctl(struct inode *inode, struc
retcode = -EFAULT;
goto err_i1;
}
- }
+ } else
+ memset(kdata, 0, _IOC_SIZE(cmd));
+
retcode = func(dev, kdata, file_priv);
if ((retcode == 0) && (cmd & IOC_OUT)) {
next prev parent reply other threads:[~2010-08-24 22:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-24 22:46 [0/8] 2.6.27.53-stable review Greg KH
2010-08-24 22:16 ` [1/8] ARM: Tighten check for allowable CPSR values Greg KH
2010-08-24 22:16 ` [2/8] kbuild: fix make incompatibility Greg KH
2010-08-24 22:16 ` [3/8] selinux: use default proc sid on symlinks Greg KH
2010-08-24 22:16 ` [4/8] can: add limit for nframes and clean up signed/unsigned variables Greg KH
2010-08-24 22:16 ` [5/8] fixes for using make 3.82 Greg KH
2010-08-24 22:16 ` Greg KH [this message]
2010-08-24 22:17 ` [7/8] USB: add device IDs for igotu to navman Greg KH
2010-08-24 22:17 ` [8/8] USB: io_ti: check firmware version before updating Greg KH
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=20100824221820.587960452@clark.site \
--to=gregkh@suse.de \
--cc=airlied@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=stable-review@kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox