CVE-2022-40884
Medium · 5.5CVSS
5.5
EPSS
0.3%
Published
Oct 19, 2022
CISA due date
—
Cloudanix analysis
Software that splits up video files can slowly run out of memory when given certain bad files, potentially making the program or computer stop working.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Memory leak triggered during execution of the mp4fragment utility on malformed MP4 input, causing progressive heap exhaustion without releasing allocated buffers.
Why it matters to the business
Applications and build pipelines that invoke mp4fragment to process untrusted video files can experience gradual memory exhaustion, leading to degraded performance or service interruption on affected hosts.
How an attack unfolds
An attacker supplies a specially crafted MP4 file to the mp4fragment tool; repeated or automated invocation on the file causes unbounded memory allocations that are never freed, exhausting system resources over time.
How to fix it
Upgrade Bento4 to the most recent available release that resolves the leak; if no patched version exists, replace mp4fragment usage with an alternative MP4 fragmentation utility or sandbox the tool with strict memory limits.
How to confirm the fix worked
Run mp4fragment under a memory profiler or with address sanitizer on both known-good and suspect MP4 files, confirming stable memory usage after the update; monitor process RSS over multiple invocations.
Typical attack path
- Attacker generates or modifies an MP4 file to trigger the leak path in mp4fragment
- Victim or automated process executes mp4fragment against the supplied file
- Tool allocates memory that is not released for the duration of processing
- Repeated invocations or long-running jobs deplete available RAM
- System or process becomes unresponsive or crashes due to memory pressure
How to detect it
Review process accounting logs, container memory metrics, and system OOM events for sustained growth in resident memory during mp4fragment executions; correlate with file-processing timestamps and input file hashes.
What your security team should do
- Inventory all systems and CI pipelines that invoke mp4fragment and prioritize removal or replacement
- Apply the latest Bento4 build if a fix has been published since the original report
- Enforce strict input validation and resource limits around any remaining use of the tool
- Add memory-usage alerts for processes running Bento4 utilities
The record
Bento4 1.6.0 has memory leaks via the mp4fragment.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:22.04:LTS | kodi-inputstream-adaptive | 0 | No fix |
| Ubuntu:24.04:LTS | kodi-inputstream-adaptive | 0 | No fix |
| Ubuntu:24.10 | kodi-inputstream-adaptive | 0 | No fix |
| Ubuntu:25.04 | kodi-inputstream-adaptive | 0 | No fix |
| Ubuntu:25.10 | kodi-inputstream-adaptive | 0 | No fix |
Related vulnerabilities
- CVE-2022-3974 A vulnerability classified as critical was found in Axiomatic Bento4. Also affects kodi-inputstream-adaptive
- CVE-2022-3807 A vulnerability was found in Axiomatic Bento4. Also affects kodi-inputstream-adaptive
- CVE-2022-31282 Bento4 MP4Dump v1.2 was discovered to contain a segmentation violation via an unknown… Also affects kodi-inputstream-adaptive
- CVE-2022-31287 An issue was discovered in Bento4 v1.2. Also affects kodi-inputstream-adaptive
- CVE-2022-31285 An issue was discovered in Bento4 1.2. Also affects kodi-inputstream-adaptive
- CVE-2022-29017 Bento4 v1.6.0.0 was discovered to contain a segmentation fault via the component… Also affects kodi-inputstream-adaptive
- CVE-2026-109278 ImageMagick before 6.9.13-57 and 7.x before 7.1.2-32 contains a memory leak in the… CWE-401
- CVE-2026-109270 ImageMagick before 7.1.2-32 contains a memory leak vulnerability in the -process option… CWE-401