From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750966AbdE3G0O (ORCPT ); Tue, 30 May 2017 02:26:14 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:50942 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750720AbdE3G0J (ORCPT ); Tue, 30 May 2017 02:26:09 -0400 Date: Tue, 30 May 2017 08:26:01 +0200 (CEST) From: Thomas Gleixner To: Manjeet Pawar cc: perex@perex.cz, tiwai@suse.de, alsa-devel@alsa-project.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, a.sahrawat@samsung.com, lalit.mohan@samsung.com, pankaj.m@samsung.com, Vaneet Narang Subject: Re: [PATCH] ALSA: Adjust structure(snd_timer_tread) members to avoid 8 padding bytes In-Reply-To: <1496125148-37895-1-git-send-email-manjeet.p@samsung.com> Message-ID: References: <1496125148-37895-1-git-send-email-manjeet.p@samsung.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 May 2017, Manjeet Pawar wrote: > This patch is made to fix below CVE issue where 8 padding bytes are sent to > user without being initialized. Structure members are adjusted to avoid 8 > padding bytes. > > CVE-2016-4569/CVE-2016-4578: > The stack object tread has a total size of 32 bytes. Its field > event and val both contain 4 bytes padding. These 8 bytes > padding bytes are sent to user without being initialized. > > Fix patch: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cec8f96e49d9be372fdb0c3836dcf31ec71e457e > https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?h=for-next&id=9a47e9cff994f37f7f0dbd9ae23740d0f64f9fe6 > > These patches does memset on structure object to initialize 8 padding bytes, which can be skipped by > adjusting structure members. And by rearranging the struct members you break existing user space, which is a NONO. The struct has to stay as is. Thanks, tglx