CVE-2023-31724

7.8 HIGH

📋 TL;DR

CVE-2023-31724 is a segmentation fault vulnerability in yasm's do_directive function that can cause denial of service or potentially allow arbitrary code execution. This affects systems using yasm 1.3.0.55.g101bc for assembly code processing. Attackers could exploit this by providing malicious input to the yasm assembler.

💻 Affected Systems

Products:
  • yasm
Versions: 1.3.0.55.g101bc
Operating Systems: Linux, Windows, macOS, BSD
Default Config Vulnerable: ⚠️ Yes
Notes: Any system using the vulnerable yasm version to process assembly code is affected

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise if yasm processes untrusted input

🟠

Likely Case

Denial of service through application crash when processing malformed assembly files

🟢

If Mitigated

Limited impact if yasm only processes trusted, validated assembly code

🌐 Internet-Facing: MEDIUM - yasm is typically used in build systems, not directly internet-facing, but could be exposed via CI/CD pipelines
🏢 Internal Only: MEDIUM - Build systems and development environments using yasm could be affected

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Proof of concept available in GitHub repository showing crash reproduction

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check yasm GitHub for latest patched version

Vendor Advisory: https://github.com/yasm/yasm/issues/222

Restart Required: No

Instructions:

1. Check current yasm version: yasm --version
2. Update yasm from official repository or source
3. Recompile any projects using yasm with updated version

🔧 Temporary Workarounds

Input validation

all

Validate and sanitize all assembly code input before processing with yasm

Sandbox execution

linux

Run yasm in a sandboxed environment with limited privileges

docker run --read-only --cap-drop=ALL -v /safe/input:/input yasm

🧯 If You Can't Patch

  • Restrict yasm to process only trusted, pre-validated assembly files
  • Implement network segmentation to isolate build systems using yasm

🔍 How to Verify

Check if Vulnerable:

Run: yasm --version | grep '1.3.0.55.g101bc'

Check Version:

yasm --version

Verify Fix Applied:

Ensure yasm version is newer than 1.3.0.55.g101bc and test with known crash inputs

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault errors in system logs
  • yasm process crashes
  • Core dumps from yasm

Network Indicators:

  • Unusual network traffic to/from build systems
  • Failed build jobs with crash reports

SIEM Query:

process_name:yasm AND (event_type:crash OR exit_code:139)

🔗 References

📤 Share & Export