CVE-2023-27567
📋 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
- OpenBSD
📦 What is this software?
Openbsd by Openbsd
⚠️ 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.
🎯 Exploit Status
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
allRemove 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
allBlock 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
- https://ftp.openbsd.org/pub/OpenBSD/patches/7.2/common/013_tcp.patch.sig
- https://github.com/openbsd/src/commit/0a543725ccdd2a01669122ce79bb67e66ede77f2
- https://security.netapp.com/advisory/ntap-20230406-0001/
- https://ftp.openbsd.org/pub/OpenBSD/patches/7.2/common/013_tcp.patch.sig
- https://github.com/openbsd/src/commit/0a543725ccdd2a01669122ce79bb67e66ede77f2
- https://security.netapp.com/advisory/ntap-20230406-0001/