scsi: iscsi: Restrict sessions and handles to admin capabilities
authorLee Duncan <lduncan@suse.com>
Tue, 23 Feb 2021 21:06:24 +0000 (13:06 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 5 Mar 2021 01:09:50 +0000 (20:09 -0500)
commit688e8128b7a92df982709a4137ea4588d16f24aa
treed86dc54e1bd181e77e16edfba22f09e9ae612786
parentf69d02e37a85645aa90d18cacfff36dba370f797
scsi: iscsi: Restrict sessions and handles to admin capabilities

Protect the iSCSI transport handle, available in sysfs, by requiring
CAP_SYS_ADMIN to read it. Also protect the netlink socket by restricting
reception of messages to ones sent with CAP_SYS_ADMIN. This disables
normal users from being able to end arbitrary iSCSI sessions.

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