VYPR
Unrated severityNVD Advisory· Published Sep 20, 2021· Updated Aug 3, 2024

CVE-2021-32280

CVE-2021-32280

Description

A NULL pointer dereference in fig2dev's compute_closed_spline() before 3.2.8 allows denial of service via a crafted FIG file.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A NULL pointer dereference in fig2dev's compute_closed_spline() before 3.2.8 allows denial of service via a crafted FIG file.

Vulnerability

A NULL pointer dereference exists in the function compute_closed_spline() in trans_spline.c in fig2dev versions prior to 3.2.8. When processing a crafted FIG file with an incomplete closed spline, the function dereferences a NULL pointer, leading to a segmentation fault. The vulnerability was promptly addressed in commit f17a3b8 and released in version 3.2.8 [1][2].

Exploitation

An attacker can exploit this vulnerability by providing a specially crafted FIG file to fig2dev. The attacker needs no special privileges beyond the ability to supply a malicious input file. A command line such as ./fig2dev -L pdf -G .25:1cm -j -m 2 -N -P -x 3 -y 4 @@ /dev/null (or pointing to the malicious file) triggers the crash. The crash occurs during reading of the spline object in read_splineobject(), which calls create_line_with_spline(), ultimately leading to compute_closed_spline() [1].

Impact

Successful exploitation causes a denial of service (DoS) through a segmentation fault, crashing the fig2dev process. The vulnerability does not appear to allow code execution or information disclosure beyond the crash itself, as the NULL pointer dereference results in an immediate program termination via AddressSanitizer or a standard segmentation fault [1].

Mitigation

The vulnerability is fixed in fig2dev version 3.2.8, released on September 20, 2021. Users should upgrade to version 3.2.8 or later. There is no known workaround if upgrading is not possible; care should be taken when processing FIG files from untrusted sources [1][2].

AI Insight generated on May 27, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

23

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"NULL pointer dereference in compute_closed_spline() when processing malformed spline data."

Attack vector

An attacker can trigger a denial of service by providing a specially crafted FIG file (or `/dev/null` as shown in the report) to `fig2dev` with command-line arguments such as `-L pdf -G .25:1cm -j -m 2 -N -P -x 3 -y 4`. The malformed input causes `compute_closed_spline()` to dereference a NULL pointer, resulting in a segmentation fault [ref_id=1]. No authentication or special network access is required beyond the ability to supply the crafted file.

Affected code

The vulnerability resides in `compute_closed_spline()` in `trans_spline.c`, called from `create_line_with_spline()` at line 495, which is reached via `read_splineobject()` in `read.c` and the main `read_fig()` / `readfp_fig()` path. A NULL pointer dereference occurs when processing a malformed FIG file.

What the fix does

The advisory states that the fixed version is fig2dev 3.2.8, but the patch diff is not included in the bundle. The fix likely adds a NULL-pointer check or input validation in `compute_closed_spline()` to prevent dereferencing a null pointer when the spline data is malformed. Without the patch source, the exact change cannot be confirmed.

Preconditions

  • inputThe attacker must supply a malformed FIG file (or a file that causes a NULL pointer in spline computation) to the fig2dev utility.
  • configThe fig2dev binary must be invoked with arguments that trigger the spline code path (e.g., `-L pdf -G .25:1cm -j -m 2 -N -P -x 3 -y 4`).

Generated on May 29, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.