denial of service in wesnoth client and server prior 1.2.7 release

Bug #158414 reported by Emilio Pozuelo Monfort
256
Affects Status Importance Assigned to Milestone
wesnoth (Ubuntu)
Fix Released
High
Emilio Pozuelo Monfort
Dapper
Fix Released
Low
Stephan Rügamer
Edgy
Fix Released
Low
Stephan Rügamer
Feisty
Fix Released
Low
Unassigned
Gutsy
Fix Released
Low
Kees Cook

Bug Description

Binary package hint: wesnoth

The multiplayer engine in Wesnoth before 1.2.7 allows remote servers to cause a denial of service (crash) via a long message with multibyte characters that can produce an invalid UTF-8 string after it is truncated, which triggers an uncaught exception, involving the truncate_message function in server/server.cpp.

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

I'm working on this.

Changed in wesnoth:
assignee: nobody → pochu
importance: Undecided → High
status: New → In Progress
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

For Hardy, Andrea Gasparini has merged wesnoth from Debian, and Debian has the fix for this: bug 156436.

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

Attached patch for dapper. It builds fine, but I haven't tested it (I don't have a dapper installation...)

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :
Revision history for this message
Kees Cook (kees) wrote :

Thanks for getting these prep'd. Which have been tested? The changes are not entirely trivial, so I'd just like to make sure it still all works.

Changed in wesnoth:
assignee: nobody → keescook
importance: Undecided → Low
status: New → In Progress
assignee: nobody → keescook
importance: Undecided → Low
status: New → In Progress
assignee: nobody → keescook
importance: Undecided → Low
status: New → In Progress
assignee: nobody → keescook
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

Hi Kees.

I've tested the Gutsy ones, and they work fine. However, I haven't been able to crash it with the unpatched version (I'm not probably doing the right thing).

I could also test the feisty ones, if needed.

Revision history for this message
Kees Cook (kees) wrote :

Thanks, I've pushing the Gutsy revision into the security queue. I don't like publishing security updates without testing the results, so if you want to get Feisty out too, just let me know if it works well there. :)

Changed in wesnoth:
status: In Progress → Fix Committed
assignee: keescook → nobody
status: In Progress → Triaged
assignee: keescook → nobody
status: In Progress → Triaged
assignee: keescook → nobody
status: In Progress → Triaged
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

Hardy already has a fix

Changed in wesnoth:
status: In Progress → Fix Released
Revision history for this message
ubuntu_demon (ubuntu-demon) wrote :

The changelog of the gutsy wesnoth packages don't show this fix (I have checked wesnoth,wesnoth-all,wesnoth-server) :

wesnoth (1.2.6-1ubuntu2) gutsy; urgency=low

  * debian/rules:
    - Build with --enable-dummy-locales.
  * debian/wesnoth-data.install:
    - Install the locales (LP: #113361).

 -- Emilio Pozuelo Monfort <email address hidden> Fri, 14 Sep 2007 23:45:25 +0200

Revision history for this message
ubuntu_demon (ubuntu-demon) wrote :

Gutsy doesn't have this fix yet. wesnoth is at version 1.2.6-1ubuntu2 (Fri, 14 Sep 2007 23:45:25 +0200)

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

wesnoth (1.2.6-1ubuntu2.1) gutsy-security; urgency=low

  * SECURITY UPDATE: Fix insecure truncate of a multibyte chat message that
    can lead to invalid utf-8 and throw an uncaught exception. Both wesnoth
    client and server are affected.
  * debian/patches/CVE-2007-3917: added, taken from Debian.
  * References:
    CVE-2007-3917.
    LP: #158414.

 -- Emilio Pozuelo Monfort <email address hidden> Mon, 29 Oct 2007 21:19:33 +0100

Changed in wesnoth:
status: Fix Committed → Fix Released
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

It's already built, as you can see in https://launchpad.net/ubuntu/+source/wesnoth/1.2.6-1ubuntu2.1

Should be in the archive soon (maybe an hour?). If not, reopen it.

Cheers

Revision history for this message
ubuntu_demon (ubuntu-demon) wrote :

Never mind. It arrived last night (my time). I thought security updates would arrive within a day after reading "fix committed".

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

wesnoth (1.2.3-0ubuntu1.1) feisty-security; urgency=low

  * SECURITY UPDATE: Fix insecure truncate of a multibyte chat message that
    can lead to invalid utf-8 and throw an uncaught exception. Both wesnoth
    client and server are affected.
  * debian/patches/CVE-2007-3917: added, taken from Debian.
  * References: CVE-2007-3917.
    LP: #158414.

  * SECURITY UPDATE: Do not allow '../' in file paths. It allowed others
    to view the content of files in the remote computers.
  * debian/patches/CVE-2007-5742: added, taken from upstream SVN r21904.
  * References:
    CVE-2007-5742.
    LP: #172783.

 -- Emilio Pozuelo Monfort <email address hidden> Sun, 02 Dec 2007 22:07:37 +0100

Changed in wesnoth:
status: Triaged → Fix Released
Changed in wesnoth:
assignee: nobody → shermann
status: Triaged → In Progress
assignee: nobody → shermann
status: Triaged → In Progress
Changed in wesnoth:
status: In Progress → Fix Released
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

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