android_kernel_samsung_msm8976/block
Mathieu Desnoyers 1a4fb51a8b kernel-wide: fix missing validations on __get/__put/__copy_to/__copy_from_user()
I found the following pattern that leads in to interesting findings:

  grep -r "ret.*|=.*__put_user" *
  grep -r "ret.*|=.*__get_user" *
  grep -r "ret.*|=.*__copy" *

The __put_user() calls in compat_ioctl.c, ptrace compat, signal compat,
since those appear in compat code, we could probably expect the kernel
addresses not to be reachable in the lower 32-bit range, so I think they
might not be exploitable.

For the "__get_user" cases, I don't think those are exploitable: the worse
that can happen is that the kernel will copy kernel memory into in-kernel
buffers, and will fail immediately afterward.

The alpha csum_partial_copy_from_user() seems to be missing the
access_ok() check entirely.  The fix is inspired from x86.  This could
lead to information leak on alpha.  I also noticed that many architectures
map csum_partial_copy_from_user() to csum_partial_copy_generic(), but I
wonder if the latter is performing the access checks on every
architectures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-27 22:10:26 +02:00
..
partitions This is the 3.10.99 stable release 2017-04-18 17:17:46 +02:00
bfq-cgroup.c block: introduce the BFQ-v7r8 I/O sched for 3.10.8+ 2017-04-18 04:37:19 +02:00
bfq-ioc.c block: introduce the BFQ-v7r8 I/O sched for 3.10.8+ 2017-04-18 04:37:19 +02:00
bfq-iosched.c block, bfq: add Early Queue Merge (EQM) to BFQ-v7r8 for 3.10.8+ 2017-04-18 04:37:20 +02:00
bfq-sched.c block, bfq: add Early Queue Merge (EQM) to BFQ-v7r8 for 3.10.8+ 2017-04-18 04:37:20 +02:00
bfq.h block, bfq: add Early Queue Merge (EQM) to BFQ-v7r8 for 3.10.8+ 2017-04-18 04:37:20 +02:00
blk-cgroup.c
blk-cgroup.h
blk-core.c treewide: Fix typo in Documentation/DocBook 2019-07-27 22:10:20 +02:00
blk-exec.c
blk-flush.c
blk-integrity.c
blk-ioc.c
blk-iopoll.c
blk-lib.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
blk-map.c treewide: Fix typo in Documentation/DocBook 2019-07-27 22:10:20 +02:00
blk-merge.c
blk-settings.c
blk-softirq.c
blk-sysfs.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
blk-tag.c
blk-throttle.c
blk-timeout.c
blk.h
bsg-lib.c
bsg.c BACKPORT: block: add blk_rq_set_block_pc() 2017-04-22 23:03:01 +02:00
cfq-iosched.c cfq: fix starvation of asynchronous writes 2019-07-27 21:42:46 +02:00
compat_ioctl.c kernel-wide: fix missing validations on __get/__put/__copy_to/__copy_from_user() 2019-07-27 22:10:26 +02:00
deadline-iosched.c
elevator.c
genhd.c block: fix del_gendisk() vs blkdev_ioctl crash 2019-07-27 21:43:29 +02:00
ioctl.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
Kconfig
Kconfig.iosched block: cgroups, kconfig, build bits for BFQ-v7r8-3.10.8+ 2017-04-18 04:37:19 +02:00
Makefile block: cgroups, kconfig, build bits for BFQ-v7r8-3.10.8+ 2017-04-18 04:37:19 +02:00
noop-iosched.c
partition-generic.c block: fix an error code in add_partition() 2019-07-27 21:44:48 +02:00
row-iosched.c
scsi_ioctl.c block: allow WRITE_SAME commands with the SG_IO ioctl 2019-07-27 21:43:28 +02:00
test-iosched.c