☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Openbsd logo [ WEBSITE ] [ VENDOR STATS ]
SOON CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H 🐛 CWE-362
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-52556

CVE-2023-52556 Race Condition in Openbsd
📅 PUBLISHED: 2024-03-01 16:08 UTC 🔄 UPDATED: 2026-08-21 19:35 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.02%
👁️
0.02% probability
<1× above the median CVE
Tier: LOW
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1498
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: Global License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 0.0
AV: L Attack Vector Local
AC: H Attack Complexity High
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: N Confidentiality None
I: N Integrity None
A: H Availability High
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-52556 is a race condition vulnerability in the pf(4) packet filter of OpenBSD 7.4. The flaw occurs during concurrent processing of network packets and the expiration of packet states, potentially leading to a kernel panic (denial of service). The vulnerability is triggered locally or remotely by an attacker who can send crafted network traffic that exploits the timing window between state creation and expiration. No public exploit code or proof-of-concept is currently available, and the EPSS score is 0.0%, indicating low exploitation activity. The vendor has released an errata patch (errata 009) to address the issue.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby) but is a core operating system component (pf(4) packet filter). The supply chain risk is limited to the OpenBSD base system distribution. Users should ensure they are running a patched version of OpenBSD 7.4.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Base Score: 5.1 (Medium)
  • Attack Vector (AV): Local (L) – The attacker must be able to send packets to the target system.
  • Attack Complexity (AC): High (H) – Exploitation requires precise timing to win the race condition.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerability does not affect other components.
  • Confidentiality (C): None (N) – No data exposure.
  • Integrity (I): None (N) – No data modification.
  • Availability (A): High (H) – Successful exploitation causes a kernel panic, leading to denial of service.

Threat Level: Medium. The attack complexity is high, but the impact on availability is severe. The vulnerability is not remotely exploitable without network access, but an attacker on the same network segment could trigger a crash.

Deep Dive & Mechanics

The pf(4) packet filter maintains a state table to track active connections. Each state has a timeout, after which it is expired and removed. The race condition occurs when:

  1. A packet arrives that matches an existing state.
  2. Simultaneously, the state's timeout expires, and the state is being removed from the table.
  3. The packet processing code attempts to access the state after it has been freed, leading to a use-after-free or null pointer dereference, causing a kernel panic.

The vulnerability is in the interaction between the packet processing path (e.g., pf_test()) and the state expiration timer (pf_state_expires()). The fix likely involves proper locking or reference counting to ensure that a state is not freed while it is still being referenced by a packet.

Vulnerable vs. Patched Code

The exact code diff is not publicly available, but the patch (errata 009) likely modifies the pf(4) state handling to prevent the race condition. A typical fix would involve:

  • Vulnerable: The state expiration function frees the state without checking if it is currently being processed by another thread.
  • Patched: The state expiration function acquires a lock or increments a reference count before freeing, ensuring no concurrent access.
// Vulnerable pseudo-code
void pf_state_expire(struct pf_state *s) {
    // No lock held
    pf_state_unlink(s);
    pf_state_free(s);
}

// Patched pseudo-code
void pf_state_expire(struct pf_state *s) {
    pf_state_lock(s);
    if (s->refcount > 0) {
        // Defer free
        s->expired = 1;
        pf_state_unlock(s);
        return;
    }
    pf_state_unlink(s);
    pf_state_free(s);
    pf_state_unlock(s);
}

Exploitation & Lab Setup

Red Team

No public exploit code is available. To test the vulnerability in a lab environment:

  1. Setup: Install OpenBSD 7.4 (unpatched) on a virtual machine with pf enabled.
  2. Trigger: Send a high volume of crafted TCP/UDP packets that create and immediately expire states. Use a tool like hping3 or a custom script to send packets with short timeouts.
  3. Observation: Monitor the kernel for panics using dmesg or a crash dump.
# Example using hping3 to flood with SYN packets (state creation)
hping3 -S -p 80 --flood <target_ip>

Blue Team

  • Detection: Monitor for kernel panics or system crashes. Use syslog to capture panic messages.
  • Mitigation: Apply the patch immediately. If patching is not possible, consider disabling pf or reducing state table size to minimize exposure.
  • Forensics: Collect crash dumps (/var/crash) and analyze with gdb or kgdb to identify the race condition.

Indicators of Compromise (IOCs)

  • System Logs: Kernel panic messages in /var/log/messages or dmesg output containing references to pf, state, or panic.
  • Crash Dumps: Files in /var/crash with timestamps matching the attack.
  • Network Traffic: Unusual patterns of short-lived connections or high rates of state creation/expiration.

Detection Engineering

YARA Rule

rule CVE_2023_52556_PF_Race_Condition {
    meta:
        description = "Detects kernel panic logs related to CVE-2023-52556"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-52556"
    strings:
        $panic1 = "panic: pf: state" ascii wide nocase
        $panic2 = "panic: pf_state_expire" ascii wide nocase
        $panic3 = "kernel: pf: use-after-free" ascii wide nocase
    condition:
        any of them
}

Sigma Rule

title: CVE-2023-52556 - OpenBSD pf Race Condition Kernel Panic
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects kernel panic messages indicating exploitation of CVE-2023-52556
author: Valters IT
date: 2025-04-10
references:
    - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-52556
logsource:
    product: openbsd
    service: syslog
detection:
    selection:
        - EventID: 1
          Message: "*panic: pf*"
        - EventID: 1
          Message: "*panic: pf_state*"
    condition: selection
falsepositives:
    - Legitimate kernel bugs
level: high

Suricata Rule

alert tcp any any -> any any (msg:"CVE-2023-52556 - Potential pf Race Condition Trigger"; flow:to_server; flags:S; threshold:type both, track by_src, count 1000, seconds 1; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Patch: Apply OpenBSD 7.4 errata 009 using syspatch(8):

    syspatch
    

    Or manually download and apply the patch from the OpenBSD errata page.

  2. Workaround: If patching is not possible, consider:

    • Disabling pf: pfctl -d
    • Reducing state table size to limit exposure: set limit states <lower_number>
    • Implementing network segmentation to limit attack surface.
  3. Monitoring: Enable kernel crash dump collection and monitor for panics.

  4. Long-term: Keep the system updated with the latest errata.


Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

OpenBSD 7.4
pf state table
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-52556/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.