MIT tests 'software transplants' to fix buggy code

MIT researchers have shown a way to fix flaws using code copied from a working program

MIT's new CodePhage technology can borrow the successful bits of one program to fix another.

MIT's new CodePhage technology can borrow the successful bits of one program to fix another.

Like visiting a junk yard to find cheap parts for an aging vehicle, researchers from the Massachusetts Institute of Technology have come up with a way to fix buggy software by inserting working code from another program.

Using a system they call CodePhage, the researchers were able to fix flaws in seven common open-source programs by using, in each case, functionality taken from between two and four "donor" programs.

Fixing such errors can help make code more secure, since malicious hackers often exploit flaws to gain entry to a system. CodePhage can recognize and fix common programming errors such as out of bounds access, integer overflows, and divide-by-zero errors.

The researchers describe their approach in Monday's edition of the journal Phys.Org. They also discussed it at a programming conference put on last month by the Association for Computing Machinery.

To fix a buggy program, CodePhage requires two sample inputs, one that causes the program to crash, and another that does not.

It runs those inputs through a second program, known as the donor program, that has similar functionality. The Internet is awash with open source software that could provide parts for donor programs, though there's no particular reason the donor code needs to be open source.

Watching the donor program process the crash-free input, CodePhage notates all the actions taken. It then runs the input that caused the original program to crash, again notating the actions, in symbolic logic. CodePhage then analyzes how the two inputs were handled differently, and uses that information to correct the original program.

In many cases, the program being analyzed lacks the required security check present in the donor program. Up to 80 percent of a typical application can be code for conducting security checks. CodePhage could reduce the time developers spend writing those checks, by inserting them automatically into the build process, the researchers said.

MIT isn't the only organization looking for novel ways to repair vulnerable software. Earlier this year, security vendor Qualys released software that can apply virtual patches to known vulnerabilities, eliminating the need to wait for the software vendor to patch the problem.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Join the PC World newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags patchessecurityMassachusetts Institute of TechnologyExploits / vulnerabilities

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service
Show Comments

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Matthew Stivala

HP OfficeJet 250 Mobile Printer

The HP OfficeJet 250 Mobile Printer is a great device that fits perfectly into my fast paced and mobile lifestyle. My first impression of the printer itself was how incredibly compact and sleek the device was.

Armand Abogado

HP OfficeJet 250 Mobile Printer

Wireless printing from my iPhone was also a handy feature, the whole experience was quick and seamless with no setup requirements - accessed through the default iOS printing menu options.

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?