]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
authorChris Leech <cleech@redhat.com>
Wed, 24 Feb 2021 02:00:17 +0000 (18:00 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Mar 2021 10:27:45 +0000 (11:27 +0100)
commit1a588b51ff984aadc027078125064807c5c7bc3f
treeab9de9ad2a53975e0677da45a3ad3123c3fc3f82
parent390881843b4f13bcac8d58dcf1ebcc34e0deffea
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE

commit ec98ea7070e94cc25a422ec97d1421e28d97b7ee upstream.

As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.

Change all iSCSI sysfs attributes to use sysfs_emit().

Cc: stable@vger.kernel.org
Reported-by: Adam Nichols <adam@grimm-co.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/libiscsi.c
drivers/scsi/scsi_transport_iscsi.c