android_kernel_oneplus_msm8998/arch
Colin Ian King 38b1b66e57 x86/mtrr: Don't copy uninitialized gentry fields back to userspace
commit 32043fa065b51e0b1433e48d118821c71b5cd65d upstream.

Currently the copy_to_user of data in the gentry struct is copying
uninitiaized data in field _pad from the stack to userspace.

Fix this by explicitly memset'ing gentry to zero, this also will zero any
compiler added padding fields that may be in struct (currently there are
none).

Detected by CoverityScan, CID#200783 ("Uninitialized scalar variable")

Fixes: b263b31e8a ("x86, mtrr: Use explicit sizing and padding for the 64-bit ioctls")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Cc: security@kernel.org
Link: https://lkml.kernel.org/r/20181218172956.1440-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-13 10:05:27 +01:00
..
alpha arch/alpha, termios: implement BOTHER, IBSHIFT and termios2 2018-11-21 09:27:42 +01:00
arc ARC: io.h: Implement reads{x}()/writes{x}() 2018-12-21 14:09:52 +01:00
arm ARM: 8814/1: mm: improve/fix ARM v7_dma_inv_range() unaligned address handling 2018-12-21 14:09:53 +01:00
arm64 arm64: remove no-op -p linker flag 2018-12-01 09:46:36 +01:00
avr32
blackfin
c6x
cris mm: replace get_user_pages() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
frv
h8300
hexagon hexagon: modify ffs() and fls() to return int 2018-10-10 08:52:12 +02:00
ia64 mm: replace get_user_pages() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
m32r
m68k
metag
microblaze
mips mm: replace get_user_pages_unlocked() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
mn10300
nios2
openrisc
parisc parisc: Fix map_pages() to not overwrite existing pte entries 2018-11-21 09:27:30 +01:00
powerpc powerpc/msi: Fix NULL pointer access in teardown code 2018-12-21 14:09:51 +01:00
s390 mm: replace get_user_pages_unlocked() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
score
sh mm: replace get_user_pages_unlocked() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
sparc mm: replace get_user_pages_unlocked() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
tile
um um: Give start_idle_thread() a return code 2018-11-27 16:08:00 +01:00
unicore32
x86 x86/mtrr: Don't copy uninitialized gentry fields back to userspace 2019-01-13 10:05:27 +01:00
xtensa xtensa: fix coprocessor context offset definitions 2018-12-13 09:21:26 +01:00
.gitignore
Kconfig