Menu

Heartbleed: One Unchecked Length, Two Years, Half a Million Websites (and the C# Version)
📰

Heartbleed: One Unchecked Length, Two Years, Half a Million Websites (and the C# Version)

DEV Community: dotnet·VLAD·17 days ago
#JIo2z6WX
#devtodotnet#devto#dev#openssl#buffer
Reading 0:00
15s threshold

In April 2014, about half a million trusted websites had the same bug. Ask them the right way, and they'd hand you up to 64 KB of their memory: passwords, session cookies, private messages, sometimes the private key that protects the whole site. The attacker didn't break in. They sent one small message and lied about one number .

This post walks through Heartbleed using the primary sources: the OpenSSL advisory, the commit that added the bug, the commit that fixed it, and the RFC it was supposed to implement. At the end there's the part that matters for .NET developers, because the same mistake can still happen in safe C#, just more quietly.

The heartbeat

When you see the lock in your browser, your connection is protected by TLS. In 2014, a huge part of the web did that locking with OpenSSL , the free, open-source library behind Apache and nginx.

In early 2012, OpenSSL 1.0.1 added the heartbeat extension , from a new standard, RFC 6520 . The idea is simple.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.