Secure Kernel User Mode Communication via Offset Linked Lists

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Establishing a secure communication channel between kernel and user mode components is challenging due to the need to avoid disclosing kernel addresses, which could compromise security techniques like address space layout randomization, while also minimizing user-to-kernel transitions and avoiding polling.

Innovation Solution

A shared memory with offset-based linked lists is used, where the kernel mode process has read-write access and the user mode process has read-only access, allowing asynchronous communication without sharing kernel pointers, and signaling through ioctl system calls or event objects.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If kernel addresses are shared with user mode processes, then communication efficiency is improved, but security is compromised due to address space layout randomization vulnerability

Engineering Contradiction:
Improvecommunication efficiencyVSAvoidsecurity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent creates a copy of the kernel message queue in user space memory, allowing user mode processes to access message data without needing kernel pointers. The kernel queue structure is replicated in user space with offset-based indexing, enabling efficient communication while maintaining security boundaries.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces an offset-based indexing mechanism as an intermediary between kernel and user mode address spaces. Instead of directly sharing kernel pointers, the system uses offset indices that reference messages through a user-space copy, acting as a secure mediator that enables communication without exposing kernel addresses.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If user mode processes poll the kernel for messages, then communication reliability is improved, but system performance deteriorates due to frequent context switches

Engineering Contradiction:
Improvecommunication reliabilityVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements a preliminary action by pre-copying the message queue structure and data from kernel space to user space before user mode processes need to access it. This advance preparation eliminates the need for polling and repeated context switches, as all message data is already available in user space when needed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the message queue into kernel-managed production area and user-accessible consumption area. The kernel maintains the original queue structure while user space receives a segmented copy with offset indices, allowing independent access without requiring continuous kernel involvement or polling.

Inventive Principle:
Principle #1Segmentation

3Speed

If kernel pointers are exposed to user mode, then message access speed is improved, but vulnerability to memory corruption exploits increases

Engineering Contradiction:
Improvemessage access speedVSAvoidmemory corruption vulnerability
Core Design Contradiction:
SpeedVSObject-affected harmful factors

Solution Approach 1:

The patent creates a user-space copy of the message queue data structure, allowing fast access to message contents without exposing kernel pointers. The copy includes offset-based indices that enable direct access to message data in user space, maintaining speed while eliminating pointer exposure vulnerabilities.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent applies local quality by creating a localized user-space representation of the message queue with offset-based indexing. This local copy provides fast access to message data while maintaining different security properties than the kernel original, allowing speed optimization in user space without compromising kernel memory security.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11977494B2Providing a secure communication channel between kernel and user mode components
Publication Date: 2024.05.07 FORTINET INC
  • US11977494B2 patent drawing
  • US11977494B2 patent drawing
  • US11977494B2 patent drawing

AI summary

Systems and methods for implementing a secure communication channel between kernel and user mode components are provided. According to an embodiment, a shared memory is provided through which a kernel mode process and a user mode process communicate. The kernel mode process is assigned read-write access to the shared memory. The user mode process is assigned read-only access to the shared memory. An offset-based linked list is implemented within the shared memory. Kernel-to-user messages are communicated from the kernel mode process to the user mode process by adding corresponding nodes to the offset-based linked list. One or more kernel-to-user messages are read by the user mode process following the offset-based linked list in order. The kernel mode process is signaled by the user mode process that a kernel-to-user message has been consumed by the user mode process through an input output control (ioctl) system call or an event object.