{"id":6355,"date":"2024-06-10T13:28:04","date_gmt":"2024-06-10T20:28:04","guid":{"rendered":"https:\/\/objectsecurity.com\/?p=6355"},"modified":"2024-11-15T15:03:53","modified_gmt":"2024-11-15T23:03:53","slug":"threadxcves","status":"publish","type":"post","link":"https:\/\/objectsecurity.com\/threadxcves\/","title":{"rendered":"A Deep Dive into the Recent Eclipse ThreadX CVEs: Who\u2019s Affected?"},"content":{"rendered":"<p><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container has-pattern-background has-mask-background nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:1872px;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-1\"><p><strong>This blog post discusses two newly discovered CVEs affecting Eclipse ThreadX before version 6.4.0: CVE-2024-2214 and CVE-2024-2212. Discovered by Humanativa Group, these vulnerabilities involve low-level memory exploits, including buffer overflows and integer wraparounds. Eclipse ThreadX is an open-source real-time operating system for embedded devices, formerly known as Azure RTOS. The blog emphasizes the importance of properly understanding and communicating the scope of vulnerabilities in popular software. Tools like <a href=\"https:\/\/objectsecurity.com\">ObjectSecurity&#8217;s BinLens\u2122<\/a> (formerly ObjectSecurity OT.AI Platform) can help detect and remediate such vulnerabilities efficiently.<\/strong><\/p>\n<p>Two new CVEs (CVE-2024-2214, CVE-2024-2212) affecting Eclipse ThreadX at versions before 6.4.0 were recently discovered by Humanativa Group on May 26th, 2024. You can find Humanativa\u2019s blog post about the disclosure <a href=\"https:\/\/security.humanativaspa.it\/multiple-vulnerabilities-in-eclipse-threadx\/\">here<\/a>. Furthermore, GitHub user 0xdea documents the findings <a href=\"https:\/\/github.com\/0xdea\/advisories\/blob\/master\/HNS-2024-06-threadx.txt\">here<\/a>. These vulnerabilities both involve low-level memory exploits (buffer overflows and integer wrap arounds).<\/p>\n<p>When Microsoft transferred ownership of Azure RTOS to the Eclipse foundation, the project was rebranded as Eclipse ThreadX. Eclipse ThreadX is an open-source real time operating system (RTOS) for embedded devices. You can view the GitHub repository for Eclipse ThreadX <a href=\"https:\/\/github.com\/eclipse-threadx\/threadx\">here<\/a>. Eclipse ThreadX is a widely adopted dependency used in many embedded systems and IoT devices. Vulnerabilities found in Eclipse ThreadX are positioned to cause a high degree of damage, should they go unaddressed.<\/p>\n<p>I felt that the existing 3rd-party articles documenting these CVEs insufficiently describe their details, at least those details that I am interested in. Most notably, I could not find information regarding what devices are affected by these CVEs. With this context, this blog post seeks to deep dive into these CVEs, figuring out how they work and what embedded\/IoT devices they affect.<\/p>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-2 fusion-flex-container has-pattern-background has-mask-background nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:1872px;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-2\"><h2>CVE-2024-2214<\/h2>\n<\/div><div class=\"fusion-text fusion-text-3\"><p>This CVE has been published to the NVD <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-2214\">here<\/a>. The NVD describes this CVE as:<\/p>\n<blockquote>\n<p><em>In Eclipse ThreadX before version 6.4.0, the _Mtxinit() function in the Xtensa port was missing an array size check causing a memory overwrite. The affected file was ports\/xtensa\/xcc\/src\/tx_clib_lock.c.<\/em><\/p>\n<\/blockquote>\n<p>As I already mentioned, this vulnerability affects Eclipse ThreadX versions before 6.4.0. You can view the commit which fixes the vulnerability <a href=\"https:\/\/github.com\/eclipse-threadx\/threadx\/commit\/39f3c86c61ec478720bac9fca8f17ccedb8f052b\">here<\/a>. This commit is included in version 6.4.0 of Eclipse ThreadX, resolving the vulnerability.<\/p>\n<p>When reading this CVE\u2019s description, I had a few questions. What is the <code>_Mtxinit()<\/code> function? What is an Xtensa port? What array check was missed to cause the memory overwrite?<\/p>\n<p>Xtensa is a type of microprocessor developed by Tensilica Inc. You can read about them <a href=\"https:\/\/www.cadence.com\/en_US\/home\/tools\/silicon-solutions\/compute-ip\/tensilica-xtensa-controllers-and-extensible-processors.html\">here<\/a>. Eclipse ThreadX has several ports. These ports are directories which include architecture and compiler specific source code files. This is illustrated in the source code directory breakdown below:<\/p>\n<\/div><div class=\"fusion-image-element \" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-1 hover-type-none\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"624\" height=\"318\" title=\"threadx_dirs\" src=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/threadx_dirs.png?resize=624%2C318&#038;ssl=1\" alt class=\"img-responsive wp-image-5710\" srcset=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/threadx_dirs.png?resize=200%2C102&amp;ssl=1 200w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/threadx_dirs.png?resize=300%2C153&amp;ssl=1 300w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/threadx_dirs.png?resize=400%2C204&amp;ssl=1 400w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/threadx_dirs.png?resize=500%2C255&amp;ssl=1 500w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/threadx_dirs.png?resize=600%2C306&amp;ssl=1 600w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/threadx_dirs.png?fit=624%2C318&amp;ssl=1 624w\" sizes=\"(max-width: 1075px) 100vw, (max-width: 640px) 100vw, 624px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-4\"><h6 style=\"text-align: center;\"><em>Eclipse ThreadX Source Code Directory Breakdown<\/em><\/h6>\n<\/div><div class=\"fusion-text fusion-text-5\"><p>The source code in these ports is only compiled into the final build of Eclipse ThreadX if the build is targeting the corresponding architecture and compiler. Because CVE-2024-2214 is found in <code>ports\/xtensa\/xcc\/src\/tx_clib_lock.c<\/code>, it will only be compiled into builds targeting Xtensa processors.<\/p>\n<p>As its name suggests, Eclipse ThreadX supports multithreading. When used as a dependency, it allows embedded systems to spawn multiple threads of processing at once. When two threads attempt to access a shared resource simultaneously, undefined behavior can occur, causing program crashes and other issues. To prevent this, mutexes (mutually exclusive flags) are used. Mutexes prevent multiple threads from accessing a shared resource at once. Eclipse ThreadX allows developers to create mutexs for this purpose.<\/p>\n<p>The <code>_Mtxinit()<\/code> function is called whenever a mutex is initiated (hence the name) by the Xtensa C library or newlib C library that is distributed with Xtensa Tools. Let\u2019s look at <code>_Mtxinit()<\/code>\u2019s source code:<\/p>\n<\/div><div class=\"fusion-image-element \" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-2 hover-type-none\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"624\" height=\"636\" title=\"src1\" src=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src1.png?resize=624%2C636&#038;ssl=1\" alt class=\"img-responsive wp-image-5713\" srcset=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src1.png?resize=66%2C66&amp;ssl=1 66w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src1.png?resize=200%2C204&amp;ssl=1 200w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src1.png?resize=294%2C300&amp;ssl=1 294w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src1.png?resize=400%2C408&amp;ssl=1 400w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src1.png?resize=500%2C510&amp;ssl=1 500w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src1.png?resize=600%2C612&amp;ssl=1 600w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src1.png?fit=624%2C636&amp;ssl=1 624w\" sizes=\"(max-width: 1075px) 100vw, (max-width: 640px) 100vw, 624px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-6\"><h6 style=\"text-align: center;\">_Mtxinit() Source Code<\/h6>\n<\/div><div class=\"fusion-text fusion-text-7\"><p>When called, <code>_Mtxinit()<\/code> initializes a new mutex using the <code>tx_mutex_create<\/code> function defined by the ThreadX API. This mutex is stored in the <code>xclib_locks<\/code> global variable. <code>xclib_locks<\/code> is an array of size <code>XT_NUM_CLIB_LOCKS<\/code>, meaning it can only store a finite number of mutexes at once.<\/p>\n<p>Whenever <code>_Mtxinit()<\/code> is called, it increments the counter called <code>lcnt<\/code>. <code>lcnt<\/code> can be incremented to a value higher than the size of <code>xclib_locks<\/code>. When this happens, there is a memory overwrite, causing the CVE. Memory overwrites can cause undefined behavior and can be manipulated by savvy attackers to do damage. This particular CVE can be exploited if an attacker is able to initialize a large number of mutexes simultaneously, if such a thing is possible in upstream code.<\/p>\n<p>Funnily enough, the developer who wrote this code made a note of this issue, labelling it <code>\/* Fatal error *\/<\/code>, as you can see in the source code. The developer even included an if statement to check for the condition where lcnt exceeds the size of <code>xclib_locks<\/code>, although they didn\u2019t programmatically address the issue in any way.<\/p>\n<p>The fix for this CVE was rather trivial, as is shown in the commit mentioned earlier:<\/p>\n<\/div><div class=\"fusion-image-element \" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-3 hover-type-none\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"624\" height=\"139\" title=\"src2\" src=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src2.png?resize=624%2C139&#038;ssl=1\" alt class=\"img-responsive wp-image-5715\" srcset=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src2.png?resize=200%2C45&amp;ssl=1 200w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src2.png?resize=300%2C67&amp;ssl=1 300w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src2.png?resize=400%2C89&amp;ssl=1 400w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src2.png?resize=500%2C111&amp;ssl=1 500w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src2.png?resize=600%2C134&amp;ssl=1 600w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src2.png?fit=624%2C139&amp;ssl=1 624w\" sizes=\"(max-width: 1075px) 100vw, (max-width: 640px) 100vw, 624px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-8\"><h6 style=\"text-align: center;\">_Mtxinit() Source Code &#8211; Fixed<\/h6>\n<\/div><div class=\"fusion-text fusion-text-9\"><p>After this investigation, I summarized what devices this CVE affects in the following statement:<\/p>\n<blockquote>\n<p><em>CVE-2024-2214 only affects embedded devices that are running Eclipse ThreadX before version 6.4.0, have Xtensa processors, and create many mutexes simultaneously.<\/em><\/p>\n<\/blockquote>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-3 fusion-flex-container has-pattern-background has-mask-background nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:1872px;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-2 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-10\"><h2>CVE-2024-2212<\/h2>\n<\/div><div class=\"fusion-text fusion-text-11\"><p>The second CVE has been published to the NVD <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-2212\">here<\/a>. The NVD describes this CVE as:<\/p>\n<blockquote>\n<p><em>In Eclipse ThreadX before 6.4.0, xQueueCreate() and xQueueCreateSet() functions from the FreeRTOS compatibility API (utility\/rtos_compatibility_layers\/FreeRTOS\/tx_freertos.c) were missing parameter checks. This could lead to integer wraparound, under-allocations and heap buffer overflows.<\/em><\/p>\n<\/blockquote>\n<p>The commit addressing this vulnerability (which is included in version 6.4.0 of Eclipse ThreadX) can be found <a href=\"https:\/\/github.com\/eclipse-threadx\/threadx\/commit\/9f3e35d3dcacfac3eed6df8fb8cc6ed9a5a680d5\">here<\/a>.<\/p>\n<p>Just like before, when reading the description of this CVE, I had a couple questions. What is the FreeRTOS compatibility API? What are the <code>xQueueCreate()<\/code> and <code>xQueueCreateSet()<\/code> functions? What parameter checks were missing?<\/p>\n<p>To help ease migration to ThreadX RTOS, Eclipse ThreadX supports adaptation layers for various legacy RTOS APIs, one of which is FreeRTOS. Programs which depend upon the FreeRTOS API may instead use Eclipse ThreadX under the hood by interacting with this FreeRTOS compatibility API.<\/p>\n<p>The FreeRTOS compatibility API implements various functions defined by the original FreeRTOS specification. Two of these functions are <code>xQueueCreate()<\/code> and <code>xQueueCreateSet()<\/code>. FreeRTOS allows for the creation of tasks and queues. Tasks are similar to threads, and queues enable messages to be passed between tasks. Under the hood, ThreadX uses its own internal data structures (i.e., threads, semaphores, etc.) to support the FreeRTOS API functions such as <code>xQueueCreate()<\/code> and <code>xQueueCreateSet()<\/code>. You can read more about FreeRTOS queues <a href=\"https:\/\/www.freertos.org\/Embedded-RTOS-Queues.html\">here<\/a>.<\/p>\n<p>The way <code>xQueueCreate()<\/code> and <code>xQueueCreateSet()<\/code> were implemented in the ThreadX FreeRTOS adaptation layer allows for integer wraparounds. An integer wraparound occurs when an integer value is incremented to a value that is too large to store in the associated bit representation. When this occurs, increasing the value will cause a large number to become a very small number.<\/p>\n<p>Let\u2019s look at the source code for <code>xQueueCreate()<\/code>.<\/p>\n<\/div><div class=\"fusion-image-element \" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-4 hover-type-none\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"624\" height=\"404\" title=\"src3\" src=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src3.png?resize=624%2C404&#038;ssl=1\" alt class=\"img-responsive wp-image-5717\" srcset=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src3.png?resize=200%2C129&amp;ssl=1 200w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src3.png?resize=300%2C194&amp;ssl=1 300w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src3.png?resize=400%2C259&amp;ssl=1 400w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src3.png?resize=500%2C324&amp;ssl=1 500w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src3.png?resize=600%2C388&amp;ssl=1 600w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src3.png?fit=624%2C404&amp;ssl=1 624w\" sizes=\"(max-width: 1075px) 100vw, (max-width: 640px) 100vw, 624px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-12\"><h6 style=\"text-align: center;\">xQueueCreate() Source Code<\/h6>\n<\/div><div class=\"fusion-text fusion-text-13\"><p>On line 1536, <code>mem_size<\/code> amount of memory is allocated to hold the queue being created. On line 1534, we see that <code>mem_size<\/code> is defined as <code>uxQueueLength*(uxItemSize)<\/code> (the length of the queue multiplied by the size of a single item in the queue). Because these arguments are controlled by the caller of the function, the caller can opt to set both values to be very large. When the values are made too large, this multiplication causes an integer wraparound. This integer wraparound results in a very small value for <code>mem_size<\/code>, a value that is much smaller than that which is needed to hold the queue being created.<\/p>\n<p>The source code for <code>xQueueCreateSet()<\/code> has this same issue, so I am not including its source code in this blog post.<\/p>\n<p>Just like before, the fix was rather trivial. The developer instead returns early from the function if the queue length is large enough to cause an integer wraparound.<\/p>\n<\/div><div class=\"fusion-image-element \" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\" fusion-imageframe imageframe-none imageframe-5 hover-type-none\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"624\" height=\"178\" title=\"src4\" src=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src4.png?resize=624%2C178&#038;ssl=1\" alt class=\"img-responsive wp-image-5718\" srcset=\"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src4.png?resize=200%2C57&amp;ssl=1 200w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src4.png?resize=300%2C86&amp;ssl=1 300w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src4.png?resize=400%2C114&amp;ssl=1 400w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src4.png?resize=500%2C143&amp;ssl=1 500w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src4.png?resize=600%2C171&amp;ssl=1 600w, https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/src4.png?fit=624%2C178&amp;ssl=1 624w\" sizes=\"(max-width: 1075px) 100vw, (max-width: 640px) 100vw, 624px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-14\"><h6 style=\"text-align: center;\">xQueueCreate() Source Code &#8211; Fixed<\/h6>\n<\/div><div class=\"fusion-text fusion-text-15\"><p>Because <code>xCreateQueue()<\/code> and <code>xCreateQueueSet()<\/code> are part of an external API to be used by upstream code, the values of those parameters passed to the vulnerable functions depend on the upstream code. We can summarize what devices are affected by this CVE as such:<\/p>\n<blockquote>\n<p><em>CVE-2024-2212 only affects embedded devices that are running Eclipse ThreadX before version 6.4.0 and are running applications which use the FreeRTOS compatibility layer API to create queues.<\/em><\/p>\n<\/blockquote>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-4 fusion-flex-container has-pattern-background has-mask-background nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:1872px;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-3 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-16\"><h2>Conclusion<\/h2>\n<\/div><div class=\"fusion-text fusion-text-17\"><p>When news organizations write articles about CVEs, they sometimes under or overrepresent the number of devices that are affected. In this case, the devices affected represent only a small percentage of all devices running Eclipse ThreadX. However, in the future this could be reversed: the number of devices affected by a vulnerability could be greater than what popular reporting indicates. For this reason, we urge individuals to seek out reliable and detailed sources of information while researching a CVE that might affect them.<\/p>\n<p>We place a lot of trust in open-source software, and open-source software is not immune to obvious, unpublished vulnerabilities. Detecting all these unpublished vulnerabilities manually can be quite difficult if not impossible. <a href=\"https:\/\/objectsecurity.com\">ObjectSecurity&#8217;s BinLens\u2122<\/a> (formerly ObjectSecurity OT.AI Platform) detects memory vulnerabilities like those written about here, before they are published to the National Vulnerability Database as CVEs. With <a href=\"https:\/\/objectsecurity.com\">ObjectSecurity&#8217;s BinLens\u2122<\/a> (formerly ObjectSecurity OT.AI Platform), you can detect binary weaknesses and vulnerabilities in a reliable, fast, automated way.<\/p>\n<\/div><div style=\"text-align:center;\"><a class=\"fusion-button button-flat button-xlarge button-default fusion-button-default button-1 fusion-button-default-span fusion-button-default-type\" style=\"--button-border-radius-top-left:2px;--button-border-radius-top-right:2px;--button-border-radius-bottom-right:2px;--button-border-radius-bottom-left:2px;\" target=\"_self\" href=\"https:\/\/objectsecurity.com\/contact-us\/\"><span class=\"fusion-button-text\">Contact Us To Learn More<\/span><\/a><\/div><\/div><\/div><\/div><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":12,"featured_media":5726,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[63,90,89,39,34,87],"tags":[],"class_list":["post-6355","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-binlens","category-education","category-landingpage","category-ot-ics-cybersecurity","category-reverse-engineering","category-tech"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A Deep Dive into the Recent Eclipse ThreadX CVEs: Who\u2019s Affected? - ObjectSecurity<\/title>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/\"},\"author\":{\"name\":\"Trevor Thomas\",\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/#\\\/schema\\\/person\\\/665107c3e3e3ba9b8ead816f39e8447b\"},\"headline\":\"A Deep Dive into the Recent Eclipse ThreadX CVEs: Who\u2019s Affected?\",\"datePublished\":\"2024-06-10T20:28:04+00:00\",\"dateModified\":\"2024-11-15T23:03:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/\"},\"wordCount\":8402,\"image\":{\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/objectsecurity.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/You-Should-be-Automating-Binary-Reverse-Engineering-Heres-Why.NEW-OBJECTSECURITY-BLOG-POST.png?fit=600%2C337&ssl=1\",\"articleSection\":[\"BinLens\",\"Education\",\"Landing Page\",\"OT\\\/ICS Cybersecurity\",\"Reverse Engineering\",\"Technical\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/\",\"url\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/\",\"name\":\"A Deep Dive into the Recent Eclipse ThreadX CVEs: Who\u2019s Affected? - ObjectSecurity\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/objectsecurity.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/You-Should-be-Automating-Binary-Reverse-Engineering-Heres-Why.NEW-OBJECTSECURITY-BLOG-POST.png?fit=600%2C337&ssl=1\",\"datePublished\":\"2024-06-10T20:28:04+00:00\",\"dateModified\":\"2024-11-15T23:03:53+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/#\\\/schema\\\/person\\\/665107c3e3e3ba9b8ead816f39e8447b\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/objectsecurity.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/You-Should-be-Automating-Binary-Reverse-Engineering-Heres-Why.NEW-OBJECTSECURITY-BLOG-POST.png?fit=600%2C337&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/objectsecurity.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/You-Should-be-Automating-Binary-Reverse-Engineering-Heres-Why.NEW-OBJECTSECURITY-BLOG-POST.png?fit=600%2C337&ssl=1\",\"width\":600,\"height\":337},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/threadxcves\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/objectsecurity.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Deep Dive into the Recent Eclipse ThreadX CVEs: Who\u2019s Affected?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/#website\",\"url\":\"https:\\\/\\\/objectsecurity.com\\\/\",\"name\":\"ObjectSecurity\",\"description\":\"OT\\\/ICS Asset Binary Vulnerability Analysis and Reporting\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/objectsecurity.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/objectsecurity.com\\\/#\\\/schema\\\/person\\\/665107c3e3e3ba9b8ead816f39e8447b\",\"name\":\"Trevor Thomas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/901c48181bca80dcaec365dcd935b0e3b8f5de81693c7816c1b4280ba7fe0f08?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/901c48181bca80dcaec365dcd935b0e3b8f5de81693c7816c1b4280ba7fe0f08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/901c48181bca80dcaec365dcd935b0e3b8f5de81693c7816c1b4280ba7fe0f08?s=96&d=mm&r=g\",\"caption\":\"Trevor Thomas\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Deep Dive into the Recent Eclipse ThreadX CVEs: Who\u2019s Affected? - ObjectSecurity","robots":{"index":"noindex","follow":"follow"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/objectsecurity.com\/threadxcves\/#article","isPartOf":{"@id":"https:\/\/objectsecurity.com\/threadxcves\/"},"author":{"name":"Trevor Thomas","@id":"https:\/\/objectsecurity.com\/#\/schema\/person\/665107c3e3e3ba9b8ead816f39e8447b"},"headline":"A Deep Dive into the Recent Eclipse ThreadX CVEs: Who\u2019s Affected?","datePublished":"2024-06-10T20:28:04+00:00","dateModified":"2024-11-15T23:03:53+00:00","mainEntityOfPage":{"@id":"https:\/\/objectsecurity.com\/threadxcves\/"},"wordCount":8402,"image":{"@id":"https:\/\/objectsecurity.com\/threadxcves\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/You-Should-be-Automating-Binary-Reverse-Engineering-Heres-Why.NEW-OBJECTSECURITY-BLOG-POST.png?fit=600%2C337&ssl=1","articleSection":["BinLens","Education","Landing Page","OT\/ICS Cybersecurity","Reverse Engineering","Technical"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/objectsecurity.com\/threadxcves\/","url":"https:\/\/objectsecurity.com\/threadxcves\/","name":"A Deep Dive into the Recent Eclipse ThreadX CVEs: Who\u2019s Affected? - ObjectSecurity","isPartOf":{"@id":"https:\/\/objectsecurity.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/objectsecurity.com\/threadxcves\/#primaryimage"},"image":{"@id":"https:\/\/objectsecurity.com\/threadxcves\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/You-Should-be-Automating-Binary-Reverse-Engineering-Heres-Why.NEW-OBJECTSECURITY-BLOG-POST.png?fit=600%2C337&ssl=1","datePublished":"2024-06-10T20:28:04+00:00","dateModified":"2024-11-15T23:03:53+00:00","author":{"@id":"https:\/\/objectsecurity.com\/#\/schema\/person\/665107c3e3e3ba9b8ead816f39e8447b"},"breadcrumb":{"@id":"https:\/\/objectsecurity.com\/threadxcves\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/objectsecurity.com\/threadxcves\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/objectsecurity.com\/threadxcves\/#primaryimage","url":"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/You-Should-be-Automating-Binary-Reverse-Engineering-Heres-Why.NEW-OBJECTSECURITY-BLOG-POST.png?fit=600%2C337&ssl=1","contentUrl":"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/You-Should-be-Automating-Binary-Reverse-Engineering-Heres-Why.NEW-OBJECTSECURITY-BLOG-POST.png?fit=600%2C337&ssl=1","width":600,"height":337},{"@type":"BreadcrumbList","@id":"https:\/\/objectsecurity.com\/threadxcves\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/objectsecurity.com\/"},{"@type":"ListItem","position":2,"name":"A Deep Dive into the Recent Eclipse ThreadX CVEs: Who\u2019s Affected?"}]},{"@type":"WebSite","@id":"https:\/\/objectsecurity.com\/#website","url":"https:\/\/objectsecurity.com\/","name":"ObjectSecurity","description":"OT\/ICS Asset Binary Vulnerability Analysis and Reporting","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/objectsecurity.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/objectsecurity.com\/#\/schema\/person\/665107c3e3e3ba9b8ead816f39e8447b","name":"Trevor Thomas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/901c48181bca80dcaec365dcd935b0e3b8f5de81693c7816c1b4280ba7fe0f08?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/901c48181bca80dcaec365dcd935b0e3b8f5de81693c7816c1b4280ba7fe0f08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/901c48181bca80dcaec365dcd935b0e3b8f5de81693c7816c1b4280ba7fe0f08?s=96&d=mm&r=g","caption":"Trevor Thomas"}}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/objectsecurity.com\/wp-content\/uploads\/2024\/06\/You-Should-be-Automating-Binary-Reverse-Engineering-Heres-Why.NEW-OBJECTSECURITY-BLOG-POST.png?fit=600%2C337&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/posts\/6355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/comments?post=6355"}],"version-history":[{"count":2,"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/posts\/6355\/revisions"}],"predecessor-version":[{"id":6593,"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/posts\/6355\/revisions\/6593"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/media\/5726"}],"wp:attachment":[{"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/media?parent=6355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/categories?post=6355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/objectsecurity.com\/wp-json\/wp\/v2\/tags?post=6355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}