diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-05-03 22:27:00 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-05-05 02:33:28 +0200 |
commit | 3cf0b0311e746a26dcc7c0b5ba0756f61d636a33 (patch) | |
tree | b58c36fa7eb6ca75c233db097b4b951619634b03 /drivers | |
parent | Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
download | linux-3cf0b0311e746a26dcc7c0b5ba0756f61d636a33.tar.xz linux-3cf0b0311e746a26dcc7c0b5ba0756f61d636a33.zip |
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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/agp/frontend.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c index 8121b4c70ede..b29703324e94 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 | |