/

CVE-2026-40572

Severity:

CRITICAL RISK

(9.0)

Improper Privilege Management in NovumOS MemoryMapRange

CVE-2026-40572

Analyzed

Vulnerability type

Category:

Improper Privilege Management

CWE:

CWE-269

Impact:

Local Privilege Escalation to Kernel Mode

Severity:

CRITICAL RISK

(9.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

NovumOS versions prior to 0.24 contain an improper privilege management flaw in Syscall 15 (MemoryMapRange), which lets user-mode processes map arbitrary virtual address ranges into their own address space without checking against restricted kernel regions.

A local attacker running in Ring 3 can use this to map and modify critical kernel structures such as the IDT, GDT, TSS, or page tables, leading to reliable privilege escalation to kernel context.

Affected context

This vulnerability affects NovumOS installations that:

  • Are running versions prior to 0.24 of the 32-bit Zig/x86 operating system
  • Expose Syscall 15 (MemoryMapRange) to Ring 3 user-mode processes
  • Do not enforce checks preventing user-mode mappings of privileged kernel memory regions

The issue specifically arises in scenarios where the kernel allows user-space processes to request arbitrary virtual address mappings without validating whether those ranges intersect with critical kernel data structures.

Exploit preconditions

  • Attack surface: Local user-mode (Ring 3) code executing on the affected NovumOS instance
  • Required access: Ability to run arbitrary user-space code and invoke syscalls, including Syscall 15 (MemoryMapRange)
  • Trigger point: A user-mode request to map virtual address ranges that overlap with privileged kernel structures (e.g., IDT, GDT, TSS, page tables)
  • Why exploitation is possible: The kernel does not validate requested mappings against a list of forbidden or reserved kernel regions, allowing user-space to gain writable access to memory that should be exclusively controlled by Ring 0

Why this happens

The root cause is a failure to enforce privilege boundaries in the memory management subsystem, specifically within the MemoryMapRange syscall implementation.

The syscall trusts user-mode requests for virtual address mappings and does not verify whether the requested ranges overlap with privileged kernel memory, such as descriptor tables and paging structures.

This aligns with CWE-269: Improper Privilege Management, where insufficient separation between user and kernel resources allows lower-privileged code to obtain capabilities reserved for higher-privileged execution contexts.

Potential impact

  • Modification of kernel interrupt descriptor table (IDT) entries, allowing user processes to redirect or hijack interrupt handlers
  • Corruption of the global descriptor table (GDT) and task state segment (TSS), potentially enabling arbitrary code execution in Ring 0
  • Tampering with page tables to grant user-space access to additional kernel memory or mark pages as writable/executable
  • Escalation from a standard user process to full kernel-level privileges on the affected system
  • Potential installation of persistent kernel-level backdoors or rootkits

General mitigation guidance

Mitigation generally focuses on enforcing strict privilege boundaries within memory management and syscall handling:

  • Ensure that memory-mapping syscalls validate requested virtual address ranges against a well-defined set of forbidden and reserved kernel regions (e.g., IDT, GDT, TSS, page tables, and other critical structures).
  • Maintain a clear separation between user and kernel address spaces, such as reserving and never mapping certain address ranges into Ring 3, regardless of user requests.
  • Apply least-privilege principles to mapping flags, preventing user-mode mappings from acquiring write access to pages that back core kernel data.
  • Introduce centralized checks in the virtual memory manager so that all mapping operations pass through the same validation routines, reducing the risk of bypasses via alternative paths.
  • Consider using guard pages and consistency checks around critical kernel structures to detect or prevent unintended modifications.

How teams detect issues like this

Potential detection approaches for this class of issue include:

  • Static analysis: Search the kernel codebase for syscalls or APIs that allow user-provided addresses or ranges to be mapped, ensuring they are always vetted against a centralized validation function that enforces user/kernel separation.
  • Code review: Examine memory management and syscall interfaces for patterns where user-supplied addresses are trusted or where privilege checks are missing or inconsistent.
  • Runtime assertions: Introduce debug-mode checks that verify critical structures (IDT, GDT, TSS, page tables) reside only in privileged ranges and have not been mapped into user-space.
  • Policy enforcement: Use internal development policies requiring explicit documentation and review of any operation that crosses privilege boundaries (e.g., mapping, copying, or exposing kernel memory to user space).
  • Automated tools: Employ kernel-focused static analyzers or symbolic execution frameworks that can flag cases where user-controlled pointers or ranges reach privileged memory operations without adequate validation.

Sources

SourceLink
github.comgithub.com/MinecAnton209/NovumOS/releases/tag/v0.24
github.comgithub.com/MinecAnton209/NovumOS/security/advisories/GHSA-rg7m-6vh7-f4v2

Frequently asked

questions

By itself, this issue requires local code execution in user mode on the affected NovumOS instance. However, it can be combined with a remote bug that provides code execution in Ring 3 to achieve full kernel compromise.

The attacker needs the ability to run arbitrary user-mode code and invoke syscalls, particularly Syscall 15 (MemoryMapRange). No pre-existing elevated privileges are required beyond standard user-space execution.

The safest pattern is to centralize and enforce strict validation of all memory mappings such that user-mode requests can never map or gain write access to kernel-reserved regions, including descriptor tables, paging structures, and other privileged data. This typically involves defining non-mappable ranges and enforcing them at every memory mapping entry point.

Future development should treat user/kernel memory boundaries as a hard security invariant: design the virtual memory layout with non-negotiable reserved regions, mandate systematic validation of all user-controlled addresses and ranges, and incorporate security reviews for any code handling memory mappings, descriptor tables, or privilege transitions.

Find out what's already
exploitable in your codebase.