]> git.ipfire.org Git - people/ms/linux.git/commit
iscsi-target: fix heap buffer overflow on error
authorKees Cook <keescook@chromium.org>
Thu, 23 May 2013 17:32:17 +0000 (10:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Jun 2013 19:53:20 +0000 (12:53 -0700)
commita6ff6ba26bd680f6c2afe0e599ffde19f9c41cb2
tree8627ed887e00122f4fdfac6eda56368ec4e7f791
parent4fdf4857d1deca93307532525857dc7490641af5
iscsi-target: fix heap buffer overflow on error

commit cea4dcfdad926a27a18e188720efe0f2c9403456 upstream.

If a key was larger than 64 bytes, as checked by iscsi_check_key(), the
error response packet, generated by iscsi_add_notunderstood_response(),
would still attempt to copy the entire key into the packet, overflowing
the structure on the heap.

Remote preauthentication kernel memory corruption was possible if a
target was configured and listening on the network.

CVE-2013-2850

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/iscsi/iscsi_target_parameters.c
drivers/target/iscsi/iscsi_target_parameters.h