[lkml]   [2010]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] ipc: initialize structure memory to zero for shmctl
On Wed, Oct 06, 2010 at 05:10:31PM -0700, Kees Cook wrote:
> The old shm interface will leak a few bytes of stack contents. Explicitly
> initialize the structure to zero-fill the untouched fields.

Umm... I wonder if we ever have gaps in there; note that gaps between
the fields are _not_ initialized in compound literals. Yes, I realize
that it's a separate problem, but explicit memset() prior to initializations
of fields might be a better solution, covering both.

 \ /
  Last update: 2010-10-07 03:25    [W:4.279 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site