lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170704164822.20177-1-colin.king@canonical.com>
Date:   Tue,  4 Jul 2017 17:48:21 +0100
From:   Colin King <colin.king@...onical.com>
To:     Daniel Vetter <daniel.vetter@...el.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Sean Paul <seanpaul@...omium.org>,
        David Airlie <airlied@...ux.ie>,
        dri-devel@...ts.freedesktop.org, Al Viro <viro@...iv.linux.org.uk>
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][drm-next] drm compat: ensure mode in drm_agp_info is being copied

From: Colin Ian King <colin.king@...onical.com>

A recent compat change removed the copying of i32.mode from info.mode.
Add it back in to fix this removal as we currently are leaking information
from the stack.

Detected by CoverityScan, CID#1449374 ("Unitialized scalar variable")

Fixes: 2337f2272ee1 ("compat_drm: switch AGP compat ioctls to drm_ioctl_kernel()")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
 drivers/gpu/drm/drm_ioc32.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 340eccfe35a1..94acf5109235 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -648,6 +648,7 @@ static int compat_drm_agp_info(struct file *file, unsigned int cmd,
 
 	i32.agp_version_major = info.agp_version_major;
 	i32.agp_version_minor = info.agp_version_minor;
+	i32.mode = info.mode;
 	i32.aperture_base = info.aperture_base;
 	i32.aperture_size = info.aperture_size;
 	i32.memory_allowed = info.memory_allowed;
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ