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 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_attr.c scsi: qla2xxx: Delay I/O Abort on PCI error 2024-11-19 09:22:43 +01:00
qla_bsg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_bsg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_dbg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_dbg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_def.h scsi: qla2xxx: Update manufacturer detail 2024-11-19 09:22:47 +01:00
qla_devtbl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_dfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_dsd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_fw.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_gbl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
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 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_iocb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_isr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_mbx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_mid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_mr.c scsi: qla2xxx: Replace all non-returning strlcpy() with strscpy() 2024-11-19 12:27:06 +01:00
qla_mr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_nvme.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_nvme.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_nx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_nx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_nx2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_nx2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_os.c scsi: qla2xxx: Fix system crash due to bad pointer access 2024-11-18 12:11:13 +01:00
qla_settings.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_sup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_target.c scsi: qla2xxx: Fix command flush on cable pull 2024-11-19 09:22:43 +01:00
qla_target.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_tmpl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_tmpl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla_version.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcm_qla2xxx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcm_qla2xxx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00