* [PATCH] drivers/media/video/ivtv/ivtvfb.c: prevent reading uninitialized stack memory
@ 2010-09-15 21:44 Dan Rosenberg
0 siblings, 0 replies; 2+ messages in thread
From: Dan Rosenberg @ 2010-09-15 21:44 UTC (permalink / raw)
To: awalls; +Cc: ivtv-devel, linux-media, linux-kernel, security, stable
The FBIOGET_VBLANK device ioctl allows unprivileged users to read 16
bytes of uninitialized stack memory, because the "reserved" member of
the fb_vblank 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: Dan Rosenberg <dan.j.rosenberg@gmail.com>
--- linux-2.6.35.4.orig/drivers/media/video/ivtv/ivtvfb.c 2010-08-26 19:47:12.000000000 -0400
+++ linux-2.6.35.4/drivers/media/video/ivtv/ivtvfb.c 2010-09-15 14:16:46.797375399 -0400
@@ -458,6 +458,8 @@ static int ivtvfb_ioctl(struct fb_info *
struct fb_vblank vblank;
u32 trace;
+ memset(&vblank, 0, sizeof(struct fb_vblank));
+
vblank.flags = FB_VBLANK_HAVE_COUNT |FB_VBLANK_HAVE_VCOUNT |
FB_VBLANK_HAVE_VSYNC;
trace = read_reg(IVTV_REG_DEC_LINE_FIELD) >> 16;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers/media/video/ivtv/ivtvfb.c: prevent reading uninitialized stack memory
@ 2010-09-16 0:59 Andy Walls
0 siblings, 0 replies; 2+ messages in thread
From: Andy Walls @ 2010-09-16 0:59 UTC (permalink / raw)
To: Dan Rosenberg; +Cc: ivtv-devel, linux-media, linux-kernel, security, stable
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1196 bytes --]
Acked-by: Andy Walls <awalls@md.metrocast.net>
By tomorrow evening I'll put this in my repo and ask for Mauro to pull it.
Regards,
Andy
Dan Rosenberg <drosenberg@vsecurity.com> wrote:
>The FBIOGET_VBLANK device ioctl allows unprivileged users to read 16
>bytes of uninitialized stack memory, because the "reserved" member of
>the fb_vblank 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: Dan Rosenberg <dan.j.rosenberg@gmail.com>
>
>--- linux-2.6.35.4.orig/drivers/media/video/ivtv/ivtvfb.c 2010-08-26 19:47:12.000000000 -0400
>+++ linux-2.6.35.4/drivers/media/video/ivtv/ivtvfb.c 2010-09-15 14:16:46.797375399 -0400
>@@ -458,6 +458,8 @@ static int ivtvfb_ioctl(struct fb_info *
> struct fb_vblank vblank;
> u32 trace;
>
>+ memset(&vblank, 0, sizeof(struct fb_vblank));
>+
> vblank.flags = FB_VBLANK_HAVE_COUNT |FB_VBLANK_HAVE_VCOUNT |
> FB_VBLANK_HAVE_VSYNC;
> trace = read_reg(IVTV_REG_DEC_LINE_FIELD) >> 16;
>
>
>
>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-16 1:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-15 21:44 [PATCH] drivers/media/video/ivtv/ivtvfb.c: prevent reading uninitialized stack memory Dan Rosenberg
-- strict thread matches above, loose matches on Subject: below --
2010-09-16 0:59 Andy Walls
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox