public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: 2.6.8.1 Mis-detect CRDW as CDROM
@ 2004-08-17 13:12 Joerg Schilling
  2004-08-17 13:48 ` Andreas Messer
  0 siblings, 1 reply; 29+ messages in thread
From: Joerg Schilling @ 2004-08-17 13:12 UTC (permalink / raw)
  To: andreas.messer, schilling; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2488 bytes --]

>From: Andreas Messer <andreas.messer@gmx.de>
>Joerg Schilling wrote:
>> Judging from the number of reports, I would guess that the Linux kernel is
>> much more insecure than cdrecord.
>>
>> What some people did (chmod on /dev/ entries) was definitely always a
>> bigger security risk than running cdrecord suid root.

>I, dont think, that running cdrecord suid root is a risk, but i think, that 
>there are much more cd-recording applications, not based on cdrecord, which 
>may be insecure. Or perhaps someone will write a little programm, wich will 
>override the firmware.
>I think its a good way to filter the commands within the kernel. Its a 
>additional security-barrage. 

I did not say that it should not be done at all. I only don't like that it
has been introduced without warning.

Next week, I will publish cdrtools-2.01-final and thus there is code freeze now.
Only extreme bugs _inside_ cdrtools will be fixed and only if this is possible
with knowing all side effects.

As I already wrote: libscg already has the ability to switch to euid 0 before
a SCSI command is send and to switch back to the old euid directly after the 
SCSI command returns. But this has only been introduced and tested on Solaris.
Making it work on Linux too would be a feature extension which is not possible
while in code freeze.

Also note that it is questionable whether this change really increases the 
security. In case that the check is only done at open() time, cdrecord could
later switch into a state that does not allow to become root again later.
In case you need root privs for sending generic SCSI, cdrecord needs to keep
its ability to become root again later. If there was a possible buffer overrun
problem, then a user could just push seteuid(0) before execl("/bin/sh".....
when creating an expliot.


Of course, all security issues that are independent from buffer overflows
will not happen with a uid switching cdrecord.

In general, applications that directly access hardware should be audited to be
secure and trusted. 

BTW: I am planning to make cdrecord usable on a rootless Solaris 10 in the 
near future. You then of course would need to use pfksh as your shell.

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling@fokus.fraunhofer.de	(work) chars I am J"org Schilling
 URL:  http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: 2.6.8.1 Mis-detect CRDW as CDROM
@ 2004-08-17 11:14 Joerg Schilling
  2004-08-17 11:47 ` Andreas Messer
  0 siblings, 1 reply; 29+ messages in thread
From: Joerg Schilling @ 2004-08-17 11:14 UTC (permalink / raw)
  To: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2622 bytes --]

>If the programs must be set suid, is that safe? In the past I was
>always told that setting e.g. cdrecord suid was a possible security issue.
>But I really don't understand enough of the new security model in the
>kernel to judge if that's right or wrong...

Judging from the number of reports, I would guess that the Linux kernel is
much more insecure than cdrecord.

What some people did (chmod on /dev/ entries) was definitely always a bigger
security risk than running cdrecord suid root.

What SuSE tries (writing a resource manager) is also a bigger security risk
then cdrecord itself (at least as long as it is not done decently).

There has been only one expliot for cdrecord so far and a fix has been available
within hours (long before the exploit has been made public). There has been
one additional possible buffer overflow (reported by the author of the SuSE 
resource manager who did not respond after I told him why the SuSE resource 
manager is a security risk).

Cdrecord has been converted to run with effective id 0 only in the start up 
phase 1.5 years ago. It has been enabled to work with Sun's security 
enhancements (euid 0 is needed for ioctl USCSI) 8 months ago.

If Linux believes that there should be enhanced security similar to Solaris and 
if Linux is a true open Source business, then I would expect that there is 
cooperation. If I change things in e.g. mkisofs or cdrecord that could result
in problems for my "users", I send a notification mail to the XCDRoast & k3b 
authors early enough.

If Linux plans to implement incompatible changes, I would expect that 
"important users" are informed in advance so that it is possible to discuss the 
problems an to have a planned smooth migration. As this did not happen, the 
change needs to be called a bug. This is even more obvious if we take into 
account that cdrtools curently is in code freeze state as a 2.01-final will 
come the next days.

For this reason, I would recommend that Linux immediately goes back to the old
behavior and informs "important users". A change that has effects that are as
widely as this one should not be tried again within the next 3 months. Then 
there is a change to have a smooth migration......

BTW: I try to inform my "important users" more than a year before I introduce
important changes.



Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling@fokus.fraunhofer.de	(work) chars I am J"org Schilling
 URL:  http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: 2.6.8.1 Mis-detect CRDW as CDROM
@ 2004-08-16 15:33 Giacomo Perale
  0 siblings, 0 replies; 29+ messages in thread
From: Giacomo Perale @ 2004-08-16 15:33 UTC (permalink / raw)
  To: linux-kernel

cdrecord 2.00.3 seems to work flawlessy even if it isn't set suid, but
everyone I know noticed the problem with cdrecord 2.01alphaXX (checked
with alpha28, alpha33 and alpha36).


^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: 2.6.8.1 Mis-detect CRDW as CDROM
@ 2004-08-16  7:40 Wolfgang Scheicher
  2004-08-16 15:17 ` Adam Jones
  0 siblings, 1 reply; 29+ messages in thread
From: Wolfgang Scheicher @ 2004-08-16  7:40 UTC (permalink / raw)
  To: linux-kernel

John Wendel wrote:

> K3B detects my Lite-on LTR-52327S CDRW as a CDROM when run with 2.6.8.1.
> Booting back into 2.6.7 corrects the problem.

I have the same problem.
I found out that cdrecord has a empty Line for the supported modes.
( not k3b fault )

cdrecord -checkdrive with kernel 2.6.7 (vanilla) gives:
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
with kernel 2.6.8 :
Supported modes:      ( the rest is blank )

Trying to burn anyway leads to "not supported mode" messages.

my system: Athlon on nforce2 board, LITE-ON brenner LTR-52327S, gcc 3.4.1

Worf

^ permalink raw reply	[flat|nested] 29+ messages in thread
* 2.6.8.1 Mis-detect CRDW as CDROM
@ 2004-08-15 21:43 John Wendel
  2004-08-15 20:53 ` Alan Cox
  2004-08-16 12:38 ` Marc Ballarin
  0 siblings, 2 replies; 29+ messages in thread
From: John Wendel @ 2004-08-15 21:43 UTC (permalink / raw)
  To: Linux

K3B detects my Lite-on LTR-52327S CDRW as a CDROM when run with 2.6.8.1. 
Booting back into 2.6.7 corrects the problem. I've attached the (totally 
uninteresting parts of) dmesg.  Any clues  appreciated.

Linux version 2.6.7-1.494.2.2 (bhcompile@tweety.build.redhat.com) (gcc 
version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #1 Tue Aug 3 09:39:58 
EDT 2004
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: LITE-ON LTR-52327S, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hdc: ATAPI 52X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20

Linux version 2.6.8.1 (jwendel@xxxxxxxxx) (gcc version 3.3.3 20040412 
(Red Hat Linux 3.3.3-7)) #1 Sun Aug 15 10:50:07 PDT 2004
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: LITE-ON LTR-52327S, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hdc: ATAPI 52X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2004-08-17 13:48 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <2tB3a-7rU-19@gated-at.bofh.it>
     [not found] ` <2tOWp-cF-5@gated-at.bofh.it>
     [not found]   ` <2tQlC-1kl-27@gated-at.bofh.it>
2004-08-16 15:06     ` 2.6.8.1 Mis-detect CRDW as CDROM Wolfgang Scheicher
2004-08-16 15:10       ` Frank Steiner
2004-08-17 13:12 Joerg Schilling
2004-08-17 13:48 ` Andreas Messer
  -- strict thread matches above, loose matches on Subject: below --
2004-08-17 11:14 Joerg Schilling
2004-08-17 11:47 ` Andreas Messer
2004-08-16 15:33 Giacomo Perale
2004-08-16  7:40 Wolfgang Scheicher
2004-08-16 15:17 ` Adam Jones
2004-08-15 21:43 John Wendel
2004-08-15 20:53 ` Alan Cox
2004-08-15 23:24   ` John Wendel
2004-08-15 23:10     ` Alan Cox
2004-08-16 12:38 ` Marc Ballarin
2004-08-16 13:03   ` Alan Cox
2004-08-16 14:58     ` Frank Steiner
2004-08-16 17:44     ` Kronos
2004-08-16 17:57     ` Marc Ballarin
2004-08-16 19:09       ` Marc Ballarin
2004-08-16 19:33         ` Kai Makisara
2004-08-16 21:12     ` Marc Ballarin
2004-08-17  6:32       ` Frank Steiner
2004-08-17 11:11         ` Andreas Messer
2004-08-17 11:29         ` Christer Weinigel
2004-08-17 11:59           ` Christer Weinigel
2004-08-17 13:25           ` Marc Ballarin
2004-08-17 11:41         ` Marc Ballarin
2004-08-17 13:03           ` Petri Kaukasoina
2004-08-16 13:32   ` Petri Kaukasoina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox