Linux Kernel memfd_secret Memory Management Vulnerability Leading to Kernel Panic

Vulnerability

A vulnerability in the Linux kernel's handling of memfd_secret files can cause a kernel panic when an attempt is made to grow the file's size using ftruncate. This issue arises because memfd_secret pages are not mapped through the direct map, rendering the address returned by page_address() ineffective. As a result, the normal truncation process, which involves zeroing out memory, fails and triggers a panic. The vulnerability affects Linux kernel versions prior to 5.17.0.

Impact

Exploitation of this vulnerability leads to a kernel panic, causing a system crash.

Reproduction

To reproduce this vulnerability, create a memfd_secret file and use ftruncate to resize it. After writing data to the file and unmapping it, attempt to grow the file's size with ftruncate again. This sequence of actions will reliably induce the kernel panic.

Remediation

Users can upgrade to Linux kernel version 5.17.0 or later, where this vulnerability has been addressed.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
4.3
remediation
0.0
relevance
0.0
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.