zram: avoid access beyond the zram device
(cherry pick from commit 12a7ad3b810e77137d0caf97a6dd97591e075b30) Function valid_io_request() should verify the entire request are within the zram device address range. Otherwise it may cause invalid memory access when accessing/modifying zram->meta->table[index] because the 'index' is out of range. Then it may access non-exist memory, randomly modify memory belong to other subsystems, which is hard to track down. Signed-off-by:Jiang Liu <jiang.liu@huawei.com> Cc: stable@vger.kernel.org Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Bug: 24810447 Change-Id: I648d6f874f49714a044f53ff111f5a22a38d38f8
Loading
Please register or sign in to comment