mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-08 17:11:08 +00:00
avformat/hls: Enforce protocol checks when opening child playlists
Fix: vulnerability:019f3b84-903b-75fb-a8de-fad1c2d7e99c
The parse_playlist() path for opening a new child playlist (in == NULL)
directly called c->ctx->io_open(), bypassing the protocol whitelist and
file-extension checks that open_url() enforces. This allowed child URLs
from a master playlist to use protocols other than file/http/data or to
have disallowed extensions.
Route the !in branch through open_url() so that all child playlists are
subject to the same security policy as segment URLs.
Fixes a security bypass in HLS master playlist parsing.
Found-by: depthfirst
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
(cherry picked from commit 23602df9cd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
f6c97aeadc
commit
01044d0453
@@ -857,7 +857,7 @@ static int parse_playlist(HLSContext *c, const char *url,
|
||||
if (c->http_persistent)
|
||||
av_dict_set(&opts, "multiple_requests", "1", 0);
|
||||
|
||||
ret = c->ctx->io_open(c->ctx, &in, url, AVIO_FLAG_READ, &opts);
|
||||
ret = open_url(c->ctx, &in, url, &opts, NULL, NULL);
|
||||
av_dict_free(&opts);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user