This is a note to let you know that I've just added the patch titled
video: kyro: fix incorrect sizes when copying to userspace
to the 3.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
video-kyro-fix-incorrect-sizes-when-copying-to-userspace.patch
and it can be found in the queue-3.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 2ab68ec927310dc488f3403bb48f9e4ad00a9491 Mon Sep 17 00:00:00 2001
From: Sasha Levin <[email protected]>
Date: Tue, 19 Nov 2013 14:25:36 -0500
Subject: video: kyro: fix incorrect sizes when copying to userspace
From: Sasha Levin <[email protected]>
commit 2ab68ec927310dc488f3403bb48f9e4ad00a9491 upstream.
kyro would copy u32s and specify sizeof(unsigned long) as the size to copy.
This would copy more data than intended and cause memory corruption and might
leak kernel memory.
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/video/kyro/fbdev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/video/kyro/fbdev.c
+++ b/drivers/video/kyro/fbdev.c
@@ -625,15 +625,15 @@ static int kyrofb_ioctl(struct fb_info *
}
break;
case KYRO_IOCTL_UVSTRIDE:
- if (copy_to_user(argp, &deviceInfo.ulOverlayUVStride,
sizeof(unsigned long)))
+ if (copy_to_user(argp, &deviceInfo.ulOverlayUVStride,
sizeof(deviceInfo.ulOverlayUVStride)))
return -EFAULT;
break;
case KYRO_IOCTL_STRIDE:
- if (copy_to_user(argp, &deviceInfo.ulOverlayStride,
sizeof(unsigned long)))
+ if (copy_to_user(argp, &deviceInfo.ulOverlayStride,
sizeof(deviceInfo.ulOverlayStride)))
return -EFAULT;
break;
case KYRO_IOCTL_OVERLAY_OFFSET:
- if (copy_to_user(argp, &deviceInfo.ulOverlayOffset,
sizeof(unsigned long)))
+ if (copy_to_user(argp, &deviceInfo.ulOverlayOffset,
sizeof(deviceInfo.ulOverlayOffset)))
return -EFAULT;
break;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.12/video-kyro-fix-incorrect-sizes-when-copying-to-userspace.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html