CVE-2020-8447
OSSEC vulnerability analysis and mitigation

Overview

CVE-2020-8447 affects OSSEC-HIDS versions 2.7 through 3.5.0. The vulnerability exists in the server component responsible for log analysis (ossec-analysisd), which is susceptible to a use-after-free vulnerability during the processing of syscheck formatted messages. These messages are received from authenticated remote agents and delivered to the analysisd processing queue by ossec-remoted (NVD, Debian Tracker).

Technical details

The vulnerability occurs in the OS_ReadMSG function where the syscheck decoder frees the lf->full_log pointer and replaces existing lf->log and lf->full_log pointers with pointers to new messages. When subsequent processing rules access the lf->hostname or lf->program_name fields set by OS_CleanMSG, they access memory of a freed heap chunk previously containing lf->full_log. The bug was introduced in commit 8672fa0 from November 18, 2006 (GitHub Issue).

Impact

If exploited, this vulnerability could lead to accessing freed heap memory when processing rules access the hostname or program_name fields. This may potentially result in an out-of-bounds read of heap memory if the area pointed to after the syscheck decoder free isn't null terminated (GitHub Issue).

Exploitability

The vulnerability is exploitable through an authenticated client via ossec-remoted. The attacker needs only to write a valid syscheck message that will have the program_name or hostname set during OS_CleanMSG processing (GitHub Issue).

Mitigation and workarounds

The issue was addressed in OSSEC version 3.6.0. Users should upgrade to this version or later to mitigate the vulnerability. A suggested fix involves modifying the syscheck decoder to use os_strdup for lf->hostname and lf->program_name before freeing full_log (Gentoo Security).

Community reactions

The vulnerability was rated as medium severity in the security audit findings of OSSEC-HIDS. It was part of a broader security audit that uncovered multiple vulnerabilities in the software (GitHub Issue).

Additional resources


SourceThis report was generated using AI

Related OSSEC vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2020-8447CRITICAL9.8
  • OSSEC logoOSSEC
  • cpe:2.3:a:ossec:ossec
NoYesJan 30, 2020
CVE-2020-8445CRITICAL9.8
  • OSSEC logoOSSEC
  • cpe:2.3:a:ossec:ossec
NoYesJan 30, 2020
CVE-2021-28040HIGH7.5
  • OSSEC logoOSSEC
  • cpe:2.3:a:ossec:ossec
NoYesMar 05, 2021
CVE-2020-8448MEDIUM5.5
  • OSSEC logoOSSEC
  • cpe:2.3:a:ossec:ossec
NoYesJan 30, 2020
CVE-2020-8446MEDIUM5.5
  • OSSEC logoOSSEC
  • net-analyzer/ossec-hids
NoYesJan 30, 2020

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management