* [PATCH] ALSA: Adjust structure(snd_timer_tread) members to avoid 8 padding bytes [not found] <CGME20170530062242epcas5p1fb7f94e02c6550a60603ce28090cc70d@epcas5p1.samsung.com> @ 2017-05-30 6:19 ` Manjeet Pawar 2017-05-30 6:26 ` Thomas Gleixner 0 siblings, 1 reply; 2+ messages in thread From: Manjeet Pawar @ 2017-05-30 6:19 UTC (permalink / raw) To: perex, tiwai, alsa-devel, linux-api, linux-kernel Cc: a.sahrawat, lalit.mohan, pankaj.m, Manjeet Pawar, Vaneet Narang 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. Signed-off-by: Manjeet Pawar <manjeet.p@samsung.com> Signed-off-by: Vaneet Narang <v.narang@samsung.com> --- include/uapi/sound/asound.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index a45be6b..820c5a0 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -789,8 +789,8 @@ enum { struct snd_timer_tread { int event; - struct timespec tstamp; unsigned int val; + struct timespec tstamp; }; /**************************************************************************** -- 1.9.1 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: Adjust structure(snd_timer_tread) members to avoid 8 padding bytes 2017-05-30 6:19 ` [PATCH] ALSA: Adjust structure(snd_timer_tread) members to avoid 8 padding bytes Manjeet Pawar @ 2017-05-30 6:26 ` Thomas Gleixner 0 siblings, 0 replies; 2+ messages in thread From: Thomas Gleixner @ 2017-05-30 6:26 UTC (permalink / raw) To: Manjeet Pawar Cc: perex, tiwai, alsa-devel, linux-api, linux-kernel, a.sahrawat, lalit.mohan, pankaj.m, Vaneet Narang 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-30 6:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20170530062242epcas5p1fb7f94e02c6550a60603ce28090cc70d@epcas5p1.samsung.com>
2017-05-30 6:19 ` [PATCH] ALSA: Adjust structure(snd_timer_tread) members to avoid 8 padding bytes Manjeet Pawar
2017-05-30 6:26 ` Thomas Gleixner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®