]> git.baikalelectronics.ru Git - kernel.git/commit
ibmasm: don't write out of bounds in read handler
authorJann Horn <jannh@google.com>
Sat, 7 Jul 2018 02:16:33 +0000 (04:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jul 2018 07:59:35 +0000 (09:59 +0200)
commite57c2fe13306835cdffec6982f41ab71e91be943
tree8a9327399df531520167dc77e6d3d62742735562
parent5a34b39b8567d3466b266d674b9b3e3a66d1eb31
ibmasm: don't write out of bounds in read handler

This read handler had a lot of custom logic and wrote outside the bounds of
the provided buffer. This could lead to kernel and userspace memory
corruption. Just use simple_read_from_buffer() with a stack buffer.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ibmasm/ibmasmfs.c