From patchwork Wed Jan 26 02:12:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Figg X-Patchwork-Id: 80440 X-Patchwork-Delegate: stefan.bader@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id C3A19B70F4 for ; Wed, 26 Jan 2011 13:15:13 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Phuua-0004nN-JV; Wed, 26 Jan 2011 02:15:08 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1PhuuY-0004nE-Kr for kernel-team@lists.ubuntu.com; Wed, 26 Jan 2011 02:15:06 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PhuuY-0002dN-Ix for ; Wed, 26 Jan 2011 02:15:06 +0000 Received: from pool-98-108-155-157.ptldor.fios.verizon.net ([98.108.155.157] helo=localhost) by hutte.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1PhuuY-0007tn-6O for kernel-team@lists.ubuntu.com; Wed, 26 Jan 2011 02:15:06 +0000 From: Brad Figg To: kernel-team@lists.ubuntu.com Subject: [Hardy] [CVE-2010-4079] [PATCH 1/1] V4L/DVB: ivtvfb: prevent reading uninitialized stack memory, CVE-2010-4079 Date: Tue, 25 Jan 2011 18:12:45 -0800 Message-Id: <1296007965-31306-1-git-send-email-brad.figg@canonical.com> X-Mailer: git-send-email 1.7.0.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Dan Rosenberg CVE-2010-4079 BugLink: http://bugs.launchpad.net/bugs/707649 Released by: 2.6.32.y stable upstream 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 Signed-off-by: Andy Walls Signed-off-by: Mauro Carvalho Chehab (cherry-picked from commit 405707985594169cfd0b1d97d29fcb4b4c6f2ac9) Signed-off-by: Brad Figg Acked-by: Tim Gardner Acked-by: Stefan Bader --- drivers/media/video/ivtv/ivtvfb.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index 52ffd15..48fc638 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c @@ -378,6 +378,8 @@ static int ivtvfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long ar 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(0x028c0) >> 16;