Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Fluent Bit Memory Corruption Vulnerability

Critical

Synopsis

Tenable Research has discovered a memory corruption vulnerability in Fluent Bit versions 2.0.7 thru 3.0.3. This issue lies in the embedded http server’s parsing of trace requests and may result in denial of service conditions, information disclosure, or remote code execution.

 

Fluent Bit’s monitoring API is intended to allow administrators or other users to query and monitor information internal to the service itself. For example, HTTP endpoints exist to indicate service uptime, plugin metrics, health checks, etc.

 

Among these endpoints are /api/v1/traces and /api/v1/trace, which allow end-users to enable, disable, or retrieve information about configured traces. Regardless of whether or not any traces are configured, it is still possible for any user with access to this API endpoint to query it.

 

During the parsing of incoming requests for the “traces” api endpoint, types of input names are not properly validated before being parsed. They are incorrectly assumed to be valid MSGPACK_OBJECT_STRs. This can be seen here: https://github.com/fluent/fluent-bit/blob/master/src/http_server/api/v1/trace.c#L527

 

By passing non-string values in the “inputs” array of requests, such as integer values, it is possible to cause a variety of memory corruption issues that could lead to RCE. During the flb_sds_create_len() function that assigns the input_name variable, the values passed when an int is supplied happen to be a pointer to the beginning of the inputs array and the integer itself as the “size” of the value.

 

In an isolated lab environment, researchers were able to reliably exploit this issue to crash the service and cause a denial of service scenario. They were also able to retrieve chunks of adjacent memory, which are returned in the HTTP responses. While this is generally unlikely to reveal anything other than previous metrics requests, the researchers were able to occasionally retrieve partial secrets during their testing, indicating that this issue could potentially leak sensitive information.

 

As for the remote code execution possibilities of this issue, exploitation is dependent on a variety of environmental factors such as host architecture and operating system. While heap buffer overflows such as this are known to be exploitable, creating a reliable exploit is not only difficult, but incredibly time consuming. Tenable Research believes that the most immediate and primary risks are those pertaining to the ease with which DoS and information leaks can be accomplished.

 

This issue was ultimately fixed by properly validating the data types of values in the “inputs” array sent to the “traces” endpoint. Further details can be found in the following commit: https://github.com/fluent/fluent-bit/commit/9311b43a258352797af40749ab31a63c32acfd04

Solution

A fix for this issue is introduced in versions 2.2.3 and 3.0.4 and can be found here: https://fluentbit.io/announcements/v3.0.4/

Disclosure Timeline

April 29, 2024 - Tenable requests security contact via [email protected]
April 30, 2024 - Tenable creates security issue on Fluent-bit Github (GHSA-5rjf-prwh-pp7q).
May 6, 2024 - Tenable creates note in Github discussion board requesting a contact.
May 8, 2024 - Response to discussion board post requests attempting to contact [email protected] again. Tenable complies.
May 8 - May 15, 2024 - Comments and development updates regarding a fix are made.
May 15, 2024 - Fixes are pushed publicly to Fluent Bit's primary branch. Linux packages are built and become available on Github.
May 15, 2024 - Tenable requests information regarding a full release via GHSA ticket.
May 15, 2024 - Tenable provides advance notice to Microsoft, Amazon, and Google via standard vulnerability reporting mechanisms.
May 17, 2024 - Tenable requests information regarding a full release via Google Group email thread and reiterates in GHSA ticket..

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

CVE ID: CVE-2024-4323
Tenable Advisory ID: TRA-2024-17
Credit:
Evan Grant
Jimi Sebree
CVSSv3 Base / Temporal Score:
9.8 / 8.8
CVSSv3 Vector:
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected Products:
Fluent Bit versions 2.0.7 thru 3.0.3
Risk Factor:
Critical

Advisory Timeline

May 20, 2024 - Initial release.
May 21, 2024 - Updated solution.
May 22, 2024 - Added reference to maintainer statement.
June 28, 2024 - Updated solution.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose your subscription option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose your subscription option:

Buy Now