linux-stable/drivers/scsi/qedf
Bui Quang Minh d0184a375e scsi: qedf: Ensure the copied buf is NUL terminated
Currently, we allocate a count-sized kernel buffer and copy count from
userspace to that buffer. Later, we use kstrtouint on this buffer but we
don't ensure that the string is terminated inside the buffer, this can
lead to OOB read when using kstrtouint. Fix this issue by using
memdup_user_nul instead of memdup_user.

Fixes: 61d8658b4a ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Link: https://lore.kernel.org/r/20240424-fix-oob-read-v2-4-f1f1b53a10f4@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-05-06 21:19:24 -04:00
..
drv_fcoe_fw_funcs.c qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
drv_fcoe_fw_funcs.h qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
drv_scsi_fw_funcs.c
drv_scsi_fw_funcs.h
Kconfig
Makefile
qedf.h scsi: qedf: Use FC rport as argument for qedf_initiate_tmf() 2023-10-13 14:23:14 -04:00
qedf_attr.c scsi: qedf: Remove unnecessary code 2022-04-25 23:36:31 -04:00
qedf_dbg.c scsi: qedf: Use vzalloc() instead of vmalloc()/memset(0) 2021-05-21 16:31:17 -04:00
qedf_dbg.h scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly 2023-07-31 14:42:59 -04:00
qedf_debugfs.c scsi: qedf: Ensure the copied buf is NUL terminated 2024-05-06 21:19:24 -04:00
qedf_els.c qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
qedf_fip.c
qedf_hsi.h
qedf_io.c scsi: qedf: Make qedf_execute_tmf() non-preemptible 2024-04-24 20:58:53 -04:00
qedf_main.c scsi: qedf: Replace deprecated strncpy() with strscpy() 2024-03-10 18:37:43 -04:00
qedf_version.h