diff options
author | Joern Engel <joern@logfs.org> | 2013-07-03 11:35:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-04 04:50:32 -0400 |
commit | a5d56a2217664c7bc06cb7deeac9a2a155ba4345 (patch) | |
tree | 2d5cbebb723112d8448a0ee9da393ba70f841ab7 | |
parent | fff98879381243f59b6e9f630d55312aa34a89c9 (diff) |
iscsi-target: Fix tfc_tpg_nacl_auth_cit configfs length overflow
commit 0fbfc46fb0b2f543a8b539e94c6c293ebc0b05a6 upstream.
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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 8d8b3ff68490..421344da8b51 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c | |||
@@ -474,7 +474,7 @@ static ssize_t __iscsi_##prefix##_store_##name( \ | |||
474 | if (!capable(CAP_SYS_ADMIN)) \ | 474 | if (!capable(CAP_SYS_ADMIN)) \ |
475 | return -EPERM; \ | 475 | return -EPERM; \ |
476 | \ | 476 | \ |
477 | snprintf(auth->name, PAGE_SIZE, "%s", page); \ | 477 | snprintf(auth->name, sizeof(auth->name), "%s", page); \ |
478 | if (!strncmp("NULL", auth->name, 4)) \ | 478 | if (!strncmp("NULL", auth->name, 4)) \ |
479 | auth->naf_flags &= ~flags; \ | 479 | auth->naf_flags &= ~flags; \ |
480 | else \ | 480 | else \ |