diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-07-06 19:48:55 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-07-07 21:36:50 -0400 |
commit | 37b32c6faf0e0e40c65c1014df7527ececdd3f9a (patch) | |
tree | 99a74c2eb21bb561209ce202613a820544d24467 /drivers/target/iscsi/iscsi_target_configfs.c | |
parent | 0fbfc46fb0b2f543a8b539e94c6c293ebc0b05a6 (diff) |
iscsi-target: Fix tfc_tpg_auth_cit configfs length overflow
This patch fixes another potential buffer overflow while processing
iscsi_node_auth input for configfs attributes in v3.11 for-next
TPG tfc_tpg_auth_cit context.
Reported-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.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 88bc805e998f..b41d4786fa08 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c | |||
@@ -1081,7 +1081,7 @@ static ssize_t __iscsi_##prefix##_store_##name( \ | |||
1081 | if (!capable(CAP_SYS_ADMIN)) \ | 1081 | if (!capable(CAP_SYS_ADMIN)) \ |
1082 | return -EPERM; \ | 1082 | return -EPERM; \ |
1083 | \ | 1083 | \ |
1084 | snprintf(auth->name, PAGE_SIZE, "%s", page); \ | 1084 | snprintf(auth->name, sizeof(auth->name), "%s", page); \ |
1085 | if (!(strncmp("NULL", auth->name, 4))) \ | 1085 | if (!(strncmp("NULL", auth->name, 4))) \ |
1086 | auth->naf_flags &= ~flags; \ | 1086 | auth->naf_flags &= ~flags; \ |
1087 | else \ | 1087 | else \ |