CVE-2024-36736

9.8 CRITICAL

📋 TL;DR

CVE-2024-36736 is a critical vulnerability in OneFlow's permute component that causes incorrect calculations when performing same-dimension operations. This could lead to memory corruption, data integrity issues, or potential remote code execution. Users of OneFlow v0.9.1 for machine learning and tensor operations are affected.

💻 Affected Systems

Products:
  • OneFlow-Inc. Oneflow
Versions: v0.9.1
Operating Systems: All platforms running Python with OneFlow
Default Config Vulnerable: ⚠️ Yes
Notes: Affects any system using the oneflow.permute component with same-dimension operations

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data exfiltration, or service disruption

🟠

Likely Case

Application crashes, incorrect tensor calculations leading to model corruption or incorrect outputs

🟢

If Mitigated

Limited to denial of service or data corruption within the affected application

🌐 Internet-Facing: HIGH - If OneFlow is exposed via web services or APIs, attackers could exploit remotely
🏢 Internal Only: MEDIUM - Requires access to internal systems running vulnerable OneFlow code

🎯 Exploit Status

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

Proof of concept available in GitHub gist references; exploitation appears straightforward for attackers with access to vulnerable code

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.9.2 or later

Vendor Advisory: https://github.com/Oneflow-Inc/oneflow

Restart Required: Yes

Instructions:

1. Check current OneFlow version: pip show oneflow
2. Upgrade to latest version: pip install --upgrade oneflow
3. Restart all services using OneFlow
4. Verify upgrade: python -c "import oneflow; print(oneflow.__version__)"

🔧 Temporary Workarounds

Disable permute operations

all

Avoid using oneflow.permute with same-dimension operations in production code

# Modify code to avoid: tensor.permute([0,1,1,2]) or similar same-dimension operations

Input validation wrapper

all

Add validation to check for same-dimension permute operations before execution

def safe_permute(tensor, dims):
    if len(set(dims)) != len(dims):
        raise ValueError('Same-dimension permute operations are disabled due to CVE-2024-36736')
    return tensor.permute(dims)

🧯 If You Can't Patch

  • Isolate OneFlow applications in containers or VMs with strict network controls
  • Implement application-level monitoring for abnormal tensor operations or crashes

🔍 How to Verify

Check if Vulnerable:

Check if using OneFlow v0.9.1: python -c "import oneflow; print('VULNERABLE' if oneflow.__version__ == '0.9.1' else 'SAFE')"

Check Version:

pip show oneflow | grep Version

Verify Fix Applied:

Verify version is v0.9.2 or later: python -c "import oneflow; print(oneflow.__version__)"

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with OneFlow permute operations
  • Memory access violation errors in logs
  • Unexpected tensor calculation failures

Network Indicators:

  • Unusual outbound connections from OneFlow processes
  • Traffic patterns suggesting data exfiltration

SIEM Query:

source="*oneflow*" AND (error OR crash OR exception) AND permute

🔗 References

📤 Share & Export