CVE-2020-18395

7.5 HIGH

📋 TL;DR

CVE-2020-18395 is a NULL pointer dereference vulnerability in GNU Gama's ellipsoid.h component that allows attackers to cause denial of service through segmentation faults. The vulnerability affects Gama 2.04 users who process crafted input data. Attackers can crash the application by exploiting this flaw.

💻 Affected Systems

Products:
  • GNU Gama
Versions: Version 2.04
Operating Systems: Linux, Unix-like systems, Windows (if compiled from source)
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in the default configuration when processing input data through the affected set() function in ellipsoid.h.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service with application crashes, potentially disrupting geodetic survey operations and data processing workflows.

🟠

Likely Case

Application crashes when processing maliciously crafted input files, requiring manual restart and potentially causing data loss in active processing jobs.

🟢

If Mitigated

Limited impact with proper input validation and sandboxing; crashes would be contained to individual processes without affecting the entire system.

🌐 Internet-Facing: LOW - Gama is typically used for offline geodetic data processing rather than as an internet-facing service.
🏢 Internal Only: MEDIUM - Internal users with access to upload or process data could intentionally or accidentally trigger the vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires the ability to provide crafted input to the Gama application, which typically requires some level of access to the system or application.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after 2.04 (check for specific patch releases)

Vendor Advisory: http://lists.gnu.org/archive/html/bug-gama/2019-04/msg00001.html

Restart Required: Yes

Instructions:

1. Check current Gama version. 2. Update to latest version from official GNU repositories. 3. Recompile if using source distribution. 4. Restart any Gama processes or services.

🔧 Temporary Workarounds

Input validation wrapper

linux

Create a wrapper script that validates input files before passing them to Gama

#!/bin/bash
# Validate input file exists and has expected format
if [ -f "$1" ] && file "$1" | grep -q "text"; then
    gama "$1"
else
    echo "Invalid input file"
    exit 1
fi

🧯 If You Can't Patch

  • Restrict user access to Gama binary and input data directories
  • Implement strict input validation and sanitization for all Gama input files

🔍 How to Verify

Check if Vulnerable:

Check Gama version: gama --version or check installed package version

Check Version:

gama --version 2>&1 | head -1

Verify Fix Applied:

Verify updated version is installed and test with known safe input files

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault errors in system logs
  • Gama process crashes with SIGSEGV
  • Core dumps in working directories

Network Indicators:

  • N/A - primarily local file processing vulnerability

SIEM Query:

source="system_logs" AND ("segmentation fault" OR "SIGSEGV") AND process="gama"

🔗 References

📤 Share & Export