Skip to content
AI Codex Exploits Samsung TV Driver Flaw to Gain Root Access

AI Codex Exploits Samsung TV Driver Flaw to Gain Root Access

Gbhackers • April 14, 2026

A new experiment has shown how an AI coding assistant, Codex, can independently escalate privileges on a Samsung Smart TV by abusing dangerously exposed kernel drivers in Samsung’s KantS2 Tizen firmware.

Working from an existing browser foothold, Codex chained together source-code auditing, physical memory access, and credential tampering to turn a sandboxed browser process into root on a live device.

A separate controller host built static ARMv7 binaries, served them over HTTP, and injected commands into an already-running shell on the TV via tmux, with output recovered from logs instead of an interactive terminal.

Because Samsung’s Unauthorized Execution Prevention blocks unsigned binaries from disk, the team used a memfd-based wrapper to execute binaries purely from memory.

Researchers began by executing code within the TV’s browser app , running as user ID 5001 on Samsung’s Tizen-based KantS2 platform with a 4.1.10 Linux kernel.

Codex was given the matching KantS2 source tree, along with live system facts such as device nodes, loaded modules, and kernel boot parameters, and tasked with finding a reachable privilege-escalation path “from this browser shell to root.”

It had to verify that any bug existed in the source, was present on the actual TV, and was reachable from the unprivileged browser context.

Codex quickly focused on a family of world-writable character devices ntkhdma, ntksys, and ntkxdma exposed under /dev and backed by Novatek-related kernel drivers in the KantS2 tree.

A udev rule explicitly granted mode 0666 to /dev/ntksys, exposing a powerful memory-management interface to any process on the system.

In the ntksys driver, user space controls a structure (ST_SYS_MEM_INFO) that includes a physical base (u32Start) and size (u32Size), which are stored in a global table via an ioctl without any validation of the requested physical range.

During mmap, the driver uses the table index from vm_pgoff and passes the attacker-controlled physical frame number directly to vk_remap_pfn_range, effectively creating a physmap primitive: arbitrary mapping of physical memory into user space without privilege checks.

A companion driver, ntkhdma, further helped by leaking a trusted physical address of a DMA buffer via an ioctl, giving Codex a safe target to prove it could map and modify a real physical page from the browser shell.

With /proc/iomem blocked on the TV, Codex pivoted to parsing the Linux kernel command line from /proc/cmdline to reconstruct RAM windows from parameters such as “mem=400M@32M mem=256M@512M mem=192M@2048M.”

It wrote a helper to query /dev/ntkhdma for the DMA buffer address, then a second helper to register that address via ntksys and map it back into user space via mmap, successfully reading and writing the device’s DMA memory.

From there, Codex shifted to a data-only privilege escalation: scanning the recovered RAM ranges for the browser process’s cred structure, identified by its uid=5001 and gid=100 pattern, then overwriting those fields to zero to impersonate root.

Once the targeted cred objects were patched, Codex launched /bin/sh from the browser context and verified it now ran as uid=0 with root group memberships including audio, video, and privileged storage roles.

Throughout the session, human operators had to redirect Codex when it misunderstood network roles occasionally, froze the TV, or attempted impractical strategies, highlighting that effective AI-driven exploitation still benefits from interactive guidance rather than one-shot prompts.

However, once the operating loop was established inspect logs and source, build helpers, deploy via memfd, validate, then iterate Codex independently selected the ntk driver family, proved the physmap primitive, and discovered the cred-overwrite path without being told to target kernel credentials.

The case underscores a critical design flaw: exposing powerful memory-management drivers like ntksys as world-writable interfaces on consumer devices dramatically lowers the bar for post-exploitation privilege escalation.

It also shows how AI tools can accelerate exploit development from an existing foothold, raising defensive urgency around driver hardening, strict device-node permissions, and minimizing exposed kernel attack surfaces in smart TV and IoT platforms.

Mayura Kathir is a cybersecurity reporter at GBHackers News, covering daily incidents including data breaches, malware attacks, cybercrime, vulnerabilities, zero-day exploits, and more.

An autonomous AI security agent developed by Strix has discovered a critical authentication bypass vulnerability…

The Cybersecurity and Infrastructure Security Agency (CISA) has issued a high-priority alert regarding two actively…

Hackers are abusing Obsidian’s Shell Commands plugin and shared cloud vaults to deliver a new…

Cybersecurity researchers have highlighted a critical vulnerability in ShowDoc, a widely used online document-sharing platform…

SAP released its monthly Security Patch Day updates, addressing 19 new security notes and one…

Hackers are shifting away from email phishing and are directly targeting Okta and other identity…

Extracted Entities

Attack Types (1)

Companies (1)

Platforms (2)

Tools (1)