]> git.baikalelectronics.ru Git - kernel.git/commit
tcmu: prevent corruption when invalid data page requested
authorMike Christie <mchristi@redhat.com>
Tue, 19 Dec 2017 10:03:54 +0000 (04:03 -0600)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 12 Jan 2018 23:07:29 +0000 (15:07 -0800)
commit0b08e501266ec2fb62164b61d778a7aed8552c5f
tree102298e922af8367d4e0c5355ae42333a6ee216e
parentaa5a860a7197c4a0d6af6aabd8987498c7eba509
tcmu: prevent corruption when invalid data page requested

We will always have a page mapped for cmd data if it is
valid command. If the mapping does not exist then something
bad happened in userspace and it should not proceed. This
has us return VM_FAULT_SIGBUS when this happens instead of
returning a freshly allocated paged. The latter can cause
corruption because userspace might write the pages data
overwriting valid data or return it to the initiator.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_user.c