Saturday, August 11, 2012

5125 Years ago today

5125 years ago today, August 11th 2012, the first cycle of the Mayan Long Count Calendar started ticking, on August 11 3114 BC. In 133 days from now, the 13th cycle of the 144,000 day Long Count completes on December 21st, 2012 at 11:11 AM EST.

What do you think will happen when Earth lines up with the Center of the Galaxy on December 21st, 2012, an event that happens every 25,920 years (360 degrees times 72 years)? No, leap years have nothing to do with any of this, Mayan Calendar is based on star positions...


Sunday, July 29, 2012

"Invalid License Data. Reinstall required." caused by Atmel Stdio 6

This week I made an attempt to build the Clang Static Analyzer using Visual Studio Express 2010 following the Clang Visual Studio Build Instructions. I was greeted with:

"Invalid License Data. Reinstall required."

I wondered what that was about, as Visual Studio Express was licensed as needed. Searching Internet came across many people with the same issue, with few resolutions other than a complex registry patch job, or reinstalling Visual Studio, which is a complete waste of time. One should never have an error message that directs a user to do something, unless the program is sure it needs done.

I then remember that I'd installed Atmel Studio 6 a few days earlier. After removing Atmel Studio 6 the Invalid License Data error went away.

For inexplicable reasons Atmel decided to ignore their customers number one request about what to replace AVR Studio with, which was that it should be cross platform. Instead Atmel Studio 6 is based on Microsoft Visual Studio Shell.

Unfortunately it seems installing Atmel Studio 6 corrupts installs that are outside of its own purview. So if you are having the Invalid License Data error, check and make sure that no custom Microsoft Visual Studio Shells have been installed by any other program.

Atmel actually does have a Linux version of Atmel Studio 6 hidden on their website, which is just about impossible to find any useful data anymore without lots of time wasting clicks: Atmel AVR Toolchain 3.4.0 for Linux.

Getting back to the Clang Static Analyzer, it fails to build using Visual Studio Express. The Makefiles created by CMake do not seem to be compatible with it, in that it fails to build key parts of the tool chain. Pete Akeo does give MinGW build instructions that do work.


Do you have your license to write firmware?

Did you know that in some states it is now required to have a license to write software, and more states are on the way? Probably not.

In June of 2012 IEEE-USA made the announcement Professional Exam for Software Engineering to be Offered in April 2013.

'Offered' is in interesting choice of a word, the thinking goes:


"If software engineers who write programs for systems that expose the public to physical or financial risk knew they would be tested on their competence, the thinking goes, it would reduce the flaws and failures in code" -- Licensing Software Engineers Is in the Works.

And,

"The sponsoring organizations reason that competency testing could reduce the flaws and failures in code performed by solo practitioners and small consulting firms." -- Penn State professor plays key role in software engineering licensure.

From the final authority on wisdom:

The goal of every engineer is to retire without getting blamed for a major catastrophe. -- Dilbert.

So it is okay for Mega-Corp to have flaws, but the little guy gets singled out again and again? Is this not the reasoning of Dilbert?: "Engineers prefer to work as 'consultants' on project teams. That way...blame is spread across the group". Do you really put bugs in your software because you know you did not have to take a test? How do people come up with this stuff?

Will everyone developing software be required to get a state license? According to Licensing Software Engineers by Phil Laplante, CSDP, PE, PhD Professor of Software Engineering Penn State Software PE Exam Development Committee Chair, the answer is "No":

  • Would all software engineers need to be licensed?
    • No, only those providing their services directly to the public.
  • Would all software have to be developed or supervised by licensed software engineers?
    • No, only software that has an impact on the lives, property, economy, or security of people.

Alas there is the usage of ambiguous terms like "economy", "public" and "security". If a publicly held company implements a video game based on a flawed understanding of Sun Tzu's The Art of War, that is used for military training, a soldier is killed due to said flaw, and the stock value plummets, have we not harmed the public financially, the deceased soldier mortally, with an unsafe software product, that is currently outside the scope of licensing? Does this licensing initiative expand like the camel's nose in the tent? According to the Texas Board of Professional Engineers that is already in their multi-year plan:

Software Engineering

"After years of hard work by countless software professionals across the country, the Software Engineering Principles and Practice of Engineering (PE) exam is ready for its maiden administration in April 2013. This will mark the culmination of one phase of the journey [Emphasis mine.] and a critical step in the overall philosophy surrounding software engineering and the licensing of software engineers in the United States.

The implementation of the exam creates a path to licensure for practicing software engineers, which helps solidify the profession as a recognized field of engineering. It may take years [Emphasis mine.] to thoroughly implement engineering licensure in the culture of software development, but the implementation of this exam is a huge step forward in the recognition that software engineering does directly and significantly impact public safety, health and welfare.

In anticipation of the implementation of the exam, the Software Engineering Licensure Consortium developed a guidance document to help Licensing Boards throughout the United States understand the unique aspects of the field of software engineering. That document will be ready for release by the end of 2012."

How did we get here, to the place we all knew we where headed, the requirement of licensing software developers? [We are safe from all of this if we don't call ourselves Software Engineers right?]

Collectively, including Management, we have done a very poor job in the design of our systems, just look at any near by electronic widget. Do you trust that it will work every time you use it? It has been commonly accepted to "just press the reset button" to fix any problem. So now we have the government stepping in, in their misguided idea this is some how helpful.

"The nine most terrifying words in the English language are: 'I'm from the government and I'm here to help.'" -- Ronald Reagan.

Then there is also always the motive of money, those in government are always happy to add one more fee to the backs of working people. Also there is the conflict of interest of the organizations promoting licensing, do they profit from selling training materials or memberships for example? If this was truly about safety and protection of the public there would be no money incentives involved anyplace.

Background documents:

What has brought licensing of software developers to the forefront is the test Principles and Practice of Engineering Examination Software Engineering Exam Specifications, about to be implemented by the National Council of Examiners for Engineering and Surveying (NCEES) - a non-profit organization that oversees the development and scoring for all engineering licensure examinations in the United States. Taking this test is either currently, or is about be, required by many states.

When I contacted NCEES to ask questions about the software licensing exams, I found them to be less than helpful. The only reply to my questions was "requirements vary by state". I live on the boarder of Pennsylvania and Ohio. If I want to do work for clients in both states, do I have to take the test twice (paying the exorbitant fee twice?)? What if the prerequisite requirements for each state conflict? Those questions went unanswered.

Finding no help from NCEES, I contacted state licensing boards asking them the following questions:

  1. The National Council of Examiners for Engineering and Surveying (NCEES) will be implementing their Principles and Practice of Engineering Examination Software Engineering Exam in 2013. Are there any plans to require this license in [State]?

  2. Should such a license be required by the state, will there be any distinction made between types of computer systems such as your desktop PC, your Smart Phone or an Embedded System (those that run your microwave and your car)? Will there be any distinction for networked systems (Internet being the best well known, but not the only network system)?

  3. What will the prerequisites for taking the test, should it become required?

  4. A concern that I have is that there will be academic requirements, that will exclude those that have been practicing in the industry for years, yet have do not have a degree from a state recognized institution. Will there be any type of grandfathering or allowances for years of practice, so that the most experienced people are not prevented from taking the test?

  5. Living here on the boarder of Pennsylvania and Ohio, will there be any reciprocity of the test being taken one state to be valid in the other? Taking the identical test twice would be a bit odd would it not?

  6. Currently the American Society for Quality has their "Software Quality Engineer Certification" (CSQE). As a holder of a CSQE will there be any ramifications of using the word "Engineer" on my business card or web site?

  7. How often will this license have to be renewed, and at what expense?

I will aggregate the responses from the various states as they reply and post in a future update.

According to the article Sharpen your pencils for 2013 software exam by Rick Merritt in EE Times, these states either currently require or are working on requiring testing: Alabama, Delaware, Florida, Michigan, Missouri, New Mexico, New York, North Carolina, Texas and Virginia. [In June 1998, Texas became the first state to license software engineers.]

IEEE-USA, the sponsoring technical society for licensure will publish study materials later this year (At what cost I wonder?), in the mean time the IEEE Computer Society has their Certified Software Development Professional:

"The CSDP credential is intended for mid-career software development professionals that want to confirm their proficiency of standard software development practices and advance in their careers."

Prepare for the Exam preparation options include the CSDP Preparation Course, which is an on-line, self-paced course, related to the Guide to the Software Engineering Body of Knowledge (SWEBOK).

One of the more bazaar aspects of this coming license requirement is that it is based on, at least in Pennsylvania, a law from 1945: Engineer, Land Surveyor and Geologist Registration Law - Continuing Professional Competency Requirements. In the eye of the law, software practitioners are building bridges. Please let me know when reason and logic start to apply... What exactly is a "Engineer-in-Training" when it comes to software? Is this a government mandated mentoring program? Nothing wrong with mentoring, mandates have a lot wrong with them.

To close, I find one of the answers from the FAQ particularly troubling:

"Many of the other questions I receive are variations on two themes: the futility and unfairness of licensure. I usually respond to these questions by asking the poser to rephrase his question, but in terms of medical licensure. For example, "You can't guarantee that products engineered by licensed professionals won't fail and harm the public so why bother with licensing?" This could be rephrased: "You can't guarantee that there will be no malpractice by licensed physicians so why bother with licensing them?" When asked this way, the questioner often retracts the question."

I've watched a loved-one suffer at the hands of the medical establishment for years. From their own self-study, since the doctors have been no help, they believe they suffer from Intracranial Hypotension due to a Cerebrospinal fluid (CSF) leak. This problem is outside of the "check the box medicine" our system has become. Any doctor that deviates from the "Standard of Care" is sanctioned for having any original idea that might help the patient. I would gladly take this person to a non-licensed Witch-Doctor or Indian Shaman, if one were available. They might actually heal the person, rather than push pharmaceutical drugs, that have only made them sick over the years. For a tangible case of how the "Standard of Care" kills people look into the case of Rick Schiff, whom the state demanded his daughter receive chemotherapy. His daughter died cancer free, not due to a method that is considered outside the "Standard of Care" today, rather from the side effects of treatment demanded by the state licensed doctor dictated by today's "Standard of Care". Is this truly the model we want good software design to be based on?

Am I against certification and licensing? Not really, however there are two things that I am against.

First, what I am against is this kind of attitude typified by the state of Texas (the table below), where you must be a member or part of some other Good Ol'boy network to participate. We only get evolutionary changes out of that, when the world needs revolutionary changes that might come from those that tend to be "Hands On" Tactile Learners, that do not do well in academic settings, who are always outside the 'box'; "Set down and shut up or we will give you more Ritalin!":

 

Type of Education

Experience Requirement

Examination Requirement

Reference Requirement

  No Degree Cannot be licensed. Cannot be licensed. See Board Rule 133.31. Cannot be licensed.

Secondly, we have this response from Pennsylvania:

Mr. Paddock,

Thank you for your email inquiry. Pennsylvania does not license by discipline. You will need to contact NCEES for all questions regarding the examination.

In the response to your question:

"Currently the American Society for Quality has their "Software Quality Engineer Certification" (CSQE). As a holder of a CSQE will there be any ramifications of using the word "Engineer" on my business card or web site?"

Please refer to Section 3 of the Board's Law, found at http://www.dos.state.pa.us/eng, that details the practice of engineering and the use of the title in advertising.

So does that first part mean I have to learn how to design a bridge? It is all in for a license in Pennsylvania, or nothing, before I can write software for a safety application? The Pittsburgh region is big on medical devices. Rather than help, did this potential license requirement just drive this type of businesses to a state friendlier to software development?

Then we have the obvious finger pointing match. NCESS told me to contact the state, the state told me to contact NCEES. I guess the next person to contact is the people that thought getting the government involved in an industry was a good idea. Who do you suggest?

As far as using the word "Engineer", there is a $1000 fine for using that without a license, which in PA for software we can apparently not get? Seems my websites are safe, but would you like to buy a bunch of now useless businesses cards?:

43b.13a. Schedule of civil penalties-engineers, land surveyors and geologists.

STATE REGISTRATION BOARD FOR PROFESSIONAL ENGINEERS, LAND SURVEYORS AND GEOLOGISTS

Violation Under 63 P. S.    Title/Description    Penalties

Section 150(b) Representing oneself as an engineer, land surveyor or geologist on sign, advertisement, letterhead or card, without being licensed or registered 1st offense-$1,000.

2nd offense-formal action Section 151(e) Biennial renewal-Practicing on a lapsed license or registration 1st offense-Up thru 5 months-$500.

6 months thru 1 year-$1,000 over 1 year-formal action 2nd offense-formal action Section 151.5(a) Failure to complete the required amount of continuing education. First offense—$50 per hour of deficiency, not to exceed $1,000 Subsequent offense-formal action.

Finally, what do you think? Will you be taking this test so that you can serve your clients with better software? Beef up your resume over the competition? Do you think it will in anyway improve our systems so we never hear "just push the reset button" again? Is just more government intrusion into our lives, being pushed by people whom have something to gain? This will just drive more jobs out of the country?


Saturday, July 21, 2012

How to keep a sharp focused mind, or How sugar makes you stupid

When designing Embedded Systems it is important to keep your mind sharp and focused.

A recently published study: 'Metabolic syndrome' in the brain: deficiency in omega-3 fatty acid exacerbates dysfunctions in insulin receptor signalling and cognition [PDF] shows that a high-fructose diet sabotages learning, memory.

Eureka Alert sums up the study in plan English as:

New study shows that a high-fructose diet makes you stupid, significantly inhibiting your brain's ability to learn and remember.

"Our findings illustrate that what you eat affects how you think," said Fernando Gomez-Pinilla, a professor of neurosurgery at the David Geffen School of Medicine at UCLA. "Eating a high-fructose diet over the long term alters your brain's ability to learn and remember information. But adding omega-3 fatty acids to your meals can help minimize the damage."

Do you think this perhaps this a conspiracy by 'Them' to keep us "Dumbed Down", as it is found in most off-the-shelf foods and drinks?

Personally I cut sugar out of my diet a long time ago, and became an avid reader of food ingredient labels, and feel a lot better for it.

Be warned, if you try to remove sugar from your died, you will soon discover just how addictive this substance in the typical diet really is, as I know first hand from when I stopped being a Doughnut Junkie. It was a miserable few weeks when I decided to go Cold Turkey on sugar. Once it is out of your system for a while, it does not take much for you to feel the effects, like all of your muscles starting to ache, of eating something that you did not expect to have sugar in it.

Always keep in mind you are what you absorb, no mater how good this poison to the mind tastes going down...


Tuesday, July 10, 2012

How to steal a BMW

Obviously I'm not going to tell you how to steal a BMW (you can watch someone else do it), however such a title might wake you up to security being a real issue in Embedded Systems designs. In my Cyber War or Cyber Peace, are your systems safe? entry I wrote:

There are several other organizations such as SAE International, that covers automotive standards getting involved in securing systems. SAE has recently put together the Vehicle Electrical System Security Committee. Does anyone really expect our vehicles to not be attacked at some point?

Seems BMW security systems have already betrayed us, by having no security on the diagnostic port, not even a password (which would only slow, not stop an attack), the BMW key fob can be reprogrammed. Emil Protalinski gives more details in Hackers steal keyless BMW in under 3 minutes.

Security by Obscurity has not been viable for a very long time. Recently Microsemi had been in the headlines about a potential venerability in their ProASCI3 parts, here is their official response: Microsemi Response: Security Claims With Respect to ProASCI 3. Whether such a flaw exist we all will know in time. The point is that if there is a port that can be exploited such OBD or JTAG, it will be exploited.

Have you accounted for deliberate attacks in your design? Keep in mind that the the Bad Guys have more money and are better armed that you are, their bosses believe in spending money on good tools! Drug dealers no long count their money, they weigh it. One million dollars in 100 bills weighs 37.4 lbs, in fifties it weighs 74.8 lbs.


Sunday, July 1, 2012

ASQ Youngstown-Warren Section offering Certified Software Quality Engineer class this fall

For the first time the Youngstown-Warren Section (0805) of the American Society for Quality will be the holding Certified Software Quality Engineer training this fall. If you are interested, please contact Marie Dabelko [mdabelko (AT) kent.edu] at Kent State Trumbull. The class is being taught by Nick Hatzis.

For many years Robin Dudash has been holding CSQE classes in the Pittsburgh Region. Robin also has the class available on-line. Give her CSQE Practice Exam a try and see how well you do.


Leap Second Breaks Internet

Last night [June/30/2012] at 00:00 GMT there was a Leap Second, causing a "Javapocalypse" among other crashes.

Poul-Henning Kamp did some screen-grabbing on Twitter of the many crashes of systems last night.

Several Linux based servers started to run at very high loads. I wonder if it was due to the multiprocessor leap second lockup bug that was fixed nearly four years ago?

For all of you that had crashes, you might want to fill out the U.S. Naval Observatory's UTC Leap Second Survey Form on whether to keep leap-seconds or not. They want to know what Leap Seconds are costing you.

I have covered the issue of Leap Seconds before in The current Temporal War on planet Earth and Earth's Temporal War Leaps to 2015, one Leap Second at a time, on how the there are two factions battling on keeping or eliminating Leap Seconds. The vote on the issue was moved to 2015 as no one could agree on how to fix the problem.

There are a few things we can learn from this event:

  • External influences like Time, and the keeping thereof, can impact our systems. There can legitimately be only 59 seconds, or 61 seconds in an hour according to the prevailing standards today.
  • Keep your system(s) up to date. There is always the trade off of "lets keep the bugs we know" verses "what new bugs will this update bring us". Old bugs are the ones that many people know how to exploit.
  • Don't use Java. Perhaps more of a personal issue. Every experience I've had with Java has been one of crash-prone slow, bloatware, and buggy. This just reinforces my view on that.

I'm curious how may Embedded Systems had issues last night? Leave a comment if you can across any please.


Sunday, June 24, 2012

Cyber War or Cyber Peace, are your systems safe?

In May [May/15/2012] Dr. Hamadoun I. Toure', International Telecommunication Union (ITU) Secretary-General, gave a speech High Level Dialogue - The Governance of Cyberspace and Cyberpeace calling for Cyberpeace.

..."We therefore need to act - and we need to act fast - to set up new strategies to ensure cyberpeace at national, regional and international levels.

I am firmly convinced that building an international framework for cybersecurity - with key, high-level principles, such as international cooperation - is vital to ensure cybersecurity and the correct governance of cyberspace.

Governments, the private sector, international organizations and civil society are now called upon to develop the implementation of international norms and principles that will lead to a sustainable and proactive culture of cybersecurity, building on national, regional and international efforts."

Dr. Toure' is calling for cyberpeace because according to Richard Clarke, who served three presidents as counter-terrorism czar, now at Good Harbor Consulting, we have already been deeply involved in a cyberwar for several years.

You may think this is academic exercise, however you may not even have to look far to find a security problem in your own facility. Have you actually taken a close look at that Air Freshener by the file server? Perhaps it is really a Pwn Plug from Pwnie Express, or maybe The New Guy is not really addicted to texting but is using a PwnPhone for industrial espionage.

What brings me to discuss all of this is the recent discovery of the malware known as sKyWIper, Flame or Flamer. Confusion on the name exists due to finding different parts of the same attack at the same time by different organizations, and the controversy over a module named FLAME written in the Lua scripting language. Malware Attribute Enumeration and Characterization (MAEC) is meant to prevent this type of description/naming problem.

Flame (the most popular name in the press) has apparently been evading detection for years and targeting systems in the Middle East. The May 28th 2012 Virus News headline read:

Kaspersky Lab announces the discovery of a highly sophisticated malicious program that is actively being used as a cyber weapon attacking entities in several countries. The complexity and functionality of the newly discovered malicious program exceed those of all other cyber menaces known to date.

The Laboratory of Cryptography and System Security (CrySyS Lab) is publishing sKyWIper (A.K.A. Flame A.K.A. Flamer): A complex malware for targeted attacks, a live document that is being modified all the time as more is learned about this complex cyber attack. The Security List has also put together The Flame: Questions and Answers A.K.A 'the Flame FAQ prepared by Kaspersky Lab; see also Kaspersky Lab and ITU Research Reveals New Advanced Cyber Threat.

The thing I find most interesting is how Microsoft Certificate Was Used to Sign "Flame" Malware. Microsoft's official response: Unauthorized digital certificates could allow spoofing and in their blog. I always did think signing code just so I could install a driver on Windows was nothing but a money making scam, this proves it. Anyone with the wherewithal and the incentive can break anything. Such as compromising Windows Update, Flame malware hijacks Windows Update to spread from PC to PC with a MD5 collision attack.

Marc Stevens from the Centrum Wiskunde & Informatica (CWI) in Amsterdam, known for 'breaking' the MD5 hash function for https security in 2008, analyzed the recent Flame virus: Attacks on Hash Functions and Applications, Marc Stevens. PhD thesis. 19 June 2012, and cryptanalyst discovers new cryptographic attack variant in Flame spy malware.

One almost humorous comment, if it was not for the seriousness of the issue, on Slash Dot:

"It seems the authors of Stuxnet/Duqu/Flame used the LZO library [LZO is a portable loss-less data compression library written in ANSI C.], which is under GNU General Public License (GPL). And so, someone has asked the U.S. government to release the code under the GPL. (Other code uses various permissive licenses. As works of the U.S. federal government, the rest is of course public domain. [I'm not sure that applies to Israeli's claim of involvement?] Perhaps the author could enlist the SFLC to send a copyright notice to the U.S. government...

Under the GPL, only people that the executable was distributed to are allowed to request the code - and since it's a weapon, the US government isn't alliowed to send it to Iran." [Due to International Traffic in Arms Regulations 2011 or the updated Consolidated version with admendments, that is not actually considred "official".]

As an aside, in that past I was involved with a 68000 based system that was destined for a coal mine in China. We had to jump through many State Department/ITAR hoops to get our 68000 approved, as not being to powerful to ship to China at that time. When the mine complained that it did not arrive on time, someone dug into why. We were told, with no way to verify, they found that a Cray Supercomputer fell of the delivery truck and it was taking them a while longer to ship stuff to the mine, so it would not fall off again. Thinking of that incident makes me want to get a XMOS XK-XMP-64 HypberCube Development Board, has more power today than the Cray then...sorry to must get back on topic... Did the assumed government organizations invovled get State Department approval to export this technology to ITAR band countries?

Flame also uses the scripting language Lua. Lua can very easily interfaced with C code. I've used it in embedded systems to handle user interface issues. On the coal mining machine I mentioned earlier it was common for motors and their transducers to be changed in the field. So I set up Lua scripts that the end user could easily edit to put in the proper scaling factors. Many parts of Flame have high order logic written in Lua - with effective attack subroutines and libraries compiled from C++.

Even tho Flame authors order infected computers to remove all traces of the malware, this is probably the beaning of the story rather than the end.

If you have limited time, yet want to keep up on the field then sign up for Bruce Schneier Crypto-Gram Newsletter.

Some organizations have taken to using "active defense" or "strike-back" technology, to turn the tables on their attackers. Does this only end when it has escalated to the annihilation of Mankind? Perhaps you'll want to join the debate on Should There Be an International Treaty on Cyberwarfare?

New publications that are starting to come out of academia and the military and moving into the real world. A good place to get a summary of the security issues we should all be dealing with are the Pocket Guides published by the Department of Homeland Security (DHS) Cyber Security Division Software Assurance Section:

Additional information and resources in software assurance and cybersecurity are available:

Build Security In (BSI) is a collaborative effort that provides practices, tools, guidelines, rules, principles, and other resources that software developers, architects, and security practitioners can use to build security into our products.

Then there are several other organizations such as SAE International, that covers automotive standards getting involved in securing systems. SAE has recently put together the Vehicle Electrical System Security Committee. Does anyone really expect our vehicles to not be attacked at some point? Who's Minding Your Data? The Department of Transportation already thinks it is going to happen: An Introduction to Cyber Security Issues for Transportation.

There is also the SESAMO project that started last month [May/2012] with the goal of integrating security and safety assessment together into methods and tools for model-driven development of embedded systems. SESAMO is one of the many projects of ARTEMIS Industry Association, which is a collaboration of European Government and private industry covering Embedded Systems directly. For example Fostering analysis on industrial embedded systems development process and CHESS: Four pilars for building time-predictable and dependable systems are recent topics of their May 2012 magazine issue.

The March/April 2012 of CrossTalk covered Securing a Mobile World which you can view as Digital Flip Book version (a technique that never fits on any screen I've ever used, forcing millennia-old paper portrait format on to modern landscape screens is never going to work correctly) or download the PDF. As well as Creating Attack-Aware Software Applications with Real-Time Defenses in Vol. 24, No. 5, Sep/Oct 2011 by Coates, Michael, Groves, Dennis, Melton, John, Watson, Colin.

CrossTalk is the Journal of Defense Software Engineering approved by the U.S. Department of Defense. It discusses engineering development of software in order to improve the reliability, sustainability, and responsiveness of the U.S.'s warfighting capability, via new software engineering technologies, and occasionally covers policy decisions.

You may be interested in the SwA Forums, on reliability, security, and the supply chain are their major focus areas.

"In a world where we had made security a must-have in the infrastructure we build on, rather than in the code we develop, think of how much more amazing code could have been written. Instead, we spend endless time in code reviews, following best practices, and otherwise cleaning up after our security-challenged operating systems, languages and platform." -- James Turner.

Now what can we do to prevent our own designs from becoming those kinds of news headlines? For starters many (Most?) organizations need to get out of their comfort zone with dangerous languages like C and look more at languages such as ADA, or even modern C++ with smart pointers if ADA is to big of a leap for Embedded System developers; See also Ada-95: A guide for C and C++ programmers by Simon Johnston.

Some pointers to practical to apply techniques to develop better code, from the SANS InfoSec Reading Room on Secure Code, of which these are Must Read:

  • Securely Programming in C by Sayed Jamil Ahmed. This paper will discuss the main issues in secure programming in the C programming language in a UNIX environment (Buffer Overflows, Format Strings and Race Conditions), topics such as overflows are relevant in Windows, and Embedded Systems too.
  • The Intrinsic Hole In Information Security by Douglas Gaer. The lack of type safety in the C program crates a massive hole in information security.
  • Defeating Overflow Attacks by Jason Deckard. Buffer overflows are the most common of all software bugs, even after decades of being told this. Buffer overflow attacks are detectable and preventable. This paper describes what a buffer overflow attack is and how to protect applications from such an attack.
  • Inside the Buffer Overflow Attack:Mechanism, Method, & Prevention by Mark E. Donaldson. The objective of this study is to take one inside the buffer overflow attack and bridge the gap between the "descriptive account" and the "technically intensive account".

Related items from other sources:

Consider taking the class on Secure Coding in C & C++, to learn of the most common attacks on systems of all types, Embedded included:

  • Buffer Overflows
  • Fundamentals of Shellcode Creation
  • Proof of Concept Exploit Demonstration
  • Null Terminated Byte Strings
  • Standard Library function behavior
  • Integers
  • Integer Overflows & Underflows
  • Integer Promotions
  • Sign Errors
  • Off by One errors

The Software Engineering Institute of Carnegie Mellon has a large section on Secure Coding and Secure Coding Standards.

To close out this our paper here today, Test Driven Development with the help of some basic frame works is something you can start applying today to your systems.

Google C++ Testing Framework. Google's framework for writing C++ tests on a variety of platforms (Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian). Based on the xUnit architecture. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, value- and type-parameterized tests, various options for running the tests, and XML test report generation.

CUnit: A Unit Testing Framework for C is built as a static library which is linked with your testing code. It uses a simple framework for building test structures, and provides a set of assertions for testing common data types. In addition, several different interfaces are provided for running tests and reporting results.

CppUnit 2 is a C++ test framework primarily targeted at unit testing, but with high level features that makes it attractiveness for small functional testing. Collection oriented assertions, rich customization, better test organization with test meta data, dependencies, parallelization, time-out...

CppUTest is used extensively in the book Test Driven Development for Embedded C (Pragmatic Programmers) by James Grenning, whom was a signer of the Agile Manfesto.

Bernard Cole, editor at Embedded.com, summarizes several other security techniques in The growing challenge of securing embedded systems.

In the end there are no shortcuts to security and safety. It takes time, money, and proper requirements to build a system that is secure. It also takes a management team with the commitment to make quality products and the vision to look beyond the next quarters proffits.