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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Mar 2021 11:34:14 +0000 (12:34 +0100)
commitc71edc5d2480774ec2fec62bb84064aed6d582bd
tree9f757fd2ce2d19cb67f2fe70d8b3855e3c7d9327
parentd8a380105699b6189b4419af2b9be99ebf6aaf42
scsi: iscsi: Restrict sessions and handles to admin capabilities

commit 688e8128b7a92df982709a4137ea4588d16f24aa upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/scsi_transport_iscsi.c