NI LabVIEW Real-Time Module: Floating-point Vulnerability
Primary Software: LabVIEW Modules>>LabVIEW Real-Time Module
Primary Software Version: 2009
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Compact FieldPoint>>Controllers>>cFP-2200, Compact FieldPoint>>Controllers>>cFP-2210, Compact FieldPoint>>Controllers>>cFP-2220, CompactRIO>>Controllers>>cRIO-9012, CompactRIO>>Controllers>>cRIO-9014, CompactRIO>>Controllers>>cRIO-9074, CompactRIO>>Chassis (Backplanes)>>cRIO-9074, CompactRIO>>Chassis (Backplanes)>>cRIO-9072, CompactRIO>>Controllers>>cRIO-9072, CompactRIO>>Controllers>>cRIO-9073
Problem: National Instruments released a notification stating that the LabVIEW Real-Time Module can incorrectly overwrite data stored in floating-point registers, returning unexpected data results under certain circumstances. This vulnerability affects a subset of NI Real-Time targets. How do I identify an affected LabVIEW Real-Time application and resolve this issue on my affected target?
Solution: Affected Versions of LabVIEW Real-Time:
- LabVIEW Real-Time 8.2 through LabVIEW Real-Time 2009
NOTE: This issue has been fixed in the LabVIEW 2009 SP1 Real-Time Module. To resolve this issue, upgrade both host and target to LabVIEW 2009 SP1 Real-Time Module or later.
Affected Products:
- All Single-Board RIO targets (sbRIO-96xx)
- Compact FieldPoint targets (cFP-2200, cFP-2210, cFP-2220)
- CompactRIO targets (cRIO-9012, cRIO-9014, cRIO-9022, cRIO-9024, cRIO-9072, cRIO-9073, cRIO-9074)
- NI Smart Camera targets (NI 1722, NI 1742, NI 1744, NI 1762, NI 1764)
National Instruments recently discovered a floating-point vulnerability that can cause unexpected data results in NI LabVIEW Real-Time Module applications. Under certain circumstances, LabVIEW Real-Time can incorrectly overwrite data stored in floating-point registers. No error message is reported to alert the user of incorrect data, making it possible for the application to continue propagating the data through the code. Although National Instruments believes the conditions required to produce this issue are uncommon, the issue may occur with any version of the module, and National Instruments recommends that all customers install the critical patch.
To resolve this issue, install the
LabVIEW Real-Time Module 2009 f2 Patch on the host PC and reinstall all software to the real-time target using one of the methods described in
How to Install VxWorks Floating-point support for VxWorks 1.0 to Deployed Systems.
How to Identify a Vulnerable LabVIEW Real-Time Application The specific vulnerability involves register-level data corruption when switching threads during a floating-point calculation, which can result in periodic glitches or single points of incorrect data.
The following list includes the most common threads that can potentially corrupt floating-point registers. This is not a comprehensive list, as several threads created by the operating system execute tasks that cannot be controlled by users.
- File Transfer Protocol (FTP)
- Custom C++ generated .out files created using the GCC Compiler.
- NI Service Locator
- The following NI-VISA tasks:
- NI-VISA Server
- NI-VISA Asynchronous Passports
- Communicating with ENET-Serial devices using NI-VISA
- Using VISA Events with TCP/IP, PXI, or USB devices
For example, you could encounter this issue by running FTP or custom C++ generated
.out threads at the same priority as a loop performing FFT or PID calculations. The result data returned from these calculations are in-range values but are not correct. No error message is reported to alert the user of incorrect data, making it possible for the application to continue propagating the data through the code.
In most applications, context switches involving the vulnerable threads do not occur during floating point operations. However, there is no way to guarantee your application is safe without verifying the results of every calculation. National Instruments recommends all customers install the patch or understand the risk assumed by executing applications on a system with vulnerable threads.
How to Install the Floating-Point Patch You can apply the floating-point vulnerability patch to affected targets by installing a separate component using one of the following methods. These instructions assume you have already configured the RT target and installed the software required to run your application.
Method 1: Custom Software Installation with Measurement & Automation Explorer (MAX)
Complete the following steps to install the floating-point patch from MAX.
- Launch NI Measurement & Automation Explorer (MAX).
- Expand the Remote Systems tree and browse to the RT target.
- Expand the RT target item.
- Right-click the Software item under the RT target and select Add/Remove Software to launch the LabVIEW Real-Time Software Wizard.
- If the target uses Recommended Software Sets, select Custom software installation

- Click Next, and select Yes when asked to manually select the features to install.
- Select VxWorks Floating-point support for VxWorks 1.0 from the Features tree and click the Next button to begin the installation.

- Follow the instructions on the screen to complete the installation process. The patch has been applied when the installation has completed and the target restarts.
Installation Method 2: Manually FTP the Patch Component and Update the Target Configuration File
If you do not want to use National Instruments software to resolve the floating-point vulnerability, you may patch targets manually using the files contained in the attached LVRTf2Patch.zip and an FTP client. FTP transfers must be made in passive and binary mode.
LabVIEW Real-Time 8.2.0 and 8.2.1
Copy vxfpsup.out from \LVRTf2Patch\vxworks61 on your host to /c/ni-rt/system/ on the target. Navigate to the root directory on the target and FTP ni-rt.ini to your host. Open the file and add vxfpsup.out; to EarlyStartupLibraries in the STARTUP section. If the section and line do not exist, you may add them to the end of the file (as seen below).
[STARTUP]
EarlyStartupLibraries=vxfpsup.out;
Save ni-rt.ini, FTP it back to the target (overwriting the existing file) and restart the target.
LabVIEW Real-Time 8.5.0 through 2009
Copy vxfpsup.out from \LVRTf2Patch\vxworks63 on your host to /c/ni-rt/system/ on the target. Navigate to the root directory on the target and FTP ni-rt.ini to your host. Open the file and add vxfpsup.out; to EarlyStartupLibraries in the STARTUP section and add Vxfpsup.out=6.3 to the MODULE VERSIONS section. If the sections or lines do not exist, you may add them to the end of the file (as seen below).
[STARTUP]
EarlyStartupLibraries=vxfpsup.out;
[MODULE VERSIONS]
vxfpsup.out=6.3
Save ni-rt.ini, FTP it back to the target (overwriting the existing file) and restart the target.
Validating Applications after Installing VxWorks Floating-point support for VxWorks 1.0 In most applications, installing the patch does not significantly affect performance. However, installing the patch can significantly increase the execution time of applications that meet the criteria required to encounter this issue. National Instruments recommends that you benchmark your application after installing the patch to verify that the application continues to meet timing requirements.
Additional Support For further assistance, please do not hesitate to contact National Instruments by calling 1.800.433.3488.
Related Links: LabVIEW Real-Time Module 2009 f2 Patch
Attachments:
- LVRTf2Patch.zip
Report Date: 11/20/2009
Last Updated: 03/16/2012
Document ID: 53JFCCQ0