Skip to content
DoS Disclosed report Intermediate CVE-2017-5446

Firefox crashed when encounter immature HTTP/2 server send DATA frame padding length large than payload length

A test HTTP/2 server sent a DATA frame whose declared padding length exceeded the actual payload, and Firefox crashed instead of rejecting the frame. An attacker running a malicious or buggy HTTP/2 server could crash a visiting browser.

chhsiao90 Follow

Originally disclosed on Mozilla

  • Fixed in 20 days
  • Paid in 30 days
  • Disclosed after 20 days
Text
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce:

We had a test tool that focus on HTTP/2 client/browser testing.
You could reference https://github.com/summerwind/h2spec/pull/74#issuecomment-283273210

Long story short, when the server send a DATA frame defined padding length=6, but only had 5 bytes in payload(including padding length byte). Firefox would crash.

Steps to reproduce:
1. mkdir src
2. export GOPATH=path to the folder created at step.1
3. mkdir -p src/github.com/summerwind
4. cd src/github.com/summerwind
5. git clone https://github.com/chhsiao90/h2spec.git
6. git checkout h2specd
7. go run cmd/h2spec/h2specd.go -t -p 8080 -c server.crt -k server.key -v
8. open firefox to http://localhost:8080
9. find the third link under 6.1. DATA marked with desc: Sends a DATA frame with invalid pad length


Actual results:

Firefox crashed


Expected results:

Marked the http2 connection as connection error, send GOAWAY frame and close the connection

The original report as published on Mozilla's Bugzilla, by chhsiao90. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the HTTP/2 frame parser did not validate that the declared padding length fits within the received payload before using it.

Impact

A malicious or faulty HTTP/2 server could crash the Firefox browser of anyone connecting to it.

What the attacker needed

Victim connects to a malicious HTTP/2 server

How it was found

  1. Set up a Go workspace and clone the modified h2spec test server
  2. Check out the branch containing the test server
  3. Run the test server on a local port with a certificate and key
  4. Open Firefox to the local test page
  5. Select the test case that sends a DATA frame with an invalid pad length

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

HTTP/2 is a newer version of the protocol browsers use to talk to websites. Each chunk of data a server sends carries a small header saying how much padding (filler bytes) follows; here the server claimed more filler than it actually sent. Firefox trusted that number and crashed rather than treating it as a broken connection.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.