Bug 1610539 (CVE-2018-10921)
Summary: | CVE-2018-10921 ttembed: failure to check file bounds may lead to input file corruption | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Scott Gayou <sgayou> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED WONTFIX | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | unspecified | CC: | frenaud, nick, pvoborni, security-response-team |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: |
Certain input files may trigger an integer overflow in ttembed input file processing. This overflow could potentially lead to corruption of the input file due to a lack of checking return codes of fgetc/fputc function calls.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2019-06-10 10:34:35 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1611684, 1611685, 1611686 | ||
Bug Blocks: | 1608880, 1610916 |
Description
Scott Gayou
2018-07-31 21:17:17 UTC
Acknowledgments: Name: Scott Gayou (Red Hat) Unembargoed due to very low impact. Upstream notified. Created ttembed tracking bugs for this issue: Affects: fedora-all [bug 1611686] Upstream Issue: https://github.com/hisdeedsaredust/ttembed/issues/3 Note the following: unsigned long readbe32(FILE *f) { unsigned long v; v = fgetc(f) << 24; v |= fgetc(f) << 16; v |= fgetc(f) << 8; v |= fgetc(f); return v; } readbe32 should be checking for EOF. The application fails to verify that reads will succeed via ensuring minimum file-lengths. Instead, it blindly reads and fails to check that EOF is not returned. As such, large negative values are returned by readbe32. One obvious case occurs on line 49 where fstype is set to the output of readbe32. If no more bytes can be read from the file handle, readbe32 will return -1. A fseek on line 51 adds 8 to -1, which wraps around to an fseek of 7, which is valid. This later leads to incorrect writes and "corruption" of the input file. All usages of fgetc should be checked else file bounds should be verified before fseeks/fgetcs are called. |