[lkml]   [2004]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectSG_IO and security
Since the entire thread seems to have died again unresolved I'd suggest
the following patch should get into 2.6.8 so that anyone with read
access to any block device cannot issue arbitary scsi commands to it
(like writes or firmware erase)

--- drivers/block/scsi_ioctl.c~ 2004-08-12 14:14:38.078821640 +0100
+++ drivers/block/scsi_ioctl.c 2004-08-12 14:14:38.079821488 +0100
@@ -115,6 +115,8 @@
unsigned char cmd[BLK_MAX_CDB];

+ if (!capable(CAP_SYS_RAWIO))
+ return -EPERM;
if (hdr->interface_id != 'S')
return -EINVAL;
if (hdr->cmd_len > BLK_MAX_CDB)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:05    [W:0.107 / U:1.644 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site