Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755502Ab0LHAmA (ORCPT ); Tue, 7 Dec 2010 19:42:00 -0500 Received: from kroah.org ([198.145.64.141]:54735 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754013Ab0LHAeX (ORCPT ); Tue, 7 Dec 2010 19:34:23 -0500 X-Mailbox-Line: From gregkh@clark.site Tue Dec 7 16:06:40 2010 Message-Id: <20101208000640.520633396@clark.site> User-Agent: quilt/0.48-11.2 Date: Tue, 07 Dec 2010 16:04:09 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Vasiliy Kulikov , Al Viro Subject: [10/44] ipc: shm: fix information leak to userland In-Reply-To: <20101208003205.GA4286@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1145 Lines: 38 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Vasiliy Kulikov commit 3af54c9bd9e6f14f896aac1bb0e8405ae0bc7a44 upstream. The shmid_ds structure is copied to userland with shm_unused{,2,3} fields unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov Acked-by: Al Viro Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- ipc/shm.c | 1 + 1 file changed, 1 insertion(+) --- a/ipc/shm.c +++ b/ipc/shm.c @@ -469,6 +469,7 @@ static inline unsigned long copy_shmid_t { struct shmid_ds out; + memset(&out, 0, sizeof(out)); ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm); out.shm_segsz = in->shm_segsz; out.shm_atime = in->shm_atime; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/