lkml.org 
[lkml]   [2020]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git pull] coredump infoleak fix

* Al Viro <viro@zeniv.linux.org.uk> wrote:

> IOW, copy_xstate_to_kernel()/copy_xstate_to_user() needs not only to map
> from compacted format to standard one; it also needs to compensate for
> that "we might skip saving the components that are in init state; we'll
> report which ones got skipped by way of ->header.xfeatures" thing.
>
> Again, those leaked uninit chunks are *not* in the same places for all
> threads. Without any overflows, etc. involved. And at least for
> the set 0 (x87 registers) the init state is not all-zeroes, so blanket
> memset() done first is not going to give the right results.

I'm not arguing against your fix (at all!) and I'll pull it in for
v5.8 if Linus doesn't beat me to it.

I was arguing:

>> shouldn't we also zero-initialize the dump data

with emphasis on the 'also'. :-)

To me the biggest practical fail here was the exposure of genuinely
uninitialized data - not that the dumped information might not be a
100% semantically correct FPU dump.

[ Unless I'm missing some non-coredump aspect of all this (such as the
wrong saving done in signal handling context for example?), which is
always a possibility. ]

Thanks,

Ingo

\
 
 \ /
  Last update: 2020-05-29 11:35    [W:0.264 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site