diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2015-10-27 21:47:53 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-29 01:02:16 +0100 |
commit | 2cb202c1886ca363305fba82e340bdbd71387079 (patch) | |
tree | 0308d07d1ea45f7ac9d0dac94ea1b4a5cde83348 /block/blk-mq-cpu.c | |
parent | mcb: Destroy IDA on module unload (diff) | |
download | linux-2cb202c1886ca363305fba82e340bdbd71387079.tar.xz linux-2cb202c1886ca363305fba82e340bdbd71387079.zip |
lkdtm: fix ACCESS_USERSPACE test
Add a copy_to_user() call to the ACCESS_USERSPACE test
prior to attempting direct dereferencing of the user
address to ensure the page is present. Otherwise,
a fault occurs on arm kernels even prior to the introduction
of CONFIG_CPU_SW_DOMAIN_PAN, and there is no difference in
behavior for CONFIG_CPU_SW_DOMAIN_PAN=n vs CONFIG_CPU_SW_DOMAIN_PAN=y.
Before this change, for any value of CONFIG_CPU_SW_DOMAIN_PAN:
lkdtm: Performing direct entry ACCESS_USERSPACE
lkdtm: attempting bad read at b6fe8000
Unable to handle kernel paging request at virtual address b6fe8000
After this change, for CONFIG_CPU_SW_DOMAIN_PAN=n:
lkdtm: Performing direct entry ACCESS_USERSPACE
lkdtm: attempting bad read at b6efc000
lkdtm: attempting bad write at b6efc000
After this change, for CONFIG_CPU_SW_DOMAIN_PAN=y:
lkdtm: Performing direct entry ACCESS_USERSPACE
lkdtm: attempting bad read at b6f7d000
Unhandled fault: page domain fault (0x01b) at 0xb6f7d000
...
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/blk-mq-cpu.c')
0 files changed, 0 insertions, 0 deletions