CVE-2024-4741: Issue summary: Calling the OpenSSL API function SSL_free_buffers may cause memory to be accessed...
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.26597%
CWE
Published
11/13/2024
Updated
11/13/2024
KEV Status
No
Technology
-
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability (CVE-2024-4741) is a use-after-free caused by calling SSL_free_buffers when underlying buffers are still in use. The analysis of the provided patches confirms this:
- Commits 704f725b96aa373ee45ecfb23f6abfe8be8d9177 and b3f0eb0a295f58f16ba43ba99dad70d4ee5c437d directly modify
SSL_free_buffersinssl/ssl_lib.cby adding a new check (RECORD_LAYER_data_present) before allowing buffers to be released. This directly points toSSL_free_buffersas the API function whose previous implementation was vulnerable. - Commits c88c3de51020c37e8706bf7a682a162593053aac and e5093133c35ca82874ad83697af76f4b0f7e3bd8 modify
tls_free_buffersinssl/record/methods/tls_common.c. This function handles the lower-level details of freeing buffers. The patch tightens the conditions under which buffers are freed, specifically checking if all records have been released (rl->curr_rec != rl->num_released) and if the state isSSL_ST_READ_BODY. This indicates that the previous logic intls_free_bufferswas insufficient and contributed to the UAF whenSSL_free_bufferswas invoked.
The vulnerability description clearly states that applications calling SSL_free_buffers are affected. The patches show that this function, and its underlying helper tls_free_buffers, lacked proper checks, leading to the vulnerability. The newly added function RECORD_LAYER_data_present is part of the mitigation, not the vulnerability itself.