Embedded Linux is all around us. It’s in our routers, our IoT devices, and our medical devices. Recent events , however, have shown that the Internet of Things gives us just as many new vulnerabilities as new opportunities.
Embedded “IoT” devices are a more serious security risk than typical consumer computers because of their slow update cycles. Some don’t allow remote upgrade. This means that if a vulnerability is found, there is no cost effective way for the manufacturer to update the device with a patch. Even if the manufacturer can remotely update it, they may not be keeping up to date with the latest security vulnerabilities or updates.
Regulatory agencies are taking notice. The FDA’s premarket and postmarket cybersecurity guidances make it very clear that they are concerned with medical device cyber security. It’s up to medical device manufacturers to be on top of the problem through joining ISAOs, setting up coordinated disclosure programs, and issuing security updates.
In this post, we’re going to show how to run automated checking of 3rd party packages for known vulnerabilities (via the National Vulnerability Database) and how to integrate that into your Continuous Integration System (CI). This is just one part of monitoring your device’s security effectively. However, this process is easy to do. If you’re building an embedded device, there is no excuse for not having something like this in place.
The following steps should be performed by the CI after every build of the system, preferably right after your unit tests.
Step 1) Get the list of packages (including all dependencies) on your device
Step 2) Run the CVE checker on that list
The output from this step is a JUnit-style XML document. Run the output from the tool through the same reporting mechanism used by the unit tests. Address any failures through updates, patches, or other mitigations as necessary. If a CVE has been sufficiently mitigated through alternative means, and it is still causing the tests to fail, you can add it to the ignore list using the -i option.
The ignore list is a simple text file with a comma delimited list of CVEs to ignore and why. (e.g. mitigating control taken or false positive) All tests that are in the ignored lists will show up as “skipped” in the report.
CVE-2016-9318 , Device shall not allow arbitrary xml parsing under any circumstance
CVE-2016-6354 , False Positive - Flex not actually on device
Have your CI run this build every time someone checks in a change and at a regular interval (e.g. once a month) after the device is in production. That way, you’ll be alerted by a failing unit test if there are any new vulnerabilities added to the NVD in the future. Every failure needs a mitigating control, regardless of how small.
In addition to our other post-market cybersecurity services, we run this procedure every month on every embedded-linux device that we design. This helps us keep up to date on new vulnerabilities that impact our client’s devices and respond faster and more effectively.