]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commit8a1524db4e75622940f91127ee99de52d8ce8098
tree9149f2797af8d1f4f792704f2e2ca04d0ab5cba1
parentcaa7f8124a4a52e5093fd128cc653b36c1308c25
ibmasm: don't write out of bounds in read handler

BugLink: http://bugs.launchpad.net/bugs/1810554
commit a0341fc1981a950c1e902ab901e98f60e0e243f3 upstream.

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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/misc/ibmasm/ibmasmfs.c