summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/frontend.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-05-06 12:50:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-05-06 13:05:00 -0700
commit3ca9e5d36afb5c0a6ee6ceee69e507370beb59c6 (patch)
treedb4bf1253bbaba30d4955b4eed1a5708ec73793c /drivers/char/agp/frontend.c
parentd353efd02357a74753cd45f367a2d3d357fd6904 (diff)
downloadop-kernel-dev-3ca9e5d36afb5c0a6ee6ceee69e507370beb59c6.zip
op-kernel-dev-3ca9e5d36afb5c0a6ee6ceee69e507370beb59c6.tar.gz
agp: info leak in agpioc_info_wrap()
On 64 bit systems the agp_info struct has a 4 byte hole between ->agp_mode and ->aper_base. We need to clear it to avoid disclosing stack information to userspace. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/agp/frontend.c')
-rw-r--r--drivers/char/agp/frontend.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c
index 8121b4c..b297033 100644
--- a/drivers/char/agp/frontend.c
+++ b/drivers/char/agp/frontend.c
@@ -730,6 +730,7 @@ static int agpioc_info_wrap(struct agp_file_private *priv, void __user *arg)
agp_copy_info(agp_bridge, &kerninfo);
+ memset(&userinfo, 0, sizeof(userinfo));
userinfo.version.major = kerninfo.version.major;
userinfo.version.minor = kerninfo.version.minor;
userinfo.bridge_id = kerninfo.device->vendor |
OpenPOWER on IntegriCloud