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 16:50:32 +0800 |
commit | a5d56a2217664c7bc06cb7deeac9a2a155ba4345 (patch) | |
tree | 2d5cbebb723112d8448a0ee9da393ba70f841ab7 /drivers/target/iscsi/iscsi_target_configfs.c | |
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>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_configfs.c')
-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( \ if (!capable(CAP_SYS_ADMIN)) \ return -EPERM; \ \ - snprintf(auth->name, PAGE_SIZE, "%s", page); \ + snprintf(auth->name, sizeof(auth->name), "%s", page); \ if (!strncmp("NULL", auth->name, 4)) \ auth->naf_flags &= ~flags; \ else \ |