Skip to content

Commit

Permalink
iscsi-target: Fix tfc_tpg_nacl_auth_cit configfs length overflow
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jörn Engel authored and Nicholas Bellinger committed Jul 8, 2013
1 parent adb54c2 commit 0fbfc46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/iscsi/iscsi_target_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,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 \
Expand Down

0 comments on commit 0fbfc46

Please sign in to comment.