REDHAT-BUG-2299653: Medium severity curl libcurl vulnerability

Published Jul 24, 2024
·
Updated

libcurl's ASN1 parser has this utf8asn1str() function used for parsing an ASN.1 UTF-8 string. Itcan detect an invalid field and return error. Unfortunately, when doing so it also invokes free() on a 4 byte localstack buffer. Most modern malloc implementations detect this error and immediately abort. Some however accept the input pointer and add that memory to its list of available chunks. This leads to the overwriting of nearby stack memory. The content of the overwrite is decided by the free() implementation; likely to be memory pointers and a set of flags. The most likely outcome of exploting this flaw is a crash, although it cannot be ruled out that more serious results can be had in special circumstances.

Affected Software

1 affected component
curl libcurl

Event History

Jul 24, 2024
Data Sourced
via Red Hat·08:21 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What must an attacker be able to provide to trigger the flaw?

The attacker needs to cause libcurl's ASN.1 parser to process an invalid ASN.1 UTF-8 string field, so that utf8asn1str() takes its error path.

2

How does the memory allocator affect the outcome?

Most modern malloc implementations detect the invalid free of a local stack buffer and immediately abort, making a crash the likely result. Implementations that accept the pointer may add stack memory to their available chunks, allowing nearby stack memory to be overwritten.

3

Is code execution ruled out?

No. The expected outcome is a crash, but more serious impact cannot be ruled out under special circumstances because the overwrite may involve memory pointers and flags selected by the free() implementation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203