Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 145513
Alias:
Product:
Component:
Status: CLOSED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Sune Kloppenborg Jeppesen <jaervosz@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
libXfont.diff libXfont.diff patch Sune Kloppenborg Jeppesen 2006-08-29 12:22 0000 2.17 KB Details | Diff
libXfont-1.2.0-r2.ebuild libXfont-1.2.0-r2.ebuild text/plain Donnie Berkholz 2006-09-05 10:19 0000 999 bytes Details
libXfont-1.2.0-r2.ebuild libXfont-1.2.0-r2.ebuild text/plain Donnie Berkholz 2006-09-05 10:21 0000 983 bytes Details
1.2.0-cid-overflows.patch 1.2.0-cid-overflows.patch patch Donnie Berkholz 2006-09-07 00:08 0000 2.77 KB Details | Diff
1.2.0-cid-overflows.patch-6447.out 1.2.0-cid-overflows.patch-6447.out text/plain Thomas Cort (RETIRED) 2006-09-07 04:00 0000 3.17 KB Details
1.2.0-cid-overflows.patch 1.2.0-cid-overflows.patch patch Donnie Berkholz 2006-09-07 09:37 0000 2.18 KB Details | Diff
1.2.0-cid-overflows.patch 1.2.0-cid-overflows.patch patch Thomas Cort (RETIRED) 2006-09-07 10:31 0000 2.26 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 145513 depends on: Show dependency tree
Bug 145513 blocks:

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: 2006-08-29 12:20 0000
iDefense has contacted xorg_security about multiple vunlerabilites they 
found in X's CID fonts parser. These vulnerabilites, based on integer 
overflows, are exploitable by a user able to connect to the X server to 
execute code with the X server's privileges.

The affected code has not changed since XFree86 3.3.6. So all versions 
of X using the Type1 code are affected.

In X versions after XFree86 4.4 (may be already 4.3, I'm not sure) is to 
only use the "freetype" module to handle Type 1 fonts. This module 
doesn't use the vulnerable code to parse Type 1 fonts.

------- Comment #1 From Sune Kloppenborg Jeppesen 2006-08-29 12:22:15 0000 -------
Created an attachment (id=95407) [details]
libXfont.diff

------- Comment #2 From Wolf Giesen (RETIRED) 2006-09-05 07:06:45 0000 -------
x11 team, please advise - I have some problems understanding this one (x.org is
supposed to be vulnerable because it was forked at 4.3 and thus contains the
affected code?). Is there anything in queue upstream?

------- Comment #3 From Wolf Giesen (RETIRED) 2006-09-05 07:12:19 0000 -------
Forgot to assign, sorry.

------- Comment #4 From Wolf Giesen (RETIRED) 2006-09-05 07:25:29 0000 -------
Donnie, I'm not sure you're the right one to CC (since x11 can't read
restricted yet), but maybe you can help us here (or point me to somebody else)?
Thanks!

------- Comment #5 From Donnie Berkholz 2006-09-05 10:04:18 0000 -------
Cool, another libXfont vuln (bug #144092 remains open waiting for advisory).
Upstream bugs are https://bugs.freedesktop.org/show_bug.cgi?id=8000 and
https://bugs.freedesktop.org/show_bug.cgi?id=8001 (both are security-restricted
so you can't access them).

All X versions should be vulnerable. The point at the end of comment #0 is that
only CID fonts will cause the problem because they still use the Type1/ code,
but typical Type 1 fonts use the FreeType parser.

------- Comment #6 From Wolf Giesen (RETIRED) 2006-09-05 10:11:50 0000 -------
Ok, thank you. So we wait for upstream. Do you have the exact embargo time,
Donnie?

------- Comment #7 From Donnie Berkholz 2006-09-05 10:14:17 0000 -------
Latest info on the bugs indicates no date set yet, but I'm not privy to
discussions on the security mail alias.

------- Comment #8 From Donnie Berkholz 2006-09-05 10:19:41 0000 -------
Created an attachment (id=96088) [details]
libXfont-1.2.0-r2.ebuild

Here's an ebuild to test. Rename libXfont.diff to 1.2.0-cid-overflows.patch and
drop it in files/.

------- Comment #9 From Donnie Berkholz 2006-09-05 10:21:45 0000 -------
Created an attachment (id=96089) [details]
libXfont-1.2.0-r2.ebuild

Woops, that one was broken. Try this instead

------- Comment #10 From Wolf Giesen (RETIRED) 2006-09-05 13:42:00 0000 -------
I think I can try in the morning ... x86 only, I'm afraid, since my Alphas lag
waay behind :P

An exploit to check would be nice, though :)

------- Comment #11 From Wolf Giesen (RETIRED) 2006-09-06 23:42:42 0000 -------
Since we seem to have all we need, humbly asking sec liaisons to test and
report.

------- Comment #12 From Markus Rothe 2006-09-06 23:57:10 0000 -------
looks good on ppc64. it's ok to have this marked stable on ppc64 while
commiting to the tree.

------- Comment #13 From Wolf Giesen (RETIRED) 2006-09-07 00:00:45 0000 -------
Corsair, please don't commit yet, this is a prestabling request; thanks!

------- Comment #14 From Donnie Berkholz 2006-09-07 00:08:49 0000 -------
Created an attachment (id=96254) [details]
1.2.0-cid-overflows.patch

Updated patch, changes includes around a bit. Reportedly fixes a compilation
issue in module subdir.

------- Comment #15 From Markus Rothe 2006-09-07 00:11:32 0000 -------
What I meant was: When you commit then it would be ok for me to commit this
streight to stable on ppc64 ^^

------- Comment #16 From Thomas Cort (RETIRED) 2006-09-07 04:00:53 0000 -------
Created an attachment (id=96271) [details]
1.2.0-cid-overflows.patch-6447.out

96254: 1.2.0-cid-overflows.patch doesn't work.

------- Comment #17 From Donnie Berkholz 2006-09-07 09:37:32 0000 -------
Created an attachment (id=96288) [details]
1.2.0-cid-overflows.patch

Hrm. not sure how that happened... that was the diff between the two patches.
Anyhow here's the right one.

------- Comment #18 From Thomas Cort (RETIRED) 2006-09-07 10:31:09 0000 -------
Created an attachment (id=96295) [details]
1.2.0-cid-overflows.patch

Attachment #96288 [details] (1.2.0-cid-overflows.patch) fails with "No file to patch"
because the paths in the patch begin with "lib/font" instead of
"libXfont-1.2.0/src".

The attached patch is the same as Attachment #96288 [details], but it replaces "lib/font"
with "libXfont-1.2.0/src".

------- Comment #19 From Thomas Cort (RETIRED) 2006-09-07 11:20:58 0000 -------
looks good on amd64.

------- Comment #20 From Joshua Jackson 2006-09-07 11:59:55 0000 -------
Appears to work correctly on x86 as well, so it can be marked when everyone
else is

------- Comment #21 From Gustavo Zacarias (RETIRED) 2006-09-07 12:52:36 0000 -------
sparc looks fine.

------- Comment #22 From Tobias Scherbaum 2006-09-07 23:20:55 0000 -------
looks good on ppc

------- Comment #23 From René Nussbaumer 2006-09-08 13:02:12 0000 -------
looks good on hppa

------- Comment #24 From Wolf Giesen (RETIRED) 2006-09-11 06:00:38 0000 -------
Embargo time ends tomorrow. To be able to get it out we need word from 

- alpha
- ppc64 (just say you're okay with the latest patch, too :-)

------- Comment #25 From Markus Rothe 2006-09-11 07:04:04 0000 -------
yes, latest patch okay on ppc64, too.

------- Comment #26 From Thomas Cort (RETIRED) 2006-09-11 07:39:45 0000 -------
(In reply to comment #24)
> Embargo time ends tomorrow. To be able to get it out we need word from 
> 
> - alpha

Tested (with kloeri's permission) on alpha. Looks good on alpha.

------- Comment #27 From Wolf Giesen (RETIRED) 2006-09-12 02:22:00 0000 -------
That's all arches. No CVE yet?

Jaervosz (Donnie?), if you're sure about the embargo date, we could proceed
with GLSA.

------- Comment #28 From Donnie Berkholz 2006-09-12 10:49:45 0000 -------
I don't know anything further about embargo dates, there's nothing on the bugs
so discussion must have taken place on lists.

------- Comment #29 From Sune Kloppenborg Jeppesen 2006-09-12 10:56:39 0000 -------
The date was apparently chosen by the upstream Xorg Team and the initial report
from iDEFENSE. 

So I guess the first public spot for this is:
http://www.idefense.com/intelligence/vulnerabilities/

------- Comment #30 From Donnie Berkholz 2006-09-12 11:03:08 0000 -------
Upstream released, I'll bump in the tree.

Here's the advisory:

X.Org Security Advisory, September 12, 2006
Integer overflows in handling CID encoded Type1 fonts
CVE-ID: 2006-3739, 2006-3740

Overview

It may be possible for a user with the ability to set the X server
font path, by making it point to a malicious font, to cause
arbitrary code execution or denial of service on the X server.

Vulnerability details

The lack of validation of input data while parsing CID encoded Type1
fonts in the "type1" module may cause some integer overflows while
computing the size of allocated data buffers when parsing a
font. Arbitrary code embedded in the malicious font can then be
executed by the X server.

To exploit these vulnerabilities, the ability to connect to the X server
in order to execute 'xset fp+' or the equivalent is required.

CVE-ID 2006-3740 describes a vulnerability in the scan_cidfont()
function in Type1/scanfont.c, while CVE ID 2006-3739 describes similar
problems in the CIDADM() function in Type1/afm.c.

Affected versions

All X servers using the "type1" font module with CID font support are
vulnerable to this issue. This includes all X.Org versions from 6.7.0
to 7.1 inclusive. Older versions are not supported by X.Org.

Workaround

If no CID-encoded Type 1 fonts are used, the "type1" module can be
disabled and replaced by the "freetype" module in /etc/X11/xorg.conf.
The freetype module is able to use Type1 fonts with standard (non CID)
encoding as well as True Type fonts.

Also, systems with memory address space randomization are less likely
to be successfully compromised, as the most effective way to exploit
these vulnerabilities rely on fixed address space.

Fix

These issues have been fixed in libXfont 1.2.1

------- Comment #31 From Sune Kloppenborg Jeppesen 2006-09-12 11:06:56 0000 -------
I was wrong. First one appears to be here:

https://issues.rpath.com/browse/RPL-614

Donnie just go ahead and commit the updates.

------- Comment #32 From Raphael Marichez 2006-09-12 11:56:30 0000 -------
mmm, and what about xorg 6.8 ?

------- Comment #33 From Raphael Marichez 2006-09-12 12:39:17 0000 -------
rerating since it's local root flaw.

------- Comment #34 From Donnie Berkholz 2006-09-12 13:05:49 0000 -------
(In reply to comment #32)
> mmm, and what about xorg 6.8 ?

http://archives.gentoo.org/gentoo-dev/msg_91800.xml

------- Comment #35 From Donnie Berkholz 2006-09-12 13:17:23 0000 -------
libXfont is in the tree and stabled on all tested architectures. Should be good
to GLSA whenever.

------- Comment #36 From Donnie Berkholz 2006-09-12 13:17:54 0000 -------
Sorry, forgot to specify version -- >=1.2.2 is safe.

------- Comment #37 From Sune Kloppenborg Jeppesen 2006-09-12 21:07:02 0000 -------
Thx for the version note Donnie!

Security please review draft a second time.

------- Comment #38 From Matthias Geerdsen 2006-09-13 02:21:51 0000 -------
Since the monolithic build is not supported anymore according to the -dev
announce mail, I think it should either be masked or marked unstable to make
that clear, to comply with policy and to make it clearer to users who don't
look for such announcements.

------- Comment #39 From Donnie Berkholz 2006-09-13 10:26:19 0000 -------
(In reply to comment #38)
> Since the monolithic build is not supported anymore according to the -dev
> announce mail, I think it should either be masked or marked unstable to make
> that clear, to comply with policy and to make it clearer to users who don't
> look for such announcements.

Sure, I'll mask it. I already added a USE flag to make it clear. Please take
further discussion on this somewhere other than this bug.

------- Comment #40 From Wolf Giesen (RETIRED) 2006-09-13 10:55:39 0000 -------
Hm, this has left the building as GLSA 200609-07 ...

Thanks everybody.

------- Comment #41 From genbug@piments.com 2006-09-14 08:03:40 0000 -------
It would be very helpful to add this stop-gap measure to the glsa announcement
from iDefence:

>>
V. WORKAROUND

Access to the vulnerable code can be prevented by removing the entry 
for the Type1 font module from your Xservers configuration file, often
stored in /etc/X11 and named xorg.conf or XF86Config-4. To do this, 
remove the following line from the 'Module' section:

Load "type1"

This will prevent Type 1 fonts from loading, which may affect the 
appearance or operation of some applications.
>>


This would at least let users stop the immediate threat whilst attacking the
task of upgrading to modular X. A less than trivial job that will very likely
require network access for howtos pkg etc and some fair ammount of time and
effort. 

During this process the exploit would remain a serious vulnerability.

------- Comment #42 From Wolf Giesen (RETIRED) 2006-09-14 08:11:49 0000 -------
Sound argument. SecTeam, silent update?

------- Comment #43 From Sune Kloppenborg Jeppesen 2006-09-14 08:28:09 0000 -------
I fail to see why we should update, we already have the following in the
Workaround section:

Disable CID-encoded Type 1 fonts by removing the "type1" module and replacing
it with the "freetype" module in xorg.conf.

------- Comment #44 From Wolf Giesen (RETIRED) 2006-09-14 08:42:13 0000 -------
*cough*

Poked my own eyes too much, probably ^^

------- Comment #45 From Wolf Giesen (RETIRED) 2006-09-28 09:08:59 0000 -------
closed

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug