CVE-2021-35000
Executive Summary
CVE-2021-35000 is a local information disclosure vulnerability in the OpenBSD kernel's multicast routing implementation. The flaw stems from uninitialized memory access, allowing a local attacker with low privileges to read sensitive kernel memory. While the CVSS score is low (3.3), the vulnerability can be chained with other exploits to achieve privilege escalation and arbitrary code execution in the kernel context. No public proof-of-concept or patch details are currently available.
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.
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.3 (Low)
- Attack Vector: Local (AV:L)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: Low (C:L)
- Integrity Impact: None (I:N)
- Availability Impact: None (A:N)
Threat Level: Low. Exploitation requires local access and low privileges. The primary risk is information disclosure, which can aid in further attacks.
Deep Dive & Mechanics
The vulnerability resides in the OpenBSD kernel's multicast routing code. When processing multicast routing requests, the kernel fails to properly initialize memory buffers before using them. This uninitialized memory may contain residual data from previous kernel operations, including sensitive information such as pointers, cryptographic keys, or other process data.
Attack Flow:
- An attacker gains low-privileged code execution on the target OpenBSD system.
- The attacker triggers the vulnerable multicast routing code path, causing the kernel to expose uninitialized memory.
- The attacker reads the disclosed data, potentially extracting sensitive kernel information.
- This information can be used to bypass kernel protections (e.g., KASLR) or craft further exploits for privilege escalation.
Vulnerable vs. Patched Code
No specific code diff is publicly available. The vulnerability is caused by missing memory initialization (e.g., memset or bzero) before using a buffer in the multicast routing handler. A patched version would ensure all allocated memory is zeroed before use.
Vulnerable Pattern (pseudocode):
void handle_multicast_route(struct mbuf *m) {
struct some_struct data;
// data is not initialized
process_data(&data); // uses uninitialized data
}
Patched Pattern (pseudocode):
void handle_multicast_route(struct mbuf *m) {
struct some_struct data;
memset(&data, 0, sizeof(data)); // initialize memory
process_data(&data);
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Local access to an OpenBSD system (any version with multicast routing enabled).
- Ability to execute low-privileged code (e.g., via a compromised user account).
Exploitation Steps:
- Reconnaissance: Identify the vulnerable kernel module (
routeormulticast). - Trigger: Write a small C program that sends crafted multicast routing requests to the kernel (e.g., using
ioctlorsetsockoptwithIP_ADD_MEMBERSHIP). - Data Extraction: Read the returned data from the kernel, which may contain uninitialized memory.
- Analysis: Parse the leaked data for sensitive information (e.g., kernel pointers, stack canaries).
Example Trigger Code (Conceptual):
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if.h>
#include <stdio.h>
#include <string.h>
int main() {
int sock = socket(AF_INET, SOCK_DGRAM, 0);
struct ip_mreq mreq;
mreq.imr_multiaddr.s_addr = inet_addr("224.0.0.1");
mreq.imr_interface.s_addr = htonl(INADDR_ANY);
setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
// The kernel may leak data in the process
return 0;
}
Blue Team
Detection:
- Monitor for unusual multicast routing requests from low-privileged processes.
- Use kernel auditing to log
setsockoptcalls withIP_ADD_MEMBERSHIPor similar. - Look for repeated attempts to read kernel memory via
/dev/kmemor similar interfaces.
Mitigation:
- Apply kernel patches as soon as available.
- Restrict local user access to the minimum necessary.
- Use kernel hardening features (e.g.,
kern.securelevel).
Indicators of Compromise (IOCs)
- File Hashes: None available.
- Network Indicators: None (local vulnerability).
- Process Behavior: Unusual multicast routing requests from non-network daemons.
- Kernel Logs: Entries related to multicast routing errors or unexpected memory access.
Detection Engineering
YARA Rule
rule CVE_2021_35000_OpenBSD_Multicast_Leak {
meta:
description = "Detects potential exploitation of CVE-2021-35000 via uninitialized memory in multicast routing"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2021-35000"
strings:
$s1 = "IP_ADD_MEMBERSHIP" ascii wide nocase
$s2 = "setsockopt" ascii wide nocase
$s3 = "multicast" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: CVE-2021-35000 OpenBSD Multicast Routing Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2021-35000 by triggering multicast routing with low privileges
author: Valters IT
date: 2025-04-10
logsource:
product: openbsd
service: kernel
detection:
selection:
EventID: 0x1234 # Hypothetical kernel audit event
ProcessName: '*'
Syscall: 'setsockopt'
Protocol: 'IPPROTO_IP'
Option: 'IP_ADD_MEMBERSHIP'
condition: selection
falsepositives:
- Legitimate multicast applications
level: medium
Suricata Rule
alert ip any any -> any any (msg:"CVE-2021-35000 OpenBSD Multicast Routing Exploit Attempt"; content:"|08 00 00 00|"; offset:0; depth:4; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
- Patch: Apply the official OpenBSD patch when released. Monitor the OpenBSD errata page.
- Workaround: Disable multicast routing if not needed (
sysctl -w net.inet.ip.mforwarding=0). - Access Control: Restrict local user accounts and use principle of least privilege.
- Monitoring: Enable kernel auditing for multicast-related syscalls.
- Hardening: Increase
kern.securelevelto prevent kernel memory access.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.