diff options
author | Jörn Engel <joern@logfs.org> | 2013-07-03 11:35:11 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-07-07 21:36:49 -0400 |
commit | 0fbfc46fb0b2f543a8b539e94c6c293ebc0b05a6 (patch) | |
tree | 073a2123b3050c1cf8f29071c65a0d5be183df8e /drivers/target/iscsi | |
parent | adb54c29310e8785e4f2eb0dc76e0e2fde943b11 (diff) |
iscsi-target: Fix tfc_tpg_nacl_auth_cit configfs length overflow
This patch fixes a potential buffer overflow while processing
iscsi_node_auth input for configfs attributes within NodeACL
tfc_tpg_nacl_auth_cit context.
Signed-off-by: Joern Engel <joern@logfs.org>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_configfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index e251849a6140..88bc805e998f 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c | |||
@@ -473,7 +473,7 @@ static ssize_t __iscsi_##prefix##_store_##name( \ | |||
473 | if (!capable(CAP_SYS_ADMIN)) \ | 473 | if (!capable(CAP_SYS_ADMIN)) \ |
474 | return -EPERM; \ | 474 | return -EPERM; \ |
475 | \ | 475 | \ |
476 | snprintf(auth->name, PAGE_SIZE, "%s", page); \ | 476 | snprintf(auth->name, sizeof(auth->name), "%s", page); \ |
477 | if (!strncmp("NULL", auth->name, 4)) \ | 477 | if (!strncmp("NULL", auth->name, 4)) \ |
478 | auth->naf_flags &= ~flags; \ | 478 | auth->naf_flags &= ~flags; \ |
479 | else \ | 479 | else \ |