mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 00:08:50 +00:00
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>
This commit is contained in:
parent
0fbfc46fb0
commit
37b32c6faf
@ -1081,7 +1081,7 @@ static ssize_t __iscsi_##prefix##_store_##name( \
|
|||||||
if (!capable(CAP_SYS_ADMIN)) \
|
if (!capable(CAP_SYS_ADMIN)) \
|
||||||
return -EPERM; \
|
return -EPERM; \
|
||||||
\
|
\
|
||||||
snprintf(auth->name, PAGE_SIZE, "%s", page); \
|
snprintf(auth->name, sizeof(auth->name), "%s", page); \
|
||||||
if (!(strncmp("NULL", auth->name, 4))) \
|
if (!(strncmp("NULL", auth->name, 4))) \
|
||||||
auth->naf_flags &= ~flags; \
|
auth->naf_flags &= ~flags; \
|
||||||
else \
|
else \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user