linux/drivers/target/iscsi
Konstantin Shelekhin 801f287c93 scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show()
The function lio_target_nacl_info_show() uses sprintf() in a loop to print
details for every iSCSI connection in a session without checking for the
buffer length. With enough iSCSI connections it's possible to overflow the
buffer provided by configfs and corrupt the memory.

This patch replaces sprintf() with sysfs_emit_at() that checks for buffer
boundries.

Signed-off-by: Konstantin Shelekhin <k.shelekhin@yadro.com>
Link: https://lore.kernel.org/r/20230722152657.168859-2-k.shelekhin@yadro.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-07-31 12:09:58 -04:00
..
cxgbit treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
iscsi_target_auth.c scsi: target: iscsi: Do not require target authentication 2022-07-26 22:13:29 -04:00
iscsi_target_auth.h scsi: target: iscsi: Rename iscsi_conn to iscsit_conn 2022-05-10 22:32:20 -04:00
iscsi_target_configfs.c scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show() 2023-07-31 12:09:58 -04:00
iscsi_target_datain_values.c scsi: target: iscsi: Rename iscsi_conn to iscsit_conn 2022-05-10 22:32:20 -04:00
iscsi_target_datain_values.h scsi: target: iscsi: Rename iscsi_cmd to iscsit_cmd 2022-05-10 22:32:20 -04:00
iscsi_target_device.c scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_device.h scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_erl0.c scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_erl0.h scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_erl1.c scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_erl1.h scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_erl2.c scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_erl2.h scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_login.c scsi: target: iscsi: Fix hang in the iSCSI login code 2023-05-22 16:29:39 -04:00
iscsi_target_login.h scsi: target: iscsi: Rename iscsi_conn to iscsit_conn 2022-05-10 22:32:20 -04:00
iscsi_target_nego.c scsi: target: iscsi: Prevent login threads from racing between each other 2023-05-22 16:29:39 -04:00
iscsi_target_nego.h scsi: target: iscsi: Allow AuthMethod=None 2022-07-26 22:13:28 -04:00
iscsi_target_nodeattrib.c scsi: target: iscsi: Control authentication per ACL 2022-06-07 21:55:11 -04:00
iscsi_target_nodeattrib.h
iscsi_target_parameters.c scsi: target: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:39:44 -04:00
iscsi_target_parameters.h scsi: target: iscsi: Rename iscsi_conn to iscsit_conn 2022-05-10 22:32:20 -04:00
iscsi_target_seq_pdu_list.c scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_seq_pdu_list.h scsi: target: iscsi: Rename iscsi_cmd to iscsit_cmd 2022-05-10 22:32:20 -04:00
iscsi_target_stat.c scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_tmr.c scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_tmr.h scsi: target: iscsi: Rename iscsi_conn to iscsit_conn 2022-05-10 22:32:20 -04:00
iscsi_target_tpg.c scsi: target: iscsi: Add upcast helpers 2022-06-07 21:55:11 -04:00
iscsi_target_tpg.h scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
iscsi_target_transport.c scsi: target: Make iscsit_register_transport() return void 2020-08-04 20:56:56 -04:00
iscsi_target_util.c SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
iscsi_target_util.h scsi: target: iscsi: Fix hang in the iSCSI login code 2023-05-22 16:29:39 -04:00
iscsi_target.c scsi: target: iscsi: Fix hang in the iSCSI login code 2023-05-22 16:29:39 -04:00
iscsi_target.h scsi: target: iscsi: Rename iscsi_session to iscsit_session 2022-05-10 22:32:21 -04:00
Kconfig net: add sock_set_reuseaddr 2020-05-28 11:11:44 -07:00
Makefile