P12: Find and report a flaw

A system with every door marked where outside input enters. In this lesson you find one open door, prove it in a few lines, and write a report so that a stranger can close it.
OpenSSL is the library that a large part of the internet uses for encrypted connections. On 7 April 2014 the OpenSSL project made a flaw public and released version 1.0.1g with the fix. The flaw is now called Heartbleed, and its id is CVE-2014-0160. Two parties had found it separately. Neel Mehta of Google reported it to the OpenSSL team, and the Finnish company Codenomicon found it on its own and gave it the name. Sources disagree on the exact days of discovery, so this lesson gives only the public date.
Here is what matters for you. A flaw in code that millions of servers ran was fixed in days, because the people who found it could tell the maintainers exactly what was wrong. A report that cannot be understood, or cannot be repeated, waits in a queue while the flaw stays open.
By the end you will be able to find a flaw in a small program, prove it with a script anyone can run, score its severity with a worked sum, write a one-page report, and show that your fix works.
The history (optional)
The date 7 April 2014 and the id CVE-2014-0160 are from the OpenSSL security advisory of that day. The two finders and their different discovery dates are described in the Wikipedia article on Heartbleed and the papers it cites. Nothing later in this lesson depends on them.
Before you start. Break and fix: the security capstone had you attack a shop you wrote and fix five flaws, and gave you the habit of a test where the attack fails. The risk register (security as a programme) gave you the CVE, a public id for one flaw, the CVSS score, and the idea of coordinated disclosure, which means telling the people who can fix a flaw first and the public after. The other injections: command, XXE, traversal and races gave you path traversal, a file name that climbs out of its folder. How a pentest runs gave you scope, the exact list of what you may attack. A repo a stranger can judge in two minutes showed that a stranger gives your work seconds, and a report is read the same way.