From patchwork Fri Feb 4 17:26:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Figg X-Patchwork-Id: 81926 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 20FD7B7140 for ; Sat, 5 Feb 2011 04:29:57 +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 1PlPTl-0001hL-E0; Fri, 04 Feb 2011 17:29:53 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1PlPTj-0001gD-3S for kernel-team@lists.ubuntu.com; Fri, 04 Feb 2011 17:29:51 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PlPTj-0006qd-0S for ; Fri, 04 Feb 2011 17:29:51 +0000 Received: from pool-98-108-155-157.ptldor.fios.verizon.net ([98.108.155.157] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1PlPTi-0008TW-L9 for kernel-team@lists.ubuntu.com; Fri, 04 Feb 2011 17:29:50 +0000 From: Brad Figg To: kernel-team@lists.ubuntu.com Subject: [Karmic][ [CVE-2010-4082] [PATCH 1/1] drivers/video/via/ioctl.c: prevent reading uninitialized stack memory, CVE-2010-4082 Date: Fri, 4 Feb 2011 09:26:40 -0800 Message-Id: <1296840400-28974-2-git-send-email-brad.figg@canonical.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1296840400-28974-1-git-send-email-brad.figg@canonical.com> References: <1296840400-28974-1-git-send-email-brad.figg@canonical.com> 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-4082 BugLink: http://bugs.launchpad.net/bugs/712744 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: Dan Rosenberg Signed-off-by: Florian Tobias Schandinat (cherry-picked from commit b4aaa78f4c2f9cde2f335b14f4ca30b01f9651ca) Signed-off-by: Brad Figg Acked-by: Tim Gardner Acked-by: Stefan Bader --- drivers/video/via/ioctl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/video/via/ioctl.c b/drivers/video/via/ioctl.c index da03c07..4d553d0 100644 --- a/drivers/video/via/ioctl.c +++ b/drivers/video/via/ioctl.c @@ -25,6 +25,8 @@ int viafb_ioctl_get_viafb_info(u_long arg) { struct viafb_ioctl_info viainfo; + memset(&viainfo, 0, sizeof(struct viafb_ioctl_info)); + viainfo.viafb_id = VIAID; viainfo.vendor_id = PCI_VIA_VENDOR_ID;