CVE-2024-6284

7.3 HIGH

📋 TL;DR

A byte order encoding bug in the google/nftables Go library causes IP addresses to be processed incorrectly, resulting in firewall rules that don't work as intended. This affects systems using the vulnerable library version for nftables configuration management. The vulnerability could allow unintended network traffic to pass or block legitimate traffic.

💻 Affected Systems

Products:
  • github.com/google/nftables library
  • crowdsec-firewall-bouncer
  • Any software using vulnerable nftables library
Versions: v0.1.0 and earlier
Operating Systems: Linux systems using nftables
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using the vulnerable library version for nftables configuration. Systems using other firewall solutions or different nftables libraries are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Critical firewall rules fail completely, allowing malicious traffic through or blocking legitimate services, potentially leading to network compromise or service disruption.

🟠

Likely Case

Some firewall rules behave unpredictably, causing either security gaps (allowing unwanted traffic) or operational issues (blocking legitimate connections).

🟢

If Mitigated

With proper network segmentation and defense-in-depth, impact is limited to specific systems using the vulnerable library.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires ability to trigger nftables configuration changes using the vulnerable library. No authentication bypass needed if already have configuration access.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.2.0

Vendor Advisory: https://github.com/google/nftables/issues/225

Restart Required: Yes

Instructions:

1. Update go.mod to require github.com/google/nftables@v0.2.0 or later. 2. Run 'go mod tidy'. 3. Rebuild and redeploy affected applications. 4. Restart services using the updated library. 5. Regenerate and reload nftables rules.

🔧 Temporary Workarounds

Manual nftables rule verification

linux

Manually verify and correct IP address encoding in existing nftables rules

nft list ruleset
nft flush ruleset
nft -f /path/to/corrected-rules.nft

🧯 If You Can't Patch

  • Implement network segmentation to limit blast radius of misconfigured rules
  • Deploy additional firewall layers (iptables, host-based firewalls) as compensating controls

🔍 How to Verify

Check if Vulnerable:

Check go.mod or go.sum for github.com/google/nftables@v0.1.0 or earlier. For crowdsec-firewall-bouncer, check version < 0.0.28.

Check Version:

grep 'github.com/google/nftables' go.mod && nft --version

Verify Fix Applied:

Verify go.mod requires github.com/google/nftables@v0.2.0+. Test nftables rules with known IP addresses to confirm correct behavior.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected network traffic patterns
  • Firewall rule application errors
  • Service connectivity issues

Network Indicators:

  • Traffic passing through unexpected ports
  • IP-based rules not functioning correctly

SIEM Query:

source="firewall" AND ("nftables" OR "crowdsec") AND (error OR failed OR unexpected)

🔗 References

📤 Share & Export