SDL2: Missing Release of Memory after Effective Lifetime
CVE-2022-4743 is a high-severity missing release of memory after effective lifetime vulnerability in SDL2, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. There is no confirmed exploitation so far. EPSS estimates a 1.37% chance of exploitation within 30 days, higher than 72% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Simple Directmedia Layer to 2.26.0 or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| SDL2 | SDL2 | Not specified in the record | Not stated |
| Libsdl | Simple Directmedia Layer | 2.0.4 up to, but not including, 2.26.0 | 2.26.0 |
| Red Hat | Enterprise Linux | 9.0 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | NVD |
| CVSS 3.1 | 7.5 | High | CISA (ADP) |
Official description
A potential memory leak issue was discovered in SDL2 in GLES_CreateTexture() function in SDL_render_gles.c. The vulnerability allows an attacker to cause a denial of service attack. The vulnerability affects SDL2 v2.0.4 and above. SDL-1.x are not affected.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Missing Release of Memory after Effective Lifetime
The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse.
How developers prevent this class of flaw
- Choose a language or tool that provides automatic memory management, or makes manual memory management less error-prone. For example, glibc in Linux provides protection against free of invalid pointers. When using Xcode to target OS X or iOS, enable automatic reference counting (ARC). To help correctly and consistently manage memory when programming in C++, consider using a smart pointer class such as std
- Use an abstraction library to abstract away risky APIs. Not a complete solution.
- Consider using the Boehm-Demers-Weiser garbage collector (bdwgc), which can help avoid leaks.
More Missing Release of Memory after Effective Lifetime vulnerabilities (CWE-401)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- bugzilla.redhat.com/show_bug.cgi?id=2156290Issue Tracking, Third Party Advisory
- github.com/libsdl-org/SDL/commit/00b67f55727bc0944c3266e2b875440da132ce4bThird Party Advisory
- github.com/libsdl-org/SDL/pull/6269Third Party Advisory
Third-party and government advisories
- access.redhat.com/security/cve/CVE-2022-4743Third Party Advisory
Other references
Recent Missing Release of Memory after Effective Lifetime vulnerabilities
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
Spotted an error? Tell us.