Kees Cook
22ec1a2aea
/dev/mem: Add bounce buffer for copy-out
...
As done for /proc/kcore in
commit df04abfd18 ("fs/proc/kcore.c: Add bounce buffer for ktext data")
this adds a bounce buffer when reading memory via /dev/mem. This
is needed to allow kernel text memory to be read out when built with
CONFIG_HARDENED_USERCOPY (which refuses to read out kernel text) and
without CONFIG_STRICT_DEVMEM (which would have refused to read any RAM
contents at all).
Since this build configuration isn't common (most systems with
CONFIG_HARDENED_USERCOPY also have CONFIG_STRICT_DEVMEM), this also tries
to inform Kconfig about the recommended settings.
This patch is modified from Brad Spengler/PaX Team's changes to /dev/mem
code in the last public patch of grsecurity/PaX based on my understanding
of the code. Changes or omissions from the original code are mine and
don't reflect the original grsecurity/PaX code.
Reported-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Fixes: f5509cc18d ("mm: Hardened usercopy")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-18 15:59:17 +01:00
..
agp
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
hw_random
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
2017-11-14 10:52:09 -08:00
ipmi
treewide: setup_timer() -> timer_setup()
2017-11-21 15:57:07 -08:00
mwave
char/mwave: make some arrays static const to make object code smaller
2017-07-17 17:23:16 +02:00
pcmcia
Char/Misc patches for 4.15-rc1
2017-11-16 09:10:59 -08:00
tpm
treewide: setup_timer() -> timer_setup()
2017-11-21 15:57:07 -08:00
xilinx_hwicap
char: xilinx_hwicap: Fix warnings in the driver
2017-08-28 17:04:47 +02:00
xillybus
apm-emulation.c
apm-emulation: move APM_MINOR_DEV to include/linux/miscdevice.h
2017-01-10 21:46:41 +01:00
applicom.c
applicom: constify pci_device_id.
2017-08-28 17:11:28 +02:00
applicom.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
bfin-otp.c
bsr.c
ds1302.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
ds1620.c
dsp56k.c
format-security: move static strings to const
2017-05-08 17:15:14 -07:00
dtlk.c
treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
2017-11-21 15:57:05 -08:00
efirtc.c
generic_nvram.c
hangcheck-timer.c
treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
2017-11-21 15:57:05 -08:00
hpet.c
hpet: Make cmd parameter of hpet_ioctl_common() unsigned
2017-03-17 15:10:49 +09:00
Kconfig
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
lp.c
lp: support 64-bit time_t user space
2017-11-28 16:54:00 +01:00
Makefile
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
mbcs.c
mbcs.h
mem.c
/dev/mem: Add bounce buffer for copy-out
2017-12-18 15:59:17 +01:00
misc.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
mspec.c
drivers, char: convert vma_data.refcnt from atomic_t to refcount_t
2017-03-23 13:57:19 +01:00
nsc_gpio.c
nvram.c
nwbutton.c
treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
2017-11-21 15:57:05 -08:00
nwbutton.h
treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
2017-11-21 15:57:05 -08:00
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c
ppdev.c
ppdev: remove unused ROUND_UP macro
2017-07-17 17:23:17 +02:00
ps3flash.c
random.c
kmemcheck: remove annotations
2017-11-15 18:21:04 -08:00
raw.c
rtc.c
treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
2017-11-21 15:57:05 -08:00
scx200_gpio.c
snsc.c
sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>
2017-03-02 08:42:32 +01:00
snsc.h
snsc_event.c
sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h>
2017-03-02 08:42:29 +01:00
sonypi.c
dmi: Mark all struct dmi_system_id instances const
2017-09-14 11:59:30 +02:00
tb0219.c
tile-srom.c
tlclk.c
timer: Remove last user of TIMER_INITIALIZER
2017-10-05 15:01:18 +02:00
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c
dma-mapping updates for 4.14:
2017-09-12 13:30:06 -07:00