]> git.karo-electronics.de Git - karo-tx-linux.git/commit
target: Add missing mapped_lun bounds checking during make_mappedlun setup
authorNicholas Bellinger <nab@linux-iscsi.org>
Tue, 19 Feb 2013 02:31:37 +0000 (18:31 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Mar 2013 22:03:34 +0000 (06:03 +0800)
commit89651d99c93fea49a2fdc97e8fa7f3fa60094108
tree0f39dbcd2f8e22d15c6c85686565bc0cdb9df6e5
parent62bfc5c9f00702407220c34cb3110c37d2353480
target: Add missing mapped_lun bounds checking during make_mappedlun setup

commit fbbf8555a986ed31e54f006b6cc637ea4ff1425b upstream.

This patch adds missing bounds checking for the configfs provided
mapped_lun value during target_fabric_make_mappedlun() setup ahead
of se_lun_acl initialization.

This addresses a potential OOPs when using a mapped_lun value that
exceeds the hardcoded TRANSPORT_MAX_LUNS_PER_TPG-1 value within
se_node_acl->device_list[].

Reported-by: Jan Engelhardt <jengelh@inai.de>
Cc: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_fabric_configfs.c