CVE-2023-27567

7.5 HIGH

📋 TL;DR

A kernel crash vulnerability in OpenBSD 7.2 occurs when a TCP packet with destination port 0 matches a pf divert-to rule, causing a denial of service. This affects OpenBSD systems using pf firewall with divert-to rules. Attackers can crash affected systems remotely.

💻 Affected Systems

Products:
  • OpenBSD
Versions: OpenBSD 7.2
Operating Systems: OpenBSD
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if pf firewall with divert-to rules is configured. Default OpenBSD installations may not have divert-to rules.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system crash requiring reboot, leading to sustained denial of service and potential data loss.

🟠

Likely Case

System crash requiring manual reboot, causing temporary service disruption.

🟢

If Mitigated

No impact if patched or divert-to rules are not used.

🌐 Internet-Facing: HIGH - Remote attackers can send malicious packets to crash systems.
🏢 Internal Only: MEDIUM - Internal attackers could exploit if they can send packets to affected systems.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Simple packet crafting required. No authentication needed if network access exists.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: OpenBSD 7.2 with patch 013_tcp applied

Vendor Advisory: https://ftp.openbsd.org/pub/OpenBSD/patches/7.2/common/013_tcp.patch.sig

Restart Required: Yes

Instructions:

1. Download patch from OpenBSD patches repository. 2. Apply patch to kernel source. 3. Rebuild and install kernel. 4. Reboot system.

🔧 Temporary Workarounds

Remove divert-to rules

all

Remove or disable pf divert-to rules to prevent exploitation.

pfctl -s rules | grep divert-to
Edit /etc/pf.conf to remove divert-to lines
pfctl -f /etc/pf.conf

Block port 0 traffic

all

Block TCP packets with destination port 0 at network perimeter.

pfctl -t badports -T add 0
Add 'block in proto tcp to port 0' to pf.conf

🧯 If You Can't Patch

  • Remove all pf divert-to rules from firewall configuration
  • Implement network filtering to block TCP packets with destination port 0

🔍 How to Verify

Check if Vulnerable:

Check if running OpenBSD 7.2 and pf.conf contains 'divert-to' rules: grep -i 'divert-to' /etc/pf.conf

Check Version:

uname -a

Verify Fix Applied:

Check kernel version after patch: sysctl kern.version | grep 7.2-stable

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/messages
  • System crash/reboot events

Network Indicators:

  • TCP packets with destination port 0
  • Unusual traffic patterns to firewall

SIEM Query:

source="*messages*" "panic" OR "crash" AND "kernel"

🔗 References

📤 Share & Export