buffer overflow Security fix

Bug #22372 reported by Hubert Figuiere
16
Affects Status Importance Assigned to Milestone
abiword (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Attached to this bug is a patch to fix a security flow in AbiWord 2.2.9 that
allow execution of arbitrary code.

Please apply to breezy and any other release whose security fixed are released.

Patch is already in upstream CVS and will be part of 2.2.10

current 2.3.99 is not affected by the bug.

Thanks

CVE References

Revision history for this message
Hubert Figuiere (hub) wrote :

Created an attachment (id=4025)
patch to fix the buffer overflow

Security fix to apply

Revision history for this message
Hubert Figuiere (hub) wrote :

Created an attachment (id=4026)
sample for the security issue

load the file in AbiWord, it will crash and clobber the stack... 0x41414141 in
the stack trace show it.
a valgrind run will complain too.

after applying the above patch, the AbiWord no longer crash and will even
import the file.

Revision history for this message
Hubert Figuiere (hub) wrote :

problem reported by "Chris Evans" from the vendor-sec list

Revision history for this message
Adam Conrad (adconrad) wrote :

Martin: Abiword is in universe (just noticed this after all the bug wrangling),
but it's also probably fairly commonly-used, so if you don't have the spare time
to whip up an update for this, I'll probably do so on Monday. Just let me know.

Revision history for this message
Adam Conrad (adconrad) wrote :

Scratch that, the source is in main, I'm asleep at the wheel.

Revision history for this message
Matt Zimmerman (mdz) wrote :

The source and abiword-gnome are in main

Revision history for this message
Martin Pitt (pitti) wrote :

We discussed that on vendor-sec, but it blew off to the public now. OK, the
patch is easy. I already asked on vendor-sec: What should this change be good for?

- keyword[count++] = ch;
+ keyword[count] = ch;
+ count++;

these look perfectly equivalent to me.

Revision history for this message
Hubert Figuiere (hub) wrote :

sorry. this is useless for the security fix. it is part of my eternal "I hate C
permissive code style" rant.

Revision history for this message
Martin Pitt (pitti) wrote :

for the record, patch is still discussed on vendor-sec; it converts the crash to
an eternal hang in a futex, which solves the security problem, but can certainly
be enhanced a bit further.

Revision history for this message
Martin Pitt (pitti) wrote :

 abiword (2.2.9-1ubuntu2) breezy; urgency=low
 .
   * SECURITY UPDATE: Fix arbitrary code execution with crafted RTF documents.
   * Add debian/patches/18_rtf_check_keyword_len.dpatch:
     - Limit the size of RTF identifiers to avoid overflowing a static buffer.
   * References:
     CAN-2005-2964
     Ubuntu #16165

warty and hoary are pending

Revision history for this message
Martin Pitt (pitti) wrote :

stables fixed in USN-188-1.

Revision history for this message
Hubert Figuiere (hub) wrote :

*** Bug 22808 has been marked as a duplicate of this bug. ***

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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