[FFmpeg-devel] [PATCH 1/3] avformat/dashdec: fail on probing non mpd file extension

Tobias Rapp t.rapp at noa-archive.com
Wed May 10 09:44:31 EEST 2023


On 09/05/2023 22:44, Michael Niedermayer wrote:

> On Tue, May 09, 2023 at 08:19:36AM +0200, Anton Khirnov wrote:
>> Quoting Michael Niedermayer (2023-05-09 00:35:08)
>>> [...]
>>> would anyone be opposed to return 0 from dash_probe() when
>>> both the mime_type and the extension are wrong ?
>> I would.
>>
>> probe() is for probing, not implementing security policies. IMO trying
>> to fix security issues at the wrong layer will only lead to more
>> confusion, more complexity, and LESS security.
> YES i agree, probe is not for security policies
>
> Its for probing but IMHO
> If you have a
> taxreport.pdf that parses correctly as jar and installs jRAT if you execute it
> Then it would be valid for probe() to identify this as type exploit instead
> of type jar. And doing so would be more secure.
>
> This is really more along the line of thought here for hls too.
> a file with avi/mkv/mov/mxf/mpg/mp4 extension is not a hls playlist
> Could someone have added that extension by mistake, yes
> similarly your jar file could be named .pdf by mistake. But thats not
> a good default assumtation and i dont think anyone would assume that
> by default.
>
> thx
>
> [...]

But if the application expects a HLS playlist would it really be a 
problem if the input file ends with .avi or some other extension? The 
probe function just doesn't know what the application expects. 
Expectation and actual input type are aligned after probe.

Regards, Tobias



More information about the ffmpeg-devel mailing list