lighttpd (security) ssl fix

Bug #209627 reported by stiV
290
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lighttpd (Gentoo Linux)
Fix Released
Low
lighttpd (Ubuntu)
Fix Released
Medium
Emanuele Gentili
Dapper
Won't Fix
Low
Unassigned
Edgy
Fix Released
Medium
Emanuele Gentili
Feisty
Fix Released
Medium
Emanuele Gentili
Gutsy
Fix Released
Medium
Emanuele Gentili
Hardy
Fix Released
Medium
Emanuele Gentili

Bug Description

Binary package hint: lighttpd

as of yesterday the lighttpd could have gotten rid of a very nasty bug which causes SSL sessions to terminate and produce errors ...
see http://trac.lighttpd.net/trac/ticket/285 for more information

They made the fix available for older versions too, so backporting should not be a problem

Revision history for this message
In , hoffie (hoffie-gentoo-bugs) wrote :

lighttpd-1.4.19 and earlier contain a bug which can be exploited by a malicious user to forcefully close foreign SSL connections.
To exploit this, the server has to have SSL support enabled and the attacker has to trigger an SSL error on his own connection (connecting and disconnecting before the download has finished is enough).

Original ticket: http://trac.lighttpd.net/trac/ticket/285#comment:19
Fix: http://trac.lighttpd.net/trac/changeset/2136

lighttpd-1.4.19 was supposed to fix the problem, but the fix did not work as expected, so it is still vulnerable.

The damage, which can be caused by this bug is rather low, I'd say: Firstly, users can simply reconnect after their connection has been killed, and secondly, it is hard for an attacker to meet the exact point of time to crash a user's connection, it is mostly a problem when there are longer-pending connections such as downloads or keepalive.

Revision history for this message
In , bangert (bangert-gentoo-bugs) wrote :

1.4.19-r1 is in the tree

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

Arches, please test and mark stable:
=www-servers/lighttpd-1.4.19-r1
Target keywords : "alpha amd64 arm hppa ia64 ppc ppc64 release sh sparc x86"

Revision history for this message
In , maekke (maekke-gentoo-bugs) wrote :

amd64/x86 stable

Revision history for this message
In , hoffie (hoffie-gentoo-bugs) wrote :

I fail, sorry.

The fix does not seem completely right again... it makes lighty enter some kind of infinite loop in case of SSL errors, printing lots of SSL error messages and consuming lots of CPU.

Working on it.
Drop stable again? p.mask?

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

amd64, x86, please read above.

Revision history for this message
In , maekke (maekke-gentoo-bugs) wrote :

amd64/x86 unstable :)

Revision history for this message
In , hoffie (hoffie-gentoo-bugs) wrote :

bangert, I commented on the upstream ticket [1] with a possible new patch against 1.4.19 [2]. It works fine for me, but I'd rather have the OK from a lighty dev (they've been very responsive today, so I think we should get one pretty soon).

Sorry again for all the confusion and b0rkage. :(

[1] http://trac.lighttpd.net/trac/ticket/285#comment:21
[2] http://trac.lighttpd.net/trac/attachment/ticket/285/06_all_lighttpd-1.4.19-closing_foreign_ssl_connections-dos.diff

Revision history for this message
In , bertrand (bertrand-gentoo-bugs) wrote :

http://trac.lighttpd.net/trac/ticket/1601 should be taken in account too :)

Revision history for this message
In , hoffie (hoffie-gentoo-bugs) wrote :

Bertrand, thanks for the pointer, I saw that one already and I don't think it should be considered a vulnerability. It's a bug that lighty does not handle this situation more gracefully, but I don't see how an attacker could gain something by "exploiting" this bug.
After setting up lighty or making config changes, one will immediately (after trying to send a request) see that the new config is wrong (as lighty crashes).
Or... expressed differently: No working site will have such a config and as such nobody can exploit it.
At least that's my interpretation. =)

Revision history for this message
In , bertrand (bertrand-gentoo-bugs) wrote :

You're right, I didn't see the "only security" point. My fault.

Revision history for this message
In , lars (lars-gentoo-bugs) wrote :

please add "CVE-CVE-2008-1531"

Revision history for this message
In , hoffie (hoffie-gentoo-bugs) wrote :

New patch from upstream [1], see the relevant ticket [2]. I created a diff against 1.4.19 [3] which is what we'll probably need. :)
Hopefully I tested it well enough this time. :p

[1] http://trac.lighttpd.net/trac/changeset/2139
[2] http://trac.lighttpd.net/trac/ticket/285#comment:26
[3] http://trac.lighttpd.net/trac/attachment/ticket/285/committed-patch-1.4.19.patch

Revision history for this message
In , joeuser (joeuser-gentoo-bugs) wrote :
Download full text (4.0 KiB)

(In reply to comment #7)
> [2] http://trac.lighttpd.net/trac/attachment/ticket/285/06_all_lighttpd-1.4.19-closing_foreign_ssl_connections-dos.diff

That patch flooded my error.log with gigs of following errmsg bringing my server to start swapping and stopping to respond:
2008-03-30 20:39:10: (connections.c.1684) SSL: 5 error:00000000:lib(0):func(0):reason(0)

devnull ~ # emerge -pv lighttpd

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] www-servers/lighttpd-1.4.19-r1 USE="bzip2 fam fastcgi gdbm pcre ssl xattr -doc -ipv6 -ldap -lua -memcache -minimal -mysql -php -rrdtool -test -webdav" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
devnull ~ # emerge --info
Portage 2.1.4.4 (hardened/x86/2.6, gcc-3.4.6, glibc-2.7-r2, 2.6.23-hardened-r9 i686)
=================================================================
System uname: 2.6.23-hardened-r9 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5600+
Timestamp of tree: Sat, 29 Mar 2008 20:00:04 +0000
app-shells/bash: 3.2_p33
dev-lang/python: 2.5.1-r5
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox: 1.2.18.1-r2
sys-devel/autoconf: 2.13, 2.61-r1
sys-devel/automake: 1.7.9-r1, 1.10.1
sys-devel/binutils: 2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.24
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=k8 -fomit-frame-pointer -fforce-addr"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=k8 -fomit-frame-pointer -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.mesh-solutions.com/gentoo ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo http://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 caps cgi cli crypt expat fam fastcgi ftp gd gdbm glibc-omitfp gmp hardened hash iconv idn imap ithreads jpeg libwww logrotate md5sum mhash mime mmap mysql mysqli ncurses nls nocxx nptl nptlonly pam pcre perl pic png posix python readline sasl sharedmem sockets sse2 ssl symlink sysfs tcl tcpd threads tiff truetype ucs2 udev unicode urandom x86 xattr xml xmlrpc xsl zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfl...

Read more...

Revision history for this message
In , hoffie (hoffie-gentoo-bugs) wrote :

I'm not sure if I undestood you correctly -- are you using lighttpd-1.4.19-r1 from the tree, as indicated by the emerge -pv output? Then this is expected, as I already noted. Someone should commit -r2 with the new patch, as noted by me in comment #12.
bangert, I can do it if you want me to, but I'll leave for holidays in some hours, so... ;)

Revision history for this message
In , bangert (bangert-gentoo-bugs) wrote :

hoffie: feel free to do any bumps on lighttpd. as the metadata indicates, i'm not considering myself the/a maintainer for lighttpd - i just do bumps as necessary / my time permits. anybody is more than welcome to have his take at the ebuild (especially in situations like these).

1.4.19-r2 is in the tree. as i didnt test ssl, please do so!

Revision history for this message
stiV (stefan-wehinger) wrote :
Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

Joe, can you please confirm which patch you used and retry with the committed -r2? Really appreciated.

Revision history for this message
In , joeuser (joeuser-gentoo-bugs) wrote :

Yes i used 1.4.19-r1, with the new 1.4.19-r2 its fine for me.

Thanks.

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

Thanks for clearing that up.

Arches, please test and mark stable:
=www-servers/lighttpd-1.4.19-r2
Target keywords : "alpha amd64 arm hppa ia64 ppc ppc64 release sh sparc x86"

Revision history for this message
In , jer (jer-gentoo-bugs) wrote :

Stable for HPPA.

Revision history for this message
In , armin76 (armin76-gentoo-bugs) wrote :

alpha/ia64/sparc stable

Revision history for this message
In , corsair (corsair-gentoo-bugs) wrote :

ppc64 stable

Revision history for this message
In , maekke (maekke-gentoo-bugs) wrote :

amd64/x86 stable

Revision history for this message
In , dertobi123 (dertobi123-gentoo-bugs) wrote :

ppc stable

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

GLSA vote: YES.

Revision history for this message
In , pva (pva-gentoo-bugs) wrote :

Fixed in release snapshot.

Changed in lighttpd:
assignee: nobody → emgent
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Emanuele Gentili (emgent) wrote :
Changed in lighttpd:
status: Unknown → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lighttpd - 1.4.19-0ubuntu3

---------------
lighttpd (1.4.19-0ubuntu3) hardy; urgency=low

  * SECURITY UPDATE: (LP: #209627)
   + debian/patches/92_CVE-2008-1531.dpatch
    - lighttpd 1.4.19 and earlier allows remote attackers to cause a denial
      of service (active SSL connection loss) by triggering an SSL error,
      such as disconnecting before a download has finished, which causes
      all active SSL connections to be lost.
  * References
   + http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-1531
   + http://trac.lighttpd.net/trac/changeset/2136
   + http://trac.lighttpd.net/trac/changeset/2139

 -- Emanuele Gentili <email address hidden> Sun, 06 Apr 2008 00:09:12 +0200

Changed in lighttpd:
status: In Progress → Fix Released
Changed in lighttpd:
assignee: nobody → emgent
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Emanuele Gentili (emgent) wrote :
Revision history for this message
Emanuele Gentili (emgent) wrote :
Changed in lighttpd:
assignee: nobody → emgent
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Emanuele Gentili (emgent) wrote :
Changed in lighttpd:
assignee: nobody → emgent
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
In , mjf (mjf-gentoo-bugs) wrote :

I vote YES. GLSA request filed.

Revision history for this message
In , keytoaster (keytoaster-gentoo-bugs) wrote :

GLSA 200804-08

Changed in lighttpd:
status: In Progress → Fix Released
Changed in lighttpd:
status: In Progress → Fix Committed
status: In Progress → Fix Committed
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lighttpd - 1.4.18-1ubuntu1.4

---------------
lighttpd (1.4.18-1ubuntu1.4) gutsy-security; urgency=low

  * SECURITY UPDATE: (LP: #209627)
   + debian/patches/91_CVE-2008-1531.dpatch
    - lighttpd 1.4.19 and earlier allows remote attackers to cause a denial
      of service (active SSL connection loss) by triggering an SSL error,
      such as disconnecting before a download has finished, which causes
      all active SSL connections to be lost.
  * References
   + http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-1531
   + http://trac.lighttpd.net/trac/changeset/2136
   + http://trac.lighttpd.net/trac/changeset/2139

 -- Emanuele Gentili <email address hidden> Sun, 06 Apr 2008 03:39:14 +0200

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lighttpd - 1.4.13-9ubuntu4.6

---------------
lighttpd (1.4.13-9ubuntu4.6) feisty-security; urgency=low

  * SECURITY UPDATE: (LP: #209627)
   + debian/patches/91_CVE-2008-1531.dpatch
    - lighttpd 1.4.19 and earlier allows remote attackers to cause a denial
      of service (active SSL connection loss) by triggering an SSL error,
      such as disconnecting before a download has finished, which causes
      all active SSL connections to be lost.
  * References
   + http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-1531
   + http://trac.lighttpd.net/trac/changeset/2136
   + http://trac.lighttpd.net/trac/changeset/2139

 -- Emanuele Gentili <email address hidden> Sun, 06 Apr 2008 23:55:30 +0200

Changed in lighttpd:
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Changed in lighttpd:
status: Fix Committed → Fix Released
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

lighttpd (1.4.13~r1370-1ubuntu1.7) edgy-security; urgency=low

  * SECURITY UPDATE: (LP: #209627)
   + debian/patches/91_CVE-2008-1531.dpatch
    - lighttpd 1.4.19 and earlier allows remote attackers to cause a denial
      of service (active SSL connection loss) by triggering an SSL error,
      such as disconnecting before a download has finished, which causes
      all active SSL connections to be lost.
  * References
   + http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-1531
   + http://trac.lighttpd.net/trac/changeset/2136
   + http://trac.lighttpd.net/trac/changeset/2139

 -- Emanuele Gentili < <email address hidden> (emgent: 10144)

Revision history for this message
Saivann Carignan (oxmosys) wrote :

Dapper is not supported anymore since July 2009, therefore I mark Dapper status to invalid.

Changed in lighttpd (Ubuntu Dapper):
status: New → Invalid
Revision history for this message
Artur Rona (ari-tczew) wrote :

Dapper server support is until June 2011, so it can be fixed.

Changed in lighttpd (Ubuntu Dapper):
status: Invalid → New
Revision history for this message
Artur Rona (ari-tczew) wrote :

End Of Life.

Changed in lighttpd (Ubuntu Dapper):
status: New → Invalid
Revision history for this message
Scott Kitterman (kitterman) wrote :

Artur, you were right the first time.

Changed in lighttpd (Ubuntu Dapper):
status: Invalid → New
Artur Rona (ari-tczew)
Changed in lighttpd (Ubuntu Dapper):
assignee: nobody → Artur Rona (ari-tczew)
status: New → In Progress
Artur Rona (ari-tczew)
Changed in lighttpd (Ubuntu Dapper):
assignee: Artur Rona (ari-tczew) → nobody
Gursimran singh (simar)
Changed in lighttpd (Ubuntu Dapper):
assignee: nobody → Gursimran singh Mohar (simar)
Gursimran singh (simar)
Changed in lighttpd (Ubuntu Dapper):
importance: Undecided → Low
Changed in lighttpd (Gentoo Linux):
importance: Unknown → Low
Gursimran singh (simar)
Changed in lighttpd (Ubuntu Dapper):
assignee: Gursimran singh (simar) → nobody
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

While this bug still affects Dapper, it seems clear that no one is fixing. Marking "Won't Fix" for now. Please reopen if you are interested in providing a debdiff for lighttpd on Dapper, and the Ubuntu Security team will process it. Thanks

Changed in lighttpd (Ubuntu Dapper):
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.