Commit b4aaa78f authored by Dan Rosenberg's avatar Dan Rosenberg Committed by Florian Tobias Schandinat

drivers/video/via/ioctl.c: prevent reading uninitialized stack memory

The VIAFB_GET_INFO device ioctl allows unprivileged users to read 246
bytes of uninitialized stack memory, because the "reserved" member of
the viafb_ioctl_info struct declared on the stack is not altered or
zeroed before being copied back to the user.  This patch takes care of
it.
Signed-off-by: default avatarDan Rosenberg <dan.j.rosenberg@gmail.com>
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
parent f2709837
...@@ -25,6 +25,8 @@ int viafb_ioctl_get_viafb_info(u_long arg) ...@@ -25,6 +25,8 @@ int viafb_ioctl_get_viafb_info(u_long arg)
{ {
struct viafb_ioctl_info viainfo; struct viafb_ioctl_info viainfo;
memset(&viainfo, 0, sizeof(struct viafb_ioctl_info));
viainfo.viafb_id = VIAID; viainfo.viafb_id = VIAID;
viainfo.vendor_id = PCI_VIA_VENDOR_ID; viainfo.vendor_id = PCI_VIA_VENDOR_ID;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment