alistair23-linux/fs/dlm
Tycho Andersen 9de30f3f7f dlm: don't leak kernel pointer to userspace
In copy_result_to_user(), we first create a struct dlm_lock_result, which
contains a struct dlm_lksb, the last member of which is a pointer to the
lvb. Unfortunately, we copy the entire struct dlm_lksb to the result
struct, which is then copied to userspace at the end of the function,
leaking the contents of sb_lvbptr, which is a valid kernel pointer in some
cases (indeed, later in the same function the data it points to is copied
to userspace).

It is an error to leak kernel pointers to userspace, as it undermines KASLR
protections (see e.g. 65eea8edc3 ("floppy: Do not copy a kernel pointer to
user memory in FDGETPRM ioctl") for another example of this).

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Signed-off-by: David Teigland <teigland@redhat.com>
2018-11-07 16:12:45 -06:00
..
ast.c DLM: fix overflow dlm_cb_seq 2017-09-25 12:45:21 -05:00
ast.h
config.c dlm: make config_item_type const 2017-10-19 16:15:22 +02:00
config.h
debug_fs.c dlm: Improve a size determination in table_seq_start() 2017-08-07 11:23:09 -05:00
dir.c
dir.h
dlm_internal.h
Kconfig
lock.c dlm: remove dlm_send_rcom_lookup_dump 2017-10-09 09:29:31 -05:00
lock.h
lockspace.c dlm: don't allow zero length names 2018-11-07 16:10:45 -06:00
lockspace.h
lowcomms.c iov_iter: Separate type from direction and use accessor functions 2018-10-24 00:41:07 +01:00
lowcomms.h
lvb_table.h
main.c
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
member.c dlm: fix invalid free 2018-11-07 15:50:34 -06:00
member.h
memory.c
memory.h
midcomms.c
midcomms.h
netlink.c
plock.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
rcom.c dlm: remove dlm_send_rcom_lookup_dump 2017-10-09 09:29:31 -05:00
rcom.h dlm: remove dlm_send_rcom_lookup_dump 2017-10-09 09:29:31 -05:00
recover.c DLM: retry rcom when dlm_wait_function is timed out. 2017-09-25 12:45:21 -05:00
recover.h
recoverd.c dlm: recheck kthread_should_stop() before schedule() 2017-09-25 12:48:10 -05:00
recoverd.h
requestqueue.c
requestqueue.h
user.c dlm: don't leak kernel pointer to userspace 2018-11-07 16:12:45 -06:00
user.h
util.c
util.h