kernel_samsung_a53x/drivers/scsi/qla2xxx
Azeem Shaikh 55c2ea0184 scsi: qla2xxx: Replace all non-returning strlcpy() with strscpy()
[ Upstream commit 37f1663c91934f664fb850306708094a324c227c ]

strlcpy() reads the entire source buffer first.  This read may exceed the
destination size limit.  This is both inefficient and can lead to linear
read overflows if a source string is not NUL-terminated [1].  In an effort
to remove strlcpy() completely [2], replace strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Link: https://lore.kernel.org/r/20230516025404.2843867-1-azeemshaikh38@gmail.com
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: c3408c4ae041 ("scsi: qla2xxx: Avoid possible run-time warning with long model_num")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:06 +01:00
..
Kconfig
Makefile
qla_attr.c scsi: qla2xxx: Delay I/O Abort on PCI error 2024-11-19 09:22:43 +01:00
qla_bsg.c
qla_bsg.h
qla_dbg.c
qla_dbg.h
qla_def.h scsi: qla2xxx: Update manufacturer detail 2024-11-19 09:22:47 +01:00
qla_devtbl.h
qla_dfs.c
qla_dsd.h
qla_fw.h
qla_gbl.h
qla_gs.c scsi: qla2xxx: Update manufacturer details 2024-11-19 09:22:47 +01:00
qla_init.c scsi: qla2xxx: Replace all non-returning strlcpy() with strscpy() 2024-11-19 12:27:06 +01:00
qla_inline.h
qla_iocb.c
qla_isr.c
qla_mbx.c
qla_mid.c
qla_mr.c scsi: qla2xxx: Replace all non-returning strlcpy() with strscpy() 2024-11-19 12:27:06 +01:00
qla_mr.h
qla_nvme.c
qla_nvme.h
qla_nx.c
qla_nx.h
qla_nx2.c
qla_nx2.h
qla_os.c
qla_settings.h
qla_sup.c
qla_target.c scsi: qla2xxx: Fix command flush on cable pull 2024-11-19 09:22:43 +01:00
qla_target.h
qla_tmpl.c
qla_tmpl.h
qla_version.h
tcm_qla2xxx.c
tcm_qla2xxx.h