Infinite reload of 201, 203, 204 responses
Categories
(Core :: Audio/Video, defect, P3)
Tracking
()
People
(Reporter: jannis, Assigned: jhlin, NeedInfo)
References
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0
Steps to reproduce:
Visiting a URL that has status-code=203, content-type=video/mp4 and and empty body (https://demo.websec.saarland/echo/?ecohd_status=203&content-type=video/mp4) will bring the browser to reload/re-request the URL several times per second infinitely. This can be observed in the developer tools.
The same effect also happens when the URL is included as an audio, video, object, embed or iframe. The exact conditions of the response, i.e. which status-codes and content-types as well as whether the body has to be empty or not empty, depends on the inclusion method.
Status-codes: 201, 202, 203, 207, 208 and 226 with content-type: video/mp4 and an empty body work for audio, video, embed, object and iframe. Audio and video additionally accept audio/wav as a content-type.
Status-codes: 204 and 205 with content-type: video/mp4 or audio/wav and a non-empty body work for audio and video.
On this website there are several example inclusions that reload forever: https://demo.websec.saarland/static/reload_hell.html
Actual results:
The above mentioned responses are reloaded forever.
The browser will perform many requests and never finishes loading
Expected results:
The browser should not reload these resources (or abort reloading them after a limited amount of tries).
Comment 1•3 years ago
|
||
I don't know if this is the right networking behavior, but it's not really a security problem. if you wanted to keep someone's browser busy loading stuff you can just open a socket or a super big image file or something.
Comment 2•3 years ago
|
||
The reload is not happening in necko.
I also see that necko channel is closed with error NS_ERROR_PARSED_DATA_CACHED.
Moving this to media.
Assignee | ||
Comment 3•3 years ago
|
||
It's caused by ChannelMediaResource
[1]. After removing the offset == 0
condition FF stops reloading infinitely. I will investigate further to see how to make the case works.
[1] https://searchfox.org/mozilla-central/source/dom/media/ChannelMediaResource.cpp#345-386
Comment hidden (spam) |
Comment hidden (spam) |
Comment hidden (spam) |
Description
•