CVE-2022-24756

7.5 HIGH

📋 TL;DR

CVE-2022-24756 is a memory leak vulnerability in Bareos Director when using PAM authentication, allowing attackers with access to the PAM Console (via shared secret or WebUI) to cause denial of service through repeated failed login attempts, leading to out-of-memory conditions. It affects Bareos Director versions 18.2 to 21.1.0, 20.0.6, and 19.2.12, specifically when PAM authentication is enabled. Users with PAM-configured systems are at risk if attackers can exploit this to disrupt backup operations.

💻 Affected Systems

Products:
  • Bareos Director
Versions: >=18.2 but prior to 21.1.0, 20.0.6, and 19.2.12
Operating Systems: All operating systems where Bareos is installed and configured for PAM authentication
Default Config Vulnerable: ✅ No
Notes: Only affects systems with PAM authentication enabled; default configurations may not use PAM, so check your setup.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service where the Bareos Director becomes unresponsive due to memory exhaustion, halting all backup, archiving, and recovery operations until the service is restarted or memory is freed.

🟠

Likely Case

Degraded performance or temporary service disruption from memory leaks under attack, potentially causing backup failures or delays in data recovery processes.

🟢

If Mitigated

Minimal impact if PAM authentication is disabled or systems are patched, with no memory leaks and normal operation maintained.

🌐 Internet-Facing: MEDIUM, as exploitation requires access to the PAM Console, which may be exposed via WebUI or network interfaces, but attackers need prior knowledge of shared secrets or authentication mechanisms.
🏢 Internal Only: HIGH, if internal attackers or compromised accounts have access to the PAM Console, they can easily trigger the memory leak to disrupt critical backup services.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authentication via shared secret or WebUI access; once authenticated, attackers can easily flood login attempts to trigger the memory leak.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 21.1.0, 20.0.6, 19.2.12

Vendor Advisory: https://github.com/bareos/bareos/security/advisories/GHSA-jh55-4wgw-xc9j

Restart Required: Yes

Instructions:

1. Identify your Bareos Director version using 'bareos-dir --version'. 2. Upgrade to a fixed version: for 21.x, upgrade to 21.1.0; for 20.x, upgrade to 20.0.6; for 19.x, upgrade to 19.2.12. 3. Restart the Bareos Director service after upgrade to apply the patch.

🔧 Temporary Workarounds

Disable PAM Authentication

linux

Disable PAM authentication in the Bareos Director configuration to prevent exploitation of the memory leak vulnerability.

Edit the Bareos Director configuration file (e.g., /etc/bareos/bareos-dir.conf) and remove or comment out PAM authentication settings, then restart the service.

🧯 If You Can't Patch

  • Disable PAM authentication as a temporary measure to eliminate the vulnerability until patching is possible.
  • Implement network access controls to restrict access to the Bareos Director and PAM Console, reducing exposure to potential attackers.

🔍 How to Verify

Check if Vulnerable:

Check if Bareos Director version is between 18.2 and the fixed versions, and verify PAM authentication is enabled in the configuration.

Check Version:

bareos-dir --version

Verify Fix Applied:

After patching, confirm the version is 21.1.0, 20.0.6, or 19.2.12, and test PAM authentication to ensure no memory leaks occur under failed login attempts.

📡 Detection & Monitoring

Log Indicators:

  • Repeated failed PAM authentication attempts in Bareos Director logs, unusual memory usage spikes, or out-of-memory errors in system logs.

Network Indicators:

  • Increased network traffic to Bareos Director on authentication ports, especially from suspicious IPs attempting multiple login failures.

SIEM Query:

Example: 'source="bareos-dir.log" AND "authentication failed" AND "PAM"' to detect exploitation attempts.

🔗 References

📤 Share & Export