]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
authorChris Leech <cleech@redhat.com>
Thu, 11 Mar 2021 02:36:20 +0000 (23:36 -0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 16 Mar 2021 11:28:33 +0000 (12:28 +0100)
commitd3a40f7808747c90d525e9d6c1ed55490b80f192
treee9eb70adea3e14974f9b110d84cdf37d3c65b2a8
parentce4a31683d502f5697ab307cd52d730bf121afef
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE

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>
(backported from commit ec98ea7070e94cc25a422ec97d1421e28d97b7ee)
[cascardo: missing 82b8cf40bfe1 means there is no show_conn_state]
CVE-2021-27365
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/scsi/libiscsi.c
drivers/scsi/scsi_transport_iscsi.c