CVE-2024-22857

Heap based buffer flow in zlog v1.1.0 to v1.2.17 in zlog_rule_new().The size of record_name is MAXLEN_PATH(1024) + 1 but file_path may have data upto…

Critical · published March 7, 2024

CVSS v3.1
9.8
EPSS
2%
Percentile
76.8
In the wild
Unconfirmed
What it is

🔥 A heap-based buffer overflow in zlog could turn an innocent log file into a gateway for total chaos! Think of it like a restaurant failing to check the maximum capacity of a banquet hall; if too many guests (data) are crammed in, it can cause a collapse. In this case, overflowing log data leads to potential code execution mayhem. An attacker could exploit this vulnerability to overwrite critical function pointers, leading to arbitrary code execution and even full remote code execution (RCE). Imagine a hacker gaining access to your system simply by pushing too much data into a log file—a scenario that could be absolutely devastating!

Put simply

Think of it like a restaurant failing to check the maximum capacity of a banquet hall; if too many guests (data) are crammed in, it can cause a collapse. In this case, overflowing log data leads to potential code execution mayhem. This vulnerability occurs in zlog versions 1.1.0 to 1.2.17 due to a missing size check in the zlog_rule_new() function when copying data from file_path to record_name, allowing buffer overflow.

What to do

An attacker could exploit this vulnerability to overwrite critical function pointers, leading to arbitrary code execution and even full remote code execution (RCE). Imagine a hacker gaining access to your system simply by pushing too much data into a log file—a scenario that could be absolutely devastating! To mitigate this, upgrade zlog to at least version 1.2.18, where this buffer overflow has been fixed. Always validate the size of input data to prevent similar vulnerabilities in the future. 🛡️ You’ve got this! With a quick update, you can secure your system and earn your security hero badge! 🦸

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01685 · 76.8th percentile
Published
2024-03-07T00:00Z
EPSS history
Timeline
  • 07 MAR 00:00Z
    Heap based buffer flow in zlog v1.1.0 to v1.2.17 in zlog_rule_new().The size of record_name is MAXLEN_PATH(1024) + 1 but file_path may have data upto…
    cvelistv5