Feeds

Today's bugs have BRANDS? Be still my bleeding heart [logo]

Code-slinger Verity reviews the rash of groovy-named open-source security vulns

Build a business case: developing custom apps

Bug #3: Heartbleed

Heartbleed is the first bug of my experience to come with its own  logo. If this catches on, the designer fees alone will soon send the most agile development cycle spiralling out of control.

The pithiest explanation of Heartbleed is xkcd's; a detailed investigation can be found here.

Needless to say, it is a fragment of C code that causes the trouble. However, unlike the previous efforts, I would say that this is proper C code, in the sense that it is full of the clatter of pointer arithmetic and chatter of the in-place post-increment operator. Atari BASIC could not cut this mustard.

By all means have a look; the action all takes place around line 2400.

With a crunching noise, an in-place macro pseudo-function bites off the length target buffer and hands the result to malloc(). A swift memcpy() and some random bytes piped on top by way of decoration and before you have had time to think 'I don't much care for this bracing style' whoosh! it's all done, with the smoothness and grace of a Bruce Forsyte fresh from an invigorating massage. To complain that it has just sent over a few clear text passwords and a brace of private keys, flotsam caught up in the mesh of an oversized buffer, feels like cavilling.

But RFC 6520 Section 4 says If a received HeartbeatResponse message does not contain the expected payload, the message MUST be discarded silently. So, there.

And I hope you will forgive my banging on about this, but if it were written in C++, it would be easier to arrange things so that, for example, transmission buffers automatically checked the size of data they were supposed to be copying. Just saying.

The essential guide to IT transformation

Next page: The Flensing of C

More from The Register

next story
The Return of BSOD: Does ANYONE trust Microsoft patches?
Sysadmins, you're either fighting fires or seen as incompetents now
Linux turns 23 and Linus Torvalds celebrates as only he can
No, not with swearing, but by controlling the release cycle
China hopes home-grown OS will oust Microsoft
Doesn't much like Apple or Google, either
Sin COS to tan Windows? Chinese operating system to debut in autumn – report
Development alliance working on desktop, mobe software
Eat up Martha! Microsoft slings handwriting recog into OneNote on Android
Freehand input on non-Windows kit for the first time
Linux kernel devs made to finger their dongles before contributing code
Two-factor auth enabled for Kernel.org repositories
This is how I set about making a fortune with my own startup
Would you leave your well-paid job to chase your dream?
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Endpoint data privacy in the cloud is easier than you think
Innovations in encryption and storage resolve issues of data privacy and key requirements for companies to look for in a solution.
Scale data protection with your virtual environment
To scale at the rate of virtualization growth, data protection solutions need to adopt new capabilities and simplify current features.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?