CVE-2026-139789

hugetlbfs: enforce F_SEAL_EXEC in setattr

Published Nov 30, 2026 CVSS 3.1 · 3.3 Low EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

hugetlbfs: enforce F_SEAL_EXEC in setattr

F_SEAL_EXEC is enforced by shmem_setattr(), but hugetlbfs_setattr() does
not check it. As a result, fchmod() can change the execute bits of a
sealed hugetlbfs memfd.

Use memfd_check_seals_mode() in hugetlbfs_setattr() to reject changes
to execute bits when F_SEAL_EXEC is set.

This also fixes the memfd_test hugetlbfs SEAL-EXEC subtest, where
fchmod() incorrectly succeeded after applying F_SEAL_EXEC.

[ david: use common helper; fixup Fixes:; check only regular files ]

Analysis

AI-generated

Technical impact

The vulnerability exists in the Linux kernel’s hugetlbfs subsystem, specifically in hugetlbfs_setattr. While the kernel enforces the F_SEAL_EXEC seal in shmem_setattr, the hugetlbfs implementation mistakenly omits this check, allowing a caller to fchmod a hugetlbfs memfd and flip its execute bits even when the seal is present. The flaw is an improper authorization check (CWE-284) that can force a non‑executable file to become executable within the calling process’s context, enabling execution of arbitrary code and potentially escalating privileges within that process.

Affected Systems

All Linux kernel versions that have not integrated the fixed commit (e.g., the revisions referenced at https://git.kernel.org/stable/c/03ad7616aa417…) are affected. The issue is confined to the hugetlbfs filesystem, which is compiled into most distributions by default. Administrators should verify that their running kernel contains the patch commit or is at least newer than the vulnerable commit.

Risk and Exploitability

The vulnerability is local; an attacker must be able to open or attach to a hugetlbfs memfd and invoke fchmod on it, a capability normally restricted to the owning process. This can lead to execution of arbitrary code with the same privileges as the process, but the impact does not naturally cross privilege boundaries. The EPSS score, less than 1%, indicates a very low probability of exploitation. The CVSS score is not provided, and the vulnerability is not listed in the CISA KEV catalog. Because the flaw bypasses a kernel security seal, it is treated as critical and warrants immediate patching. The likely attack vector is local via fchmod on a hugetlbfs descriptor, inferred from the nature of the bug and the lack of explicit remote exploitation details.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that includes the patch enforcing F_SEAL_EXEC in hugetlbfs_setattr
  • Restrict usage of fchmod on hugetlbfs descriptors by tightening file permissions or using seccomp to block the syscall for unprivileged processes
  • Configure SELinux, AppArmor, or similar mandatory access control to deny fchmod on hugetlbfs file descriptors for untrusted users
  • If hugetlbfs is not required, consider disabling it by removing the hugetlbfs module or configuring the kernel to not mount hugetlbfs

Generated by OpenCVE AI on December 1, 2026 at 16:33 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-279
References
Metrics threat_severity

None

cvssV3_1

{'score': 3.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N'}

threat_severity

Low

Type Values Removed Values Added
Weaknesses CWE-284
Type Values Removed Values Added
Weaknesses CWE-284
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: hugetlbfs: enforce F_SEAL_EXEC in setattr F_SEAL_EXEC is enforced by shmem_setattr(), but hugetlbfs_setattr() does not check it. As a result, fchmod() can change the execute bits of a sealed hugetlbfs memfd. Use memfd_check_seals_mode() in hugetlbfs_setattr() to reject changes to execute bits when F_SEAL_EXEC is set. This also fixes the memfd_test hugetlbfs SEAL-EXEC subtest, where fchmod() incorrectly succeeded after applying F_SEAL_EXEC. [ david: use common helper; fixup Fixes:; check only regular files ]
Title hugetlbfs: enforce F_SEAL_EXEC in setattr
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-279

    Incorrect Execution-Assigned Permissions

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:38 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:20 PM
Modified
Nov 30, 2026, 2:20 PM
Severity
Low
Public date
Nov 30, 2026, 1:38 PM