CVE-2020-6162

9.1 CRITICAL

📋 TL;DR

CVE-2020-6162 is an out-of-bounds read vulnerability in Bftpd FTP server that causes the daemon to crash during startup under certain conditions. This affects Bftpd 5.3 installations where the hidegroups_init function fails due to uninitialized values. The vulnerability prevents the FTP service from starting, resulting in denial of service.

💻 Affected Systems

Products:
  • Bftpd FTP Server
Versions: Version 5.3 specifically
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability triggers during daemon startup in hidegroups_init function; requires specific configuration conditions related to group hiding.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service preventing FTP server startup and availability, potentially requiring manual intervention to restore service.

🟠

Likely Case

FTP server fails to start, causing service disruption until patched or workaround applied.

🟢

If Mitigated

Minimal impact if server is already running stable version or if workarounds prevent the triggering condition.

🌐 Internet-Facing: MEDIUM - While it causes DoS, it requires specific conditions and only affects startup, not running instances.
🏢 Internal Only: MEDIUM - Same impact as internet-facing, but with potentially less critical business impact depending on FTP server role.

🎯 Exploit Status

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

Exploitation requires ability to influence server configuration or trigger the specific condition during startup.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Bftpd 5.4 and later

Vendor Advisory: http://bftpd.sourceforge.net/news.html

Restart Required: Yes

Instructions:

1. Download Bftpd 5.4 or later from official source. 2. Stop Bftpd service. 3. Install new version following distribution package manager or source compilation. 4. Restart Bftpd service.

🔧 Temporary Workarounds

Avoid hidegroups configuration

linux

Prevent triggering the vulnerable code path by not using hidegroups feature

# Edit bftpd.conf and remove or comment hidegroups lines
# systemctl restart bftpd

Downgrade to stable version

linux

Revert to Bftpd 5.2 or earlier stable version

# apt-get install bftpd=5.2* (Debian/Ubuntu)
# yum downgrade bftpd-5.2* (RHEL/CentOS)

🧯 If You Can't Patch

  • Monitor Bftpd service status and restart if crashes occur
  • Implement external monitoring to detect FTP service downtime

🔍 How to Verify

Check if Vulnerable:

Check Bftpd version: bftpd -v or check installed package version. If version is exactly 5.3, system is vulnerable.

Check Version:

bftpd -v 2>&1 | grep -i version || dpkg -l | grep bftpd || rpm -qa | grep bftpd

Verify Fix Applied:

Verify Bftpd version is 5.4 or later and service starts successfully without hidegroups_init errors.

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault or crash messages in system logs during Bftpd startup
  • Error messages containing 'hidegroups_init' or 'dirlist.c'

Network Indicators:

  • FTP service unavailable on port 21
  • Failed connection attempts to FTP port

SIEM Query:

source="systemd" AND "bftpd" AND ("segmentation fault" OR "crash" OR "failed")

🔗 References

📤 Share & Export