CVE-2025-5865
📋 TL;DR
CVE-2025-5865 is a critical memory corruption vulnerability in RT-Thread 5.1.0's sys_select function. Attackers can exploit improper timeout parameter validation to corrupt kernel memory, potentially leading to system crashes or arbitrary code execution. This affects systems running RT-Thread 5.1.0 with the vulnerable component enabled.
💻 Affected Systems
- RT-Thread
📦 What is this software?
Rt Thread by Rt Thread
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with kernel privileges leading to complete system compromise, data theft, or persistent backdoor installation.
Likely Case
System crash/denial-of-service through memory corruption, potentially allowing privilege escalation in multi-user environments.
If Mitigated
System instability or crashes without code execution if memory protections are in place.
🎯 Exploit Status
Exploitation requires knowledge of memory layout and kernel structures. No public exploits available as of analysis.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Check GitHub issue for specific commit
Vendor Advisory: https://github.com/RT-Thread/rt-thread/issues/10298
Restart Required: Yes
Instructions:
1. Update RT-Thread to latest version
2. Apply patch from GitHub issue #10298
3. Rebuild and redeploy system
4. Restart affected devices
🔧 Temporary Workarounds
Disable LWP component
allDisable the Lightweight Process component if not required
Modify RT-Thread configuration to disable LWP support
Input validation wrapper
allAdd parameter validation before sys_select calls
Implement timeout parameter validation in application code
🧯 If You Can't Patch
- Isolate vulnerable systems in network segments
- Implement strict access controls to prevent unauthorized access
🔍 How to Verify
Check if Vulnerable:
Check RT-Thread version and configuration for LWP component
Check Version:
rt-thread --version or check system configuration
Verify Fix Applied:
Verify RT-Thread version is updated and LWP component has proper timeout validation
📡 Detection & Monitoring
Log Indicators:
- Kernel panic logs
- Memory corruption errors
- Unexpected system reboots
Network Indicators:
- Unusual system call patterns to sys_select
SIEM Query:
Search for 'sys_select' system calls with malformed timeout parameters