Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 523258 - (CVE-2008-7224) CVE-2008-7224 elinks: entity_cache static array buffer overflow (off-by-one)
CVE-2008-7224 elinks: entity_cache static array buffer overflow (off-by-one)
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
http://bugs.debian.org/cgi-bin/bugrep...
impact=important,source=cve,reported=...
: Security
Depends On: 525695 525696 525697 525698 833894
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-14 11:48 EDT by Jan Lieskovsky
Modified: 2016-03-04 06:48 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-10-01 14:16:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Local copy of upstream CVE-2008-7224 patch. (2.36 KB, patch)
2009-09-14 11:55 EDT, Jan Lieskovsky
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Debian BTS 380347 None None None Never
Red Hat Product Errata RHSA-2009:1471 normal SHIPPED_LIVE Important: elinks security update 2009-10-01 13:26:23 EDT

  None (edit)
Description Jan Lieskovsky 2009-09-14 11:48:37 EDT
Common Vulnerabilities and Exposures assigned an identifier CVE-2008-7224 to
the following vulnerability:

Buffer overflow in entity_cache in ELinks before 0.11.4rc0 allows
remote attackers to cause a denial of service (crash) via a crafted
link.

References:
-----------
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-7224
http://linuxfromscratch.org/pipermail/elinks-users/2008-February/001604.html
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380347
http://osvdb.org/41949

Upstream patch:
---------------
git show 341d54151f69d087112e1514b928e3fcc1810194
Comment 1 Jan Lieskovsky 2009-09-14 11:50:22 EDT
This issue does NOT affect the version of the elinks package, as shipped
with Red Hat Enterprise Linux 3.

This issue affects the versions of the elinks package, as shipped
with Red Hat Enterprise Linux 4 and 5.
Comment 2 Jan Lieskovsky 2009-09-14 11:55:58 EDT
Created attachment 360964 [details]
Local copy of upstream CVE-2008-7224 patch.
Comment 3 Tomas Hoger 2009-09-25 05:46:20 EDT
This bugs cause overflow (off-by-one) of entity_cache array, as last+1 entry was first initialized before array's upper bound was checked.  Out-of-array write can only be triggered by 8-character entities (shorter may also cause writes to unintended places, but all within entity_cache array).

Following structure is written past the array end:

    396 struct entity_cache {
    397 	unsigned int hits;
    398 	int strlen;
    399 	int encoding;
    400 	unsigned char *result;
    401 	unsigned char str[20]; /* Suffice in any case. */
    402 };

Out of the members, attacker may control encoding (possible values are very limited though), first 8 chars of str[] and possibly hits (though elinks may crash before hits gets incremented to a desired value).

As entity_cache is static array, real impact is not easily predictable, as it depends what other static data are placed right behind the array and how those are used.  This may not be as easy to reproduce reliably as stack / heap overflow.  I'm able to get crash on RHEL5/i386 version, but not on RHEL4 version.
Comment 7 errata-xmlrpc 2009-10-01 13:26:27 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4
  Red Hat Enterprise Linux 5

Via RHSA-2009:1471 https://rhn.redhat.com/errata/RHSA-2009-1471.html

Note You need to log in before you can comment on or make changes to this bug.