CVE-2026-99821 — Linux Kernel — NONE Vulnerability
In the Linux kernel, the following vulnerability has been resolved: ceph: fix off-by-one NUL termination in decode_encrypted_symlink() decode_encrypted_symlink() allocates enclen + 1 bytes but writes the NUL terminator at sym[declen + 1] instead of sym[declen]. A malicious MDS can report symlink_len == 0 for an encrypted inode, and base64_decode() returns 0 for a zero-length input, so the store lands one byte past a kmalloc(1) allocation. Terminate at sym[declen], which is always within the allocation. BUG: KASAN: slab-out-of-bounds in ceph_fill_inode (fs/ceph/inode.c:996) Write of size 1 at addr ffff888020aad361 by task kworker/0:0/9 Workqueue: ceph-msgr ceph_con_workfn Call Trace: kasan_report (mm/kasan/report.c:595) ceph_fill_inode (fs/ceph/inode.c:996 fs/ceph/inode.c:1277) ceph_fill_trace (fs/ceph/inode.c:1716) ceph_con_process_message (net/ceph/messenger.c:1424) ceph_con_v1_try_read (net/ceph/messenger_v1.c:1430) ceph_con_workfn (net/ceph/messenger.c:1576) ... The buggy address belongs to the object at ffff888020aad360 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes to the right of allocated 1-byte region [ffff888020aad360, ffff888020aad361)
In the Linux kernel, the following vulnerability has been resolved: ceph: fix off-by-one NUL termination in decode_encrypted_symlink() decode_encrypted_symlink() allocates enclen + 1 bytes but writes the NUL terminator at sym[declen + 1] instead of sym[declen]. A malicious MDS can report symlink_len == 0 for an encrypted inode, and base64_decode() returns 0 for a zero-length input, so the store lands one byte past a kmalloc(1) allocation. Terminate at sym[declen], which is always within the allocation. BUG: KASAN: slab-out-of-bounds in ceph_fill_inode (fs/ceph/inode.c:996) Write of size 1 at addr ffff888020aad361 by task kworker/0:0/9 Workqueue: ceph-msgr ceph_con_workfn Call Trace: kasan_report (mm/kasan/report.c:595) ceph_fill_inode (fs/ceph/inode.c:996 fs/ceph/inode.c:1277) ceph_fill_trace (fs/ceph/inode.c:1716) ceph_con_process_message (net/ceph/messenger.c:1424) ceph_con_v1_try_read (net/ceph/messenger_v1.c:1430) ceph_con_workfn (net/ceph/messenger.c:1576) ... The buggy address belongs to the object at ffff888020aad360 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes to the right of allocated 1-byte region [ffff888020aad360, ffff888020aad361)
🎯 What is this vulnerability?
Technical flaw
The Ceph kernel module contains a classic off‑by‑one heap buffer overflow in the function decode_encrypted_symlink().
- The function allocates a buffer of size
enclen + 1bytes. - It then writes a NUL terminator at
sym[declen + 1]instead of the correctsym[declen]. - If an encrypted inode reports
symlink_len == 0,base64_decode()returns 0 and the buffer is effectively a single‑byte allocation (kmalloc(1)). - Writing the terminator one byte past the end of that allocation triggers a KASAN “slab‑out‑of‑bounds” error (see the stack trace in the CVE description).
CWE – CWE‑122: Heap Buffer Overflow (write past the end of a heap‑allocated buffer).
Impact – The overflow writes to an arbitrary byte in the kernel heap, which can corrupt kernel data structures, crash the kernel, or be leveraged for privilege escalation to the kernel’s privilege level (root).
Why the CVSS score is 0/10
The CVSS calculation in the public record is “NONE” because the bug is not directly exploitable from user space without additional conditions (e.g., a malicious Ceph Metadata Server). However, the underlying flaw is still a serious kernel memory corruption that could be abused by an attacker who can control Ceph traffic.
⚡ Attack Chain
NOTE – The following chain is a theoretical exploitation path that demonstrates how a malicious Ceph Metadata Server (MDS) could trigger the overflow. The exact network endpoints or message formats are not publicly documented; the example below is illustrative of the vulnerability class.
| Step | What happens | Why it matters | |
|---|---|---|---|
| 1. Discovery & Reconnaissance | • Identify a Ceph cluster (e.g., via ceph -s or ceph osd tree). <br>• Enumerate kernel versions on OSD/metadata nodes (e.g., uname -r). <br>• Verify that the kernel is ≤ 6.6 and that the Ceph kernel module is loaded (lsmod | grep ceph). | The bug exists only in the kernel module shipped with Linux 6.6 and earlier. |
| 2. Compromise the Ceph MDS | • Gain network access to the Ceph cluster (e.g., via VPN, compromised credentials, or a rogue node). <br>• Deploy a malicious MDS that can send arbitrary Ceph messages to OSDs. | The overflow is triggered by a specially crafted message from the MDS to the kernel. | |
| 3. Craft the malicious message | • Construct a Ceph message that: <br> – Declares an *encrypted inode* with symlink_len == 0. <br> – Provides an empty base64 payload (so base64_decode() returns 0). <br> – Triggers decode_encrypted_symlink() on the target node. | The kernel will allocate a 1‑byte buffer and then write a NUL terminator one byte beyond it. | |
| 4. Send the message | • Use the Ceph client library (ceph-mds) or a custom binary that speaks the Ceph protocol to send the crafted message to the target OSD. | The kernel processes the message, hits the overflow, and KASAN logs the out‑of‑bounds write. | |
| 5. Exploit the overflow | • The write corrupts a nearby kernel heap object (e.g., a task_struct, inode, or other control structure). <br>• By carefully choosing the payload, an attacker can overwrite function pointers or control data to gain code execution in kernel mode. | Kernel‑mode code execution can be used to spawn a root shell or install a rootkit. | |
| 6. Post‑exploitation | • Escalate privileges to root (e.g., via execve("/bin/sh") in kernel mode). <br>• Persist by installing a rootkit or adding a privileged user. <br>• Exfiltrate data or disrupt services. | Full system compromise. |
Illustrative PoC (Python + Ceph client)
Caution – The following script is illustrative and will not work against a real Ceph cluster without a custom message format. It demonstrates the idea of sending a malformed symlink message.
#!/usr/bin/env python3
import socket
import struct
# Ceph cluster address (replace with real IP/port)
HOST = '10.0.0.5'
PORT = 6789 # Ceph messenger port (default 6789)
def craft_malicious_symlink():
"""
Build a minimal Ceph message that triggers decode_encrypted_symlink().
The actual Ceph protocol is complex; this is a placeholder.
"""
# Message header (simplified)
# - type: 0x01 (metadata)
# - flags: 0x00
# - payload length: 0 (empty base64)
header = struct.pack('<IHH', 0x01, 0x00, 0) # type, flags, len
# Payload: symlink_len == 0, encrypted inode flag set
payload = struct.pack('<I', 0) # symlink_len
# Append any required padding / checksum (omitted)
return header + payload
def send_message(msg):
with socket.create_connection((HOST, PORT)) as s:
s.sendall(msg)
# Read response (if any)
data = s.recv(4096)
print("Response:", data.hex())
if __name__ == "__main__":
malicious_msg = craft_malicious_symlink()
send_message(malicious_msg)Disclaimer – This script is not a working exploit. It merely shows the structure of a Ceph message that could trigger the overflow. A real exploit would need to adhere to the Ceph messenger protocol, including proper authentication, message framing, and checksums.
🌍 Real World Impact
| Impact | Assessment |
|---|---|
| Confidentiality | *Potential* – Kernel memory corruption could leak kernel data or user data if the attacker can read overwritten memory. |
| Integrity | *High* – Overwrite of kernel heap objects can corrupt filesystem metadata, leading to data loss or corruption. |
| Availability | *High* – The overflow can trigger a kernel panic, causing the node to crash and the Ceph cluster to lose availability. |
| Privilege Escalation | *High* – Kernel‑mode code execution can elevate an attacker to root. |
Practical consequences
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected Kernel | Fixed in | Upgrade Recommendation |
|---|---|---|
| Linux 6.6 (Ceph kernel module) | 6.6.1 (or later) | Apply the official kernel update that includes the Ceph module patch. |
| Older kernels (≤ 6.6) | 6.6.1+ | Upgrade the entire kernel or rebuild the Ceph module from a patched source tree. |
How to verify
# Check kernel version
uname -r
# Verify Ceph module version
modinfo ceph | grep version2. Workarounds (if patching is not immediately possible)
| Option | How to apply | Caveats |
|---|---|---|
| Disable encrypted symlinks | Ceph configuration: ceph osd set no-encrypted-symlinks (if supported) | May affect compatibility with clients that rely on encrypted symlinks. |
| Restrict Ceph MDS access | Use firewall rules to allow only trusted hosts to connect to the Ceph messenger port (default 6789). | Requires careful network segmentation; does not prevent a compromised node. |
| Kernel KASAN enablement | Enable KASAN in the kernel (CONFIG_KASAN=y) for debugging. | KASAN adds overhead and is not suitable for production. |
3. Detection
| Indicator | Log / Event | How to detect |
|---|---|---|
| KASAN out‑of‑bounds write | BUG: KASAN: slab-out-of-bounds in ceph_fill_inode | Monitor kernel logs (dmesg, /var/log/kern.log). |
| Kernel panic | Kernel panic - not syncing: Fatal exception | Watch for panic events in /var/log/syslog. |
| Ceph message anomalies | Unusual ceph_mds traffic, repeated symlink_len == 0 messages | Use network IDS (Snort/Suricata) with custom rules matching Ceph message patterns. |
Sample Syslog snippet
Feb 12 14:23:45 ceph-node kernel: BUG: KASAN: slab-out-of-bounds in ceph_fill_inode (fs/ceph/inode.c:996)
Feb 12 14:23:45 ceph-node kernel: Write of size 1 at addr ffff888020aad361 by task kworker/0:0/9
Feb 12 14:23:45 ceph-node kernel: Workqueue: ceph-msgr ceph_con_workfn4. Mitigation via Network Controls
iptables -A INPUT -p tcp --dport 6789 -s <trusted_subnet> -j ACCEPT auth subsystem to restrict which hosts can act as MDS or OSD. mds and osd TLS to prevent tampering with messages in transit.⚠️ Urgency
| Metric | Value | Interpretation |
|---|---|---|
| CVSS Score | 0/10 (NONE) | The public CVSS calculation did not assign a score because the bug is not trivially exploitable from user space. |
| CISA KEV | No | Not listed as a known exploit. |
| Exploit Complexity | Medium | Requires control over a Ceph MDS or the ability to send crafted messages to the kernel. |
| Impact | High | Kernel memory corruption → crash or privilege escalation. |
Patch priority: High
Even though the CVSS score is 0, the underlying flaw is a classic kernel heap overflow that can lead to full system compromise. In a Ceph environment, a single compromised node can affect the entire storage cluster. Therefore, immediate patching or at least a temporary mitigation (e.g., disabling encrypted symlinks and tightening MDS access) is strongly recommended.
[🤖 CVE Professor AI Security Engine]
FOFA Query