CVE-2024-22857 Memory corruption in n/a
A heap-based buffer overflow in the zlog library allows attackers to achieve arbitrary code execution by overwriting function pointers.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-22857?
CVE-2024-22857 is a critical memory corruption vulnerability in n/a, published on 7 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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 MAXLEN_CFG_LINE(MAXLEN_PATH*4) + 1. So a check was missing in zlog_rule_new() while copying the record_name from file_path + 1 which caused the buffer overflow. An attacker can exploit this vulnerability to overwrite the zlog_record_fn record_func function pointer to get arbitrary code execution or potentially cause remote code execution (RCE).
Weakness: CWE-122
Which versions are affected by CVE-2024-22857?
How do I fix CVE-2024-22857?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2024-22857 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-22857 exists.
Sources
Also known as GHSA-6q5p-rp5c-wmph, OESA-2024-2213, OESA-2024-2214, OESA-2024-2215, OESA-2024-2318.