[PATCH] SCSI tape security: require CAP_ADMIN for SG_IO etc.
The kernel currently allows any user permitted to access the tape device file to send the tape drive commands that may either make the tape drivers internal state inconsistent or to change the drive parameters so that other users find the drive to be unusable. This patch changes ioctl handling so that SG_IO, SCSI_IOCTL_COMMAND, etc. require CAP_ADMIN. This solves the consistency problems for SCSI tapes. The st driver provides user-accessible commands to change the drive parameters that users may need to access. The SCSI command permissions were discussed widely on the linux lists but this did not result in any useful refinement of the permissions. It may very well be that the tape drives are the only devices that users are sometimes given permissions to access and that have security problems with the current command filtering. This patch solves the problem for tapes and no more elaborate patches are needed. Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Showing
Please register or sign in to comment