{"id":56028,"date":"2025-06-29T20:33:51","date_gmt":"2025-06-29T20:33:51","guid":{"rendered":""},"modified":"2025-09-07T11:38:36","modified_gmt":"2025-09-07T17:38:36","slug":"cve-2025-5865-critical-memory-corruption-vulnerability-in-rt-thread-5-1-0","status":"publish","type":"post","link":"https:\/\/www.ameeba.com\/blog\/cve-2025-5865-critical-memory-corruption-vulnerability-in-rt-thread-5-1-0\/","title":{"rendered":"<strong>CVE-2025-5865: Critical Memory Corruption Vulnerability in RT-Thread 5.1.0<\/strong>"},"content":{"rendered":"<p><strong>Overview<\/strong><\/p>\n<p>A critical vulnerability, CVE-2025-5865, has been discovered in the RT-Thread 5.1.0, a widely-used open-source real-time operating system. The vulnerability resides in the sys_select function of the file rt-thread\/components\/lwp\/lwp_syscall.c, specifically within the component Parameter Handler. The incorrect handling of the timeout argument leads to a memory corruption issue, which, if exploited, could lead to <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-49415-path-traversal-vulnerability-in-fw-gallery-with-potential-for-system-compromise\/\"  data-wpil-monitor-id=\"62576\">potential system<\/a> compromise or data leakage. Due to the <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-6191-high-severity-integer-overflow-vulnerability-in-google-chrome-s-v8-engine\/\"  data-wpil-monitor-id=\"62995\">severity of the vulnerability<\/a>, it is crucial for users and administrators to understand the risk and take immediate action to mitigate the threat.<\/p>\n<p><strong>Vulnerability Summary<\/strong><\/p>\n<p>CVE ID: CVE-2025-5865<br \/>\nSeverity: Critical (CVSS Score: 8.0)<br \/>\nAttack Vector: Local<br \/>\nPrivileges Required: Low<br \/>\nUser Interaction: None<br \/>\nImpact: <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-32878-critical-vulnerability-in-coros-pace-3-devices-leads-to-potential-system-compromise\/\"  data-wpil-monitor-id=\"63209\">Potential system<\/a> compromise and data leakage<\/p>\n<p><strong>Affected Products<\/strong><\/p><div id=\"ameeb-1946477183\" class=\"ameeb-content-2 ameeb-entity-placement\"><div style=\"border-left: 4px solid #555; padding-left: 20px; margin: 48px 0; font-family: Roboto, sans-serif; color: #ffffff; line-height: 1.6; max-width: 700px;\">\r\n  <h2 style=\"margin-top: 0; font-size: 20px; font-weight: 600; display: flex; align-items: center;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"display: inline-flex; align-items: center; margin-right: 8px;\">\r\n      <img decoding=\"async\" src=\"https:\/\/www.ameeba.com\/blog\/wp-content\/uploads\/2025\/10\/Best-App-icon-Ameeba.png\" alt=\"Ameeba Chat Icon\" style=\"width: 40px; height: 40px;\" \/>\r\n    <\/a>\r\n    A new way to communicate\r\n  <\/h2>\r\n\r\n  <p style=\"margin-bottom: 12px;\">\r\n    Ameeba Chat is built on encrypted identity, not personal profiles.\r\n  <\/p>\r\n\r\n  <p style=\"margin-bottom: 16px;\">\r\n    Message, call, share files, and coordinate with identities kept separate.\r\n  <\/p>\r\n\r\n  <ul style=\"list-style: none; padding-left: 0; margin-bottom: 20px;\">\r\n    <li>\u2022 Encrypted identity<\/li>\r\n    <li>\u2022 Ameeba Chat authenticates access<\/li>\r\n    <li>\u2022 Aliases and categories<\/li>\r\n    <li>\u2022 End-to-end encrypted chat, calls, and files<\/li>\r\n    <li>\u2022 Secure notes for sensitive information<\/li>\r\n  <\/ul>\r\n\r\n  <p style=\"font-style: italic; font-weight: 600; margin-bottom: 24px;\">\r\n    Private communication, rethought.\r\n  <\/p>\r\n\r\n  <div style=\"display: flex; flex-wrap: wrap; gap: 12px;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\/download\" style=\"background-color: #ffffff; color: #000000; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: 500;\">Download Ameeba Chat<\/a>\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"border: 1px solid #ffffff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: 500;\">Learn More<\/a>\r\n  <\/div>\r\n<\/div>\r\n<\/div>\n<p>Product | Affected Versions<\/p>\n<p>RT-Thread | 5.1.0<\/p>\n<p><strong>How the Exploit Works<\/strong><\/p>\n<p>The vulnerability originates from the mishandling of the timeout argument in the sys_select function. An attacker can manipulate this argument leading to a <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-5869-critical-memory-corruption-vulnerability-in-rt-thread-5-1-0\/\"  data-wpil-monitor-id=\"64271\">memory corruption<\/a> issue. The vendor explained that the timeout parameter should be checked for access rights in kernel mode and should only be temporarily used in <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-43189-kernel-memory-exposure-vulnerability-in-macos\/\"  data-wpil-monitor-id=\"78894\">kernel memory<\/a>. If not done correctly, the corrupted memory could be manipulated to <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-49220-pre-authentication-remote-code-execution-in-trend-micro-apex-central\/\"  data-wpil-monitor-id=\"62575\">execute arbitrary code<\/a> or expose sensitive data, leading to potential system compromise or data leakage.<\/p>\n<p><strong>Conceptual Example Code<\/strong><\/p><div id=\"ameeb-4044753001\" class=\"ameeb-content ameeb-entity-placement\"><div class=\"poptin-embedded\" data-id=\"f6b387694f681\"><\/div>\r\n\r\n\r\n\r\n\r\n\r\n<\/div>\n<p>The following is a conceptual example of how the vulnerability might be exploited. This is a pseudocode representation and not an actual code:<\/p>\n<pre><code class=\"\" data-line=\"\">#include &quot;rt-thread\/components\/lwp\/lwp_syscall.h&quot;\nvoid exploit() {\nint timeout = INT_MAX; \/\/ Manipulate the timeout value\n\/\/ Call the vulnerable function with manipulated timeout value\nint result = sys_select(..., timeout);\nif (result != 0) {\n\/\/ The memory is now corrupted, carry out the exploit\nexecute_arbitrary_code();\n}\n}<\/code><\/pre>\n<p>In the above pseudocode, the timeout variable is manipulated to a value that could lead to <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-30419-memory-corruption-vulnerability-in-ni-circuit-design-suite\/\"  data-wpil-monitor-id=\"68127\">memory corruption<\/a> when passed to the sys_select function. If the function call is successful (i.e., returns non-zero), the attacker can then proceed to exploit the <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-30417-memory-corruption-vulnerability-in-ni-circuit-design-suite\/\"  data-wpil-monitor-id=\"68204\">corrupted memory<\/a>.<\/p>\n<p><strong>Mitigation<\/strong><\/p>\n<p>The vendor has <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-50213-special-element-injection-vulnerability-in-apache-airflow-providers-snowflake\/\"  data-wpil-monitor-id=\"64008\">provided a patch to correct this vulnerability<\/a>. All users and administrators are urged to apply this patch as soon as possible. As a temporary mitigation, users can also use a Web Application Firewall (WAF) or an Intrusion Detection System (IDS) to detect and prevent <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2024-7457-macos-authorization-model-exploit-leading-to-potential-mitm-attacks\/\"  data-wpil-monitor-id=\"80048\">potential exploitation<\/a> attempts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview A critical vulnerability, CVE-2025-5865, has been discovered in the RT-Thread 5.1.0, a widely-used open-source real-time operating system. The vulnerability resides in the sys_select function of the file rt-thread\/components\/lwp\/lwp_syscall.c, specifically within the component Parameter Handler. The incorrect handling of the timeout argument leads to a memory corruption issue, which, if exploited, could lead to potential [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[1],"tags":[],"vendor":[88],"product":[95],"attack_vector":[],"asset_type":[],"severity":[],"exploit_status":[],"class_list":["post-56028","post","type-post","status-publish","format-standard","hentry","category-uncategorized","vendor-linux","product-linux-kernel"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/56028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/comments?post=56028"}],"version-history":[{"count":9,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/56028\/revisions"}],"predecessor-version":[{"id":72465,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/56028\/revisions\/72465"}],"wp:attachment":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/media?parent=56028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/categories?post=56028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/tags?post=56028"},{"taxonomy":"vendor","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/vendor?post=56028"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/product?post=56028"},{"taxonomy":"attack_vector","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/attack_vector?post=56028"},{"taxonomy":"asset_type","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/asset_type?post=56028"},{"taxonomy":"severity","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/severity?post=56028"},{"taxonomy":"exploit_status","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/exploit_status?post=56028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}