linux-stable/drivers/scsi/bfa
Azeem Shaikh 973464fded scsi: bfa: Replace all non-returning strlcpy() with strscpy()
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/20230516013345.723623-1-azeemshaikh38@gmail.com
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-05-16 21:38:36 -04:00
..
bfa.h
bfa_core.c
bfa_cs.h
bfa_defs.h
bfa_defs_fcs.h
bfa_defs_svc.h scsi: bfa: Fix typo 2021-05-21 17:00:21 -04:00
bfa_fc.h scsi: bfa: Replace one-element array with flexible-array member 2022-11-17 18:15:45 +00:00
bfa_fcbuild.c scsi: bfa: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:38:36 -04:00
bfa_fcbuild.h
bfa_fcpim.c scsi: bfa: Drop driver-defined SCSI status codes 2021-01-22 21:14:08 -05:00
bfa_fcpim.h
bfa_fcs.c scsi: bfa: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:38:36 -04:00
bfa_fcs.h scsi: bfa: Remove unnecessary struct declarations 2021-04-05 23:44:01 -04:00
bfa_fcs_fcpim.c
bfa_fcs_lport.c scsi: bfa: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:38:36 -04:00
bfa_fcs_rport.c
bfa_hw_cb.c
bfa_hw_ct.c
bfa_ioc.c scsi: bfa: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:38:36 -04:00
bfa_ioc.h
bfa_ioc_cb.c
bfa_ioc_ct.c
bfa_modules.h
bfa_plog.h
bfa_port.c
bfa_port.h
bfa_svc.c scsi: bfa: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:38:36 -04:00
bfa_svc.h
bfad.c scsi: bfa: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:38:36 -04:00
bfad_attr.c scsi: bfa: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:38:36 -04:00
bfad_bsg.c scsi: bfa: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:38:36 -04:00
bfad_bsg.h
bfad_debugfs.c scsi: bfa: Remove redundant NULL check 2022-04-25 23:23:05 -04:00
bfad_drv.h scsi: bfa: Drop redundant pci_enable_pcie_error_reporting() 2023-03-09 22:00:38 -05:00
bfad_im.c scsi: bfa: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:38:36 -04:00
bfad_im.h scsi: bfa: Convert bfad_reset_sdev_bflags() from a macro into a function 2022-11-08 03:34:39 +00:00
bfi.h
bfi_ms.h
bfi_reg.h
Makefile