CVE-2024-0115
NVIDIA CV-CUDA vulnerability allows uncontrolled resource consumption.
- CVSS 6.1
- CWE-400
- Resource Management
- Remote
NVIDIA CV-CUDA for Ubuntu 20.04, Ubuntu 22.04, and Jetpack contains a vulnerability in Python APIs where a user may cause an uncontrolled resource consumption issue by a long running CV-CUDA Python process. A successful exploit of this vulnerability may lead to denial of service and data loss.
- CWE
- CWE-400
- CVSS base score
- 6.1
- Published
- 2024-08-09
- OWASP
- A06 Vulnerable and Outdated Components
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- Python APIs
- Fixed by upgrading
- Yes
Solution
Upgrade to the latest version of NVIDIA CV-CUDA that addresses the resource consumption issue.
Vulnerable code sample
import nvcv
import numpy as np
def run_inference(stream):
# VULNERABLE: unbounded allocation loop causing resource exhaustion
while True:
# allocate a large GPU tensor each iteration
data = np.random.rand(1024, 1024, 3).astype(np.float32)
gpu_tensor = nvcv.cuda.Tensor.from_numpy(data, stream=stream)
# pretend to process
_ = gpu_tensor * 1.0Patched code sample
import nvcv
import numpy as np
def run_inference(stream, max_frames=100):
# FIX: bound the number of allocations to prevent exhaustion
for _ in range(max_frames):
data = np.random.rand(1024, 1024, 3).astype(np.float32)
gpu_tensor = nvcv.cuda.Tensor.from_numpy(data, stream=stream)
_ = gpu_tensor * 1.0Payload
import time
def exploit_vulnerability():
# This function simulates an uncontrolled resource consumption attack
while True: # Infinite loop to exhaust resources
# Simulating heavy processing without exit conditions
time.sleep(0.1) # Simulate CPU-bound operation
exploit_vulnerability()
Cite this entry
@misc{vaitp:cve20240115,
title = {{NVIDIA CV-CUDA vulnerability allows uncontrolled resource consumption.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2024},
note = {VAITP Python Vulnerability Dataset, entry CVE-2024-0115},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-0115/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
