Bug 232172 - dev-libs/libxslt >= 1.1.8 <= 1.1.24 heap overflow (CVE-2008-2935)
Bug#: 232172 (CVE-2008-2935) Product:  Gentoo Security Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: major Priority: P2
Resolution: FIXED Assigned To: security@gentoo.org Reported By: vorlon@gentoo.org
Component: Vulnerabilities
URL:  http://ocert.org/advisories/ocert-2008-009.html
Summary: dev-libs/libxslt >= 1.1.8 <= 1.1.24 heap overflow (CVE-2008-2935)
Keywords:  
Status Whiteboard: A2 [glsa]
Opened: 2008-07-18 09:36 0000
Description:   Opened: 2008-07-18 09:36 0000
** Please note that this issue is confidential at the moment and no information
should be disclosed until it is made public **

oCERT reports the following, crediting Chris Evans from the Google Security
Team

Description:

The libexslt library bundled with libxslt is affected by a heap-based buffer
overflow which can lead to arbitrary code execution.

The vulnerability is present in the rc4 encryption/decryption functions. An
arbitrary length string, passed as an argument in the XSL input, is incorrectly
copied over a padding variable which is previously allocated with a fixed size
of 128bit (RC4_KEY_LENGTH).

Aside from the heap overflow other bugs affect the code, the length of the
plaintext string argument is used for computing the key length rather than the
actual key and the zero-padding of the key is incorrectly computed.

A simple XML file with excessively long input can be crafted for triggering the
heap overflow.

Affected version:

libxslt >= 1.18, <= 1.1.24


--------
adding eva and dang for the gnome herd, solar for infra as they might be
interested in this

------- Comment #1 From Matthias Geerdsen 2008-07-18 09:38:23 0000 -------
Created an attachment (id=160702) [details]
patch for CVE-2008-2935

------- Comment #2 From Matthias Geerdsen 2008-07-18 12:39:32 0000 -------
(In reply to comment #0)

> libxslt >= 1.18, <= 1.1.24
this should be >= 1.1.8, <= 1.1.24

dang/eva could you prepare an ebuild with the patch and attach it here, so arch
security liaisons can test it

------- Comment #3 From Daniel Gryniewicz 2008-07-18 12:42:27 0000 -------
Created an attachment (id=160719) [details]
Ebuild applying patch

The patch looks correct; that said, there have to have been a lot of
circumstances when it just didn't work before.  That made me curious.  As far
as the sources on my box and google knows, nothing uses those functions at all.
 Maybe they're used indirectly in some way I can't find?

Anyway, I'm attaching an ebuild that applies that patch (renamed to
${P}-exslt_crypt.patch) so it can be tested.

------- Comment #4 From Matthias Geerdsen 2008-07-18 13:15:25 0000 -------
Arch Security Liaisons, please test the attached ebuild and report it stable on
this bug.
Target keywords : "alpha amd64 arm hppa ia64 m68k ppc ppc64 s390 sh sparc x86"

CC'ing current Liaisons:
   alpha : yoswink
   amd64 : welp
    hppa : jer
     ppc : dertobi123
   ppc64 : corsair
   sparc : fmccor
     x86 : opfer

----
dang, probably used indirectly by including the relevant extension
(http://exslt.org/howto.html)

------- Comment #5 From Robert Buchholz 2008-07-18 15:31:09 0000 -------
Created an attachment (id=160731) [details]
libxslt-1.1.24-r1.tar.gz

If it helps anyone, here's the overlay incorporating all files.

------- Comment #6 From Robert Buchholz 2008-07-18 15:31:48 0000 -------
Arch Security Liaisons, please test the attached ebuild and report it stable on
this bug.
Target keywords : "alpha amd64 arm hppa ia64 m68k ppc ppc64 s390 sh sparc x86"

CC'ing current Liaisons:
   alpha : yoswink
   amd64 : welp
    hppa : jer
     ppc : dertobi123
   ppc64 : corsair
   sparc : fmccor
     x86 : opfer

------- Comment #7 From Jeroen Roovers 2008-07-18 16:52:00 0000 -------
HPPA is OK.

------- Comment #8 From Ferris McCormick 2008-07-18 17:40:33 0000 -------
libxslt-1.1.24-r1 looks good on sparc (tests run OK).

------- Comment #9 From Raúl Porcel 2008-07-18 18:45:53 0000 -------
Looks good on alpha/ia64/x86

------- Comment #10 From Markus Rothe 2008-07-19 06:34:37 0000 -------
looks good on ppc64

------- Comment #11 From Peter Weller 2008-07-22 23:50:02 0000 -------
Looks good on amd64 too :D

------- Comment #12 From Tobias Scherbaum 2008-07-30 16:41:16 0000 -------
a bit late, but looks also good on ppc

------- Comment #13 From Robert Buchholz 2008-07-30 17:03:32 0000 -------
GNOME team, this will go public tomorrow at 15:00 UTC (17:00 CEST), please
commit after that with the stable keywords gathered in this bug.

------- Comment #14 From Gilles Dartiguelongue 2008-07-31 20:48:40 0000 -------
ebuild commited.

------- Comment #15 From Robert Buchholz 2008-07-31 23:37:42 0000 -------
Arches, please test and mark stable:
=dev-libs/libxslt-1.1.24-r1
Target keywords : "alpha amd64 arm hppa ia64 m68k ppc ppc64 s390 sh sparc x86"
Already stabled : "alpha amd64 hppa ia64 ppc ppc64 sparc x86"
Missing keywords: "arm m68k s390 sh"

------- Comment #16 From Tobias Heinlein 2008-08-07 12:59:16 0000 -------
GLSA 200808-06