CVE-2026-0147
Executive Summary
CVE-2026-0147 is a critical remote code execution vulnerability in Samsung’s mfc_core_nal_q.c driver, specifically within the __mfc_core_nal_q_get_dec_metadata_sei_nal function. The flaw is an out-of-bounds write caused by a missing bounds check on a buffer used during SEI NAL unit metadata parsing. An unauthenticated attacker can trigger this remotely without user interaction, leading to full system compromise. No public exploit or patch is currently available, making this a high-priority zero-day for Samsung device owners.
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
Supply Chain & Package Security
This vulnerability resides in a proprietary Samsung kernel driver (MFC – Multi-Format Codec). It is not distributed via NPM, PyPI, Go, or Ruby registries. The risk is limited to Samsung devices with affected firmware versions.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 9.8 (Critical)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Vulnerability does not cross trust boundaries.
- Confidentiality, Integrity, Availability Impact: High (C:H/I:H/A:H) – Full compromise.
Deep Dive & Mechanics
The vulnerability exists in the Samsung MFC (Multi-Format Codec) kernel driver, which handles video decoding. The function __mfc_core_nal_q_get_dec_metadata_sei_nal processes Supplemental Enhancement Information (SEI) NAL units from a video stream. SEI NAL units contain metadata such as picture timing, buffering periods, and user data.
Root Cause: The function fails to validate the size of the SEI payload before writing it into a fixed-size buffer. An attacker can craft a malicious video stream with an oversized SEI NAL unit, causing an out-of-bounds write on the kernel heap.
Exploitation Path:
- The attacker sends a specially crafted video stream (e.g., via a web browser, media player, or network service) to a Samsung device.
- The MFC driver parses the SEI NAL unit without checking its length against the destination buffer.
- The out-of-bounds write corrupts adjacent kernel memory, potentially overwriting function pointers or data structures.
- The attacker can then redirect execution flow to achieve arbitrary code execution in kernel context.
Impact: Full remote code execution with kernel privileges. The attacker can install malware, exfiltrate data, or render the device inoperable.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// mfc_core_nal_q.c
void __mfc_core_nal_q_get_dec_metadata_sei_nal(struct mfc_core_nal_q *nal_q, u8 *sei_data, u32 sei_len) {
u8 metadata_buf[256]; // Fixed-size buffer
// Missing bounds check: memcpy uses attacker-controlled sei_len
memcpy(metadata_buf, sei_data, sei_len);
// Process metadata...
}
Patched Code (Expected):
// mfc_core_nal_q.c
void __mfc_core_nal_q_get_dec_metadata_sei_nal(struct mfc_core_nal_q *nal_q, u8 *sei_data, u32 sei_len) {
u8 metadata_buf[256];
if (sei_len > sizeof(metadata_buf)) {
// Reject oversized SEI NAL unit
pr_err("SEI NAL unit too large: %u > %zu\n", sei_len, sizeof(metadata_buf));
return;
}
memcpy(metadata_buf, sei_data, sei_len);
// Process metadata...
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A Samsung device with an unpatched MFC driver (e.g., Galaxy S series, Note series).
- Ability to deliver a malicious video stream (e.g., via a web page, media file, or network service).
Exploitation Steps:
- Craft Malicious Video: Use a tool like
ffmpegor a custom H.264/H.265 encoder to generate a video stream with an oversized SEI NAL unit. The SEI payload should contain shellcode or a ROP chain. - Deliver Payload: Host the video on a web server or embed it in a media file. When the victim’s device decodes the video, the vulnerability triggers.
- Gain Kernel Code Execution: The out-of-bounds write overwrites a kernel function pointer (e.g., in a nearby struct). Redirect execution to a payload that escalates privileges or installs a backdoor.
Example Payload Structure (Conceptual):
# Python script to generate malicious SEI NAL unit
import struct
def craft_sei_nal(payload):
# SEI NAL unit header: forbidden_zero_bit(1) + nal_unit_type(6) = 0x06 (SEI)
nal_header = b'\x06'
# SEI payload: payloadType (0) + payloadSize (attacker-controlled)
payload_size = len(payload)
sei_payload = b'\x00' + struct.pack('B', payload_size) + payload
# RBSP trailing bits
rbsp_trailing = b'\x80'
return nal_header + sei_payload + rbsp_trailing
# Example shellcode (placeholder)
shellcode = b'\x90' * 1000 # NOP sled + actual shellcode
malicious_nal = craft_sei_nal(shellcode)
Blue Team (Defense & Detection)
Detection Strategy:
- Monitor for anomalous SEI NAL unit sizes in video streams.
- Use kernel memory integrity checks (e.g., KASLR, SMAP/SMEP) to mitigate exploitation.
- Deploy endpoint detection and response (EDR) agents that can detect kernel heap corruption.
Lab Setup:
- Use a Samsung device with a debug kernel (e.g.,
CONFIG_DEBUG_KERNEL=y). - Enable kernel address sanitizer (KASAN) to detect out-of-bounds writes.
- Simulate the attack using a custom video player that sends oversized SEI NAL units.
Indicators of Compromise (IOCs)
- Network IOCs:
- Video streams with SEI NAL units exceeding 256 bytes.
- Unusual RTP/RTSP streams containing malformed H.264/H.265 NAL units.
- Host IOCs:
- Kernel crash logs (dmesg) showing
__mfc_core_nal_q_get_dec_metadata_sei_nalwith buffer overflow errors. - Unexpected kernel memory corruption in the MFC driver region.
- Presence of unknown kernel modules or rootkits.
- Kernel crash logs (dmesg) showing
- File IOCs:
- Media files with SEI NAL units larger than 256 bytes.
- Suspicious video files with non-standard SEI payloads.
Detection Engineering
YARA Rule
rule CVE_2026_0147_SEI_Overflow {
meta:
description = "Detects oversized SEI NAL units in H.264/H.265 streams"
author = "Valters IT"
cve = "CVE-2026-0147"
strings:
$sei_header = { 06 } // NAL unit type 6 (SEI)
$large_size = /[\x00-\xff]{257,}/ // SEI payload > 256 bytes
condition:
$sei_header at 0 and #large_size > 0
}
Sigma Rule
title: CVE-2026-0147 - Samsung MFC Driver SEI NAL Unit Overflow
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects kernel log entries indicating SEI NAL unit buffer overflow in Samsung MFC driver
author: Valters IT
logsource:
product: linux
service: kernel
detection:
selection:
- "mfc_core_nal_q: SEI NAL unit too large"
- "mfc_core_nal_q: buffer overflow detected"
condition: selection
falsepositives:
- None expected
level: critical
Suricata Rule
alert ip any any -> any any (msg:"CVE-2026-0147 - Samsung MFC Driver SEI NAL Unit Overflow"; content:"|06|"; offset:0; depth:1; content:"|00|"; distance:1; within:1; byte_test:1,>,256,2; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Apply Vendor Patch: Monitor Samsung’s security bulletin for an official patch. Apply it as soon as available.
- Disable MFC Driver: If not required, blacklist the
mfc_core_nal_qkernel module usingmodprobe.blacklist=mfc_core_nal_q. - Network Filtering: Block or inspect video streams at the network perimeter for oversized SEI NAL units.
Long-Term Mitigations:
- Enable kernel hardening features (KASLR, SMAP, SMEP, CFI).
- Use a kernel with CONFIG_SLAB_FREELIST_RANDOM and CONFIG_SLAB_MERGE_DEFAULT=n to reduce heap exploitation reliability.
- Deploy an IDS/IPS with custom Suricata rules to detect exploitation attempts.
Workarounds:
- Disable hardware video decoding in browsers and media players until a patch is applied.
- Use software decoding (e.g., libavcodec) instead of the MFC driver.
Valters IT