]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/a.out: Clear the dump structure initially
authorBorislav Petkov <bp@suse.de>
Tue, 12 Feb 2019 13:28:03 +0000 (14:28 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 2 May 2019 20:41:53 +0000 (21:41 +0100)
commitca255144b557c82ffa2e3ea9ecd5947c94d33cdc
tree54fce78c1a3ba7f206b395492a75ad58ac9c6812
parent86b3a39533827ba13210a148c856badcecbe3323
x86/a.out: Clear the dump structure initially

commit 10970e1b4be9c74fce8ab6e3c34a7d718f063f2c upstream.

dump_thread32() in aout_core_dump() does not clear the user32 structure
allocated on the stack as the first thing on function entry.

As a result, the dump.u_comm, dump.u_ar0 and dump.signal which get
assigned before the clearing, get overwritten.

Rename that function to fill_dump() to make it clear what it does and
call it first thing.

This was caught while staring at a patch by Derek Robson
<robsonde@gmail.com>.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Derek Robson <robsonde@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Matz <matz@suse.de>
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20190202005512.3144-1-robsonde@gmail.com
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/ia32/ia32_aout.c