First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 47881
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: gen2daniel <gen2daniel@gmx.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
plasmaroo:
 
plasmaroo: ()

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 47881 depends on: Show dependency tree
Bug 47881 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-04-14 21:57 0000
The Linux kernel performs no length checking on symbolic links stored on
an ISO9660 file system, allowing a malformed CD to perform an arbitrary
length overflow in kernel memory.

Symbolic links on ISO9660 file systems are supported by the 'Rock Ridge'
extension to the standard format. The vulnerability can be triggered by
performing a directory listing on a maliciously constructed ISO file
system, or attempting to access a file via a malformed symlink on such a
file system. Many distributions allow local users to mount CDs, which
makes them potentially vulnerable to local elevation attacks.

The relevant functions are as follows:

fs/isofs/rock.c: rock_ridge_symlink_readpage()
fs/isofs/rock.c: get_symlink_chunk()

There is no checking that the total length of the symlink being read is
less than the memory space that has been allocated for storing it. By
supplying many CE (continuation) records, each with another SL (symlink)
chunk, it is possible for an attacker to build an arbitrary length data
structure in kernel memory space.

A proof of concept exploit has been written that allows a local user to
gain root level access. It is also possible to cause execution of code
with kernel privileges.

III. ANALYSIS

In order to exploit this vulnerability, an attacker must be able to
mount a maliciously constructed file system. This may be accomplished by
the following:

a. Having an account on the machine to be compromised and inserting a
malformed disk. Some distributions allow local users to mount removable
media without needing to be root and with some configurations. This
happens automatically when a disk is inserted. The proof of concept
exploit works from floppy disk as well as CD-ROM.

If the attacker can reboot the machine from his or her own media or
supply command line options to the kernel during the initialization
process after rebooting, exploiting this vulnerability may not be
necessary to gain further access. In this situation, the attacker will
not be able to directly access any encrypted file systems.

b. If encrypted virtual file systems are implemented, and the attacker
gains access to an account able to mount one, then an attacker may be
able to mount his or her own maliciously formed file system via the
encryption interface. This would allow them access to any already
mounted file systems.

c. Being root already. If the attacker has already gained root, but the
kernel has some form of patch preventing root being able to perform
certain functions, he or she may still be able to mount a file system.
As the vulnerability occurs in kernel space, it may be possible for them
to neutralize the restrictions.

IV. DETECTION

The issue affects the 2.4.x, 2.5.x and 2.6.x kernel. Other kernel
implementations may also be vulnerable.

V. WORKAROUNDS

Disable user mounting of removable media devices.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From Tim Yamin (RETIRED) 2004-04-14 22:52:18 0000 -------
Thanks; fixed kernels will be added here as they are done.

------- Comment #2 From Tim Yamin (RETIRED) 2004-04-14 23:19:41 0000 -------
Vanilla-sources-2.4.26 is in...

------- Comment #3 From Tim Yamin (RETIRED) 2004-04-14 23:45:27 0000 -------
Vanilla-sources-2.4.26 is in...

------- Comment #4 From Tim Yamin (RETIRED) 2004-04-14 23:45:52 0000 -------
SELinux-sources-2.4.25 is in...

------- Comment #5 From solar 2004-04-15 00:02:48 0000 -------
As long as no bug reports show up for grsec at grsec site and spender 
moves his patches out of http://grsecurity.net/~spender/ and to the main
site. I'll be putting it in as 2.4.26 (2.x final) and removing all older
versions. This should conclude the grsec-2.4.x series all together.
Well atleast till the next sec bug is discovered.

------- Comment #6 From Tim Yamin (RETIRED) 2004-04-15 00:34:30 0000 -------
Win4Lin-Sources 2.4.25-r1 and 2.6.5-r1 which are patched are now in...

------- Comment #7 From Tim Yamin (RETIRED) 2004-04-15 00:47:10 0000 -------
AA-Sources-2.4.23-r2 patched...

------- Comment #8 From Tim Yamin (RETIRED) 2004-04-15 00:57:30 0000 -------
Alpha-sources 2.4.21-r5 added and now in...

------- Comment #9 From Tim Yamin (RETIRED) 2004-04-15 01:10:31 0000 -------
Ck-sources 2.4.25-r1 and 2.6.4-r1 are patched.

------- Comment #10 From Tim Yamin (RETIRED) 2004-04-15 01:17:43 0000 -------
Compaq-sources-2.4.9.32.7-r3 added...

------- Comment #11 From Tim Yamin (RETIRED) 2004-04-15 01:32:34 0000 -------
Development sources 2.6.6_rc1 added.

------- Comment #12 From Tim Yamin (RETIRED) 2004-04-15 02:11:14 0000 -------
IA64-Sources 2.4.24-r2 added.

------- Comment #13 From Tim Yamin (RETIRED) 2004-04-15 03:32:59 0000 -------
Planet-CCRMA-sources-2.4.21-r6 added in...

------- Comment #14 From Tim Yamin (RETIRED) 2004-04-15 03:33:45 0000 -------
PAC-Sources-2.4.23-r4 added in...

------- Comment #15 From Tim Yamin (RETIRED) 2004-04-15 03:56:50 0000 -------
PPC-Sources 2.4.24-r3 added in...

------- Comment #16 From Tim Yamin (RETIRED) 2004-04-15 05:43:15 0000 -------
Added in PPC-Sources-Benh-2.4.22-r6...
Added in PPC-Sources-Crypto-2.4.20-r4...
Added in PPC-Sources-Dev-2.4.24-r3...
Added in PPC64-Sources-2.6.4-r1...

Joker's added in SPARC-Sources 2.4.25-r1...

------- Comment #17 From Tim Yamin (RETIRED) 2004-04-15 05:59:35 0000 -------
Added VServer-sources-2.4.25.1.3.8-r1...

------- Comment #18 From Tim Yamin (RETIRED) 2004-04-15 08:29:05 0000 -------
WOLK-Sources 4.11-r2 and 4.9-r5 added...

------- Comment #19 From Tim Yamin (RETIRED) 2004-04-15 11:54:07 0000 -------
GS-sources-2.4.25_pre7-r3 added...
Tseng added Hardened-Dev-Sources 2.6.4-r4...
UCLinux-Sources 2.4.24_p0-r1 and 2.6.5_p0-r1 added...
Usermode-Sources 2.6.3-r2 and 2.4.24-r2 added...
XFS-Sources 2.4.24-r4 added...

------- Comment #20 From Joshua Kinard 2004-04-16 19:16:10 0000 -------
mips-sources and ck-sources had the wrong patch for 2.6 added (it was the
mremap patch).  ck-sources is apparently fixed, I just fixed mips-sources.

------- Comment #21 From Tim Yamin (RETIRED) 2004-04-17 08:35:24 0000 -------
*** Bug 48050 has been marked as a duplicate of this bug. ***

------- Comment #22 From Derk W te Bokkel 2004-04-21 15:50:19 0000 -------
FYI .. Patch causes problems for CD players both gnome and Kde based.. app will
crash .. gnome CD player at least craches without killing the playing of the CD

------- Comment #23 From Thierry Carrez (RETIRED) 2004-04-28 02:33:07 0000 -------
For the sake of completeness, here is a vuln list for the kernel :

* CAN-2004-0109 : Privilege escalation using ISO9660 file systems
* CAN-2004-0133 : Information leak in the XFS code
* CAN-2004-0177 : Information leak in the ext3 code
* CAN-2004-0181 : Information leak in the JFS code
* CAN-2004-0178 : Denial of service condition in the Sound Blaster driver
* CAN-2004-0228 : Information leak in cpufreq userspace ioctl
* CAN-2004-0229 : Vulnerability in fb_copy_cmap (framebuffer driver) [2.6]
* CAN-2004-0394 : Buffer overflow in 2.4 kernel's panic() function [2.4]
* CAN-2004-0424 : Integer overflow in code handling the MCAST_MSFILTER option

There is also a "Memory leak in the do_fork() routine" which seems to have no CVE number.

Given the broad range of vulns here, it may be a good idea to issue a partial GLSA with only available 2.4.26 / 2.6.4 versions (which I believe include all fixes), and take care of the patch backporting & testing next ?

-K

------- Comment #24 From Kurt Lieber 2004-04-28 03:51:22 0000 -------
what kernels *can* be patched?  gentoo-dev-sources 2.6.4 and vanilla sources
2.4.26, presumably.  What else?  grsec-sources 2.4.26?  gs-sources?  

------- Comment #25 From Tim Yamin (RETIRED) 2004-04-28 08:10:21 0000 -------
Anything can be patched, except the MCAST_MSFILTER, since I haven't had anybody
who I know that uses it; thus I can't test the patch. If you find somebody that
can be done as well.

------- Comment #26 From Thierry Carrez (RETIRED) 2004-05-04 07:22:48 0000 -------
If we can't test, then I think we should leave the MCAST_FILTER patch out and
issue a GLSA for the others. We really need a GLSA out for the kernel asap.

-K

------- Comment #27 From Thierry Carrez (RETIRED) 2004-05-04 07:33:31 0000 -------
*** Bug 48466 has been marked as a duplicate of this bug. ***

------- Comment #28 From Tim Yamin (RETIRED) 2004-06-04 11:29:22 0000 -------
The remaining sources that are vulnerable are listed below; I've fixed
everything else. Sources marked with "*" only need the CAN-2004-0394 patch
applied; this can be found in aa-sources/files. Sources without an asterisk
need patching for more things; please see comment #23.

gentoo-dev-sources - johnm is absent; this needs bumping to 2.6.6 or patching.
hardened-dev-sources - This also needs bumping to 2.6.6 or patching.
openmosix-sources - Adding cluster@gentoo.org to CC.

hardened-sources * - Adding hardened@gentoo.org to CC.
hppa-sources * - Assigned to GMSoft; says it should be done in a day or two...
pegasos-sources * - Adding dholm@gentoo.org to CC.
selinux-sources * - Adding pebenito@gentoo.org to CC.

------- Comment #29 From Tim Yamin (RETIRED) 2004-06-04 11:36:01 0000 -------
Alpha Team: You need to stable alpha-sources-2.4.21-r7 which solves the
security issues mentioned in this bug.

IA64 Team: You need to stable alpha-sources-2.4.24-r4 which solves the security
issues mentioned in this bug.

Thanks!

------- Comment #30 From David Holm (RETIRED) 2004-06-04 14:17:00 0000 -------
pegasos-sources-2.4.26 fixed

------- Comment #31 From Bryan Østergaard (RETIRED) 2004-06-04 17:31:02 0000 -------
Marked alpha-sources-2.4.21-r7 stable.

------- Comment #32 From Guy Martin 2004-06-06 17:18:16 0000 -------
hppa-sources-2.4.26_p4 include the fix

------- Comment #33 From Tim Yamin (RETIRED) 2004-06-14 09:27:28 0000 -------
Cluster's fixed theirs; removing from CC.

------- Comment #34 From Chris PeBenito 2004-06-15 14:00:04 0000 -------
selinux-sources fixed

------- Comment #35 From Brandon Hale (RETIRED) 2004-06-15 20:52:36 0000 -------
hardened-dev-sources patchset updated to include relevant fixes.

------- Comment #36 From Tim Yamin (RETIRED) 2004-07-03 16:06:01 0000 -------
GLSA 200407-02; http://article.gmane.org/gmane.linux.gentoo.announce/382;
closing as FIXED.

First Last Prev Next    No search results available      Search page      Enter new bug