CVE-2020-21682
Description
A global buffer overflow in fig2dev 3.2.7b's set_fill function in genge.c allows denial of service via a crafted XFig file.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A global buffer overflow in fig2dev 3.2.7b's set_fill function in genge.c allows denial of service via a crafted XFig file.
Vulnerability
A global buffer overflow exists in the set_fill component of genge.c in fig2dev version 3.2.7b. The vulnerability occurs at line 446 of genge.c when processing a specially crafted XFig file. The set_fill function is called during the conversion of an XFig file to GEn (GE) format. The overflow is triggered by an invalid color number, such as -16, which causes an out-of-bounds read on a global array. No special configuration beyond using the default command-line conversion is required.
Exploitation
An attacker can exploit this vulnerability by providing a malicious XFig file (with an invalid color number in the fill specification) to the fig2dev utility. The user must run fig2dev to convert the file (e.g., fig2dev -L ge). No authentication or elevated privileges are needed; the attack is local or remote if the user processes a file from an untrusted source. The bug is triggered during the set_fill call in genge_line (line 143) and subsequently in gendev_objects and main. The AddressSanitizer report confirms a global-buffer-overflow read of size 4 at address 0x0000009b325c.
Impact
Successful exploitation leads to a denial of service (DoS) due to a segmentation fault or crash. The impact is limited to availability; no information disclosure or remote code execution is described in the available references. The crash occurs during file processing, potentially aborting the conversion and affecting dependent workflows.
Mitigation
The fig2dev ticket #72 [1] indicates the issue was reported in December 2019 and closed in December 2020. A fix is likely included in a later version of fig2dev (e.g., 3.2.8 or later). Users should upgrade to the latest version of fig2dev. As a workaround, do not process untrusted XFig files. No KEV listing is known.
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
24- fig2dev/fig2devdescription
- osv-coords22 versionspkg:rpm/opensuse/transfig&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/transfig&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/transfig&distro=openSUSE%20Tumbleweedpkg:rpm/suse/transfig&distro=HPE%20Helion%20OpenStack%208pkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Point%20of%20Sale%2011%20SP3pkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4-LTSSpkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSSpkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2015%20SP2pkg:rpm/suse/transfig&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2015%20SP3pkg:rpm/suse/transfig&distro=SUSE%20OpenStack%20Cloud%208pkg:rpm/suse/transfig&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/transfig&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/transfig&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209pkg:rpm/suse/transfig&distro=SUSE%20Package%20Hub%2015%20SP2pkg:rpm/suse/transfig&distro=SUSE%20Package%20Hub%2015%20SP3
< 3.2.8b-lp152.6.9.1+ 21 more
- (no CPE)range: < 3.2.8b-lp152.6.9.1
- (no CPE)range: < 3.2.8b-bp153.3.6.3
- (no CPE)range: < 3.2.8a-5.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-1.160.13.1
- (no CPE)range: < 3.2.8a-1.160.13.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8b-4.15.1
- (no CPE)range: < 3.2.8b-4.15.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8a-2.17.1
- (no CPE)range: < 3.2.8b-bp152.3.6.2
- (no CPE)range: < 3.2.8b-bp153.3.6.3
Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"Missing bounds check on color number index in `set_fill` allows out-of-bounds read on the global `GE_COLORS` array."
Attack vector
An attacker provides a crafted Xfig file containing an invalid color number (e.g., -16) at line 33 [ref_id=1]. When fig2dev converts this file to GE format, the `set_fill` function uses the invalid color number as an index into the global `GE_COLORS` array without bounds checking, causing a global-buffer-overflow read of 4 bytes 4 bytes to the left of `GE_COLORS` [ref_id=1]. The precondition is that the attacker can supply a malicious `.fig` file to the fig2dev converter.
Affected code
The vulnerable function is `set_fill` in `genge.c` at line 446, called from `genge_line` at line 143. The global buffer `GE_COLORS` (defined at line 55 of `genge.c`, size 128 bytes) is accessed with an out-of-bounds index, as shown by the AddressSanitizer report [ref_id=1].
What the fix does
The ticket [ref_id=1] reports the bug but does not include a patch or describe a fix. No code change is shown in the reference. The advisory does not specify remediation steps; the issue was closed without a published fix in the referenced ticket.
Preconditions
- inputAttacker must supply a .fig file with an invalid color number (e.g., -16) that triggers the out-of-bounds access.
- configThe fig2dev tool must be invoked to convert the crafted .fig file into GE format.
Reproduction
Use the provided ASAN reproduction command from the ticket [ref_id=1]: run fig2dev on the crafted .fig file. The ASAN log shows the crash at `set_fill` in `genge.c:446` with an invalid color number -16 at line 33 of the input file.
Generated on May 31, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
1- sourceforge.net/p/mcj/tickets/72/mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.