Searched hist:"801 f287c" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/target/iscsi/ |
H A D | iscsi_target_configfs.c | 801f287c Sat Jul 22 10:26:37 CDT 2023 Konstantin Shelekhin <k.shelekhin@yadro.com> 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>
|