diff options
author | Jörn Engel <joern@logfs.org> | 2013-07-03 11:35:11 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-07-27 05:34:30 +0100 |
commit | 0c6830bbac5cff8f2c7f39e5ff6ec704d755eacf (patch) | |
tree | 9918d61d9f4b9ac560c2030bba8dfd897a131840 /drivers/target | |
parent | 0465278f3154d76363fa886c0602b4255100cc05 (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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/target')
-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 83dcf4939fa..3b802853e2a 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c @@ -419,7 +419,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 \ |