[lkml]   [2004]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: PATCH: cdrecord: avoiding scsi device numbering for ide devices
On Thursday 19 August 2004 21:19, Mark Lord wrote:
> >And what do you do the day someone posts "lock IDE drive with random
> >password as any user" to bugtraq ?
> I should hope that these lines in the driver would prevent such:
> if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
> return -EACCES;


Sending raw commands is _privileged_ operation.

Alan's example is invalid because IDE driver requires CAP_SYS_ADMIN and
CAP_SYS_RAWIO so if there is some security risk involved - it is in the user
apps not in the kernel. Also Linus first fixed SG_IO correctly with
requiring CAP_SYS_RAWIO but then (under Alan's influence?) he added filtering
which broke cd writing and which is just unmaintainable.

Also filtering cannot work in all cases because there are vendor specific
opcodes, some devices redefines some opcodes etc. - this should be left to
user space.

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.079 / U:3.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site