From: "Rémi Denis-Courmont" <remi@remlab.net> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] [RFC] avformat: Add basic same origin check Date: Wed, 03 May 2023 22:35:48 +0300 Message-ID: <1848811.AjfgE4jnd7@basile.remlab.net> (raw) In-Reply-To: <20230503190526.GE1391451@pb2> Le keskiviikkona 3. toukokuuta 2023, 22.05.26 EEST Michael Niedermayer a écrit : > On Wed, May 03, 2023 at 07:07:09PM +0300, Rémi Denis-Courmont wrote: > The difference is with a dodgy link its the web browser that has to protect > the user. With a dodgy HLS file its ffmpeg that has to protect the user. Well, the browser does not protect the user in that case. At best, an antimalware plugin or proxy might catch it but that's pretty much it. In fact, origin checks don't protect against this, nor are they intended to (AFAIK). > > It is obviously not an ideal situation, but any restriction here will most > > definitely break existing use cases (and likely be abused by server > > operators to lock FFmpeg out). > > My goal is to make it more secure by default and to keep it reasonable > convenient to the user > > So to me at least, if i open an hls file and i get a popup asking me > "foobar.hls wants to access http://localhost/someexploit," > "[Allow] [Deny] [Allow Always] [Deny Always]" > thats a win and i wouldnt call that "Breaking" an existing usecase. > Nor is that allowing any server operator to lock FFmpeg out User dialogues are notoriously bad for security purposes, as users don't really have the necessary info to make the proper decision, and just learn to click Allow Always. All they achieve is absolve the developers from protecting the user, really. But even if, what will the criterion be? You'll match localhost. Okay. What about localhost.localdomain and 127.0.0.1? What about all the noncanonical writings of 127.0.0.1 and other addresses in 127.0.0.0/8, and their noncanonical writing? IPv6? What about the assigned external IP address of the host And so on, and that's just to prevent connections to localhost. Some browsers prevent connections to private IP addresses too, to "protect" the Intranet, but the flip side is to break corporate content and home file servers. > If we can make this more convenient to the user while keeping it secure we > should. But we should not make it more convenient than what can be done > securely. I appreciate the thought but without a clearly defined threat model, you can't define the security issue, and thus you can't hope to fix it. Meanwhile, you will break things, and if you're not careful, you might as well make it easier for publishers to deliberately block FFmpeg. > If you have a hls file that mixes local files and remote http(s) then you > need to override the default protocol whitelist. It makes sense for HLS manifests because HLS is by definition tied to HTTP, but that won't work for real playlists (M3U or other). -- レミ・デニ-クールモン http://www.remlab.net/ _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2023-05-03 19:35 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-02 19:36 Michael Niedermayer 2023-05-02 20:00 ` James Almer 2023-05-02 20:16 ` Michael Niedermayer 2023-05-02 20:57 ` James Almer 2023-05-02 21:15 ` Michael Niedermayer 2023-05-03 9:26 ` Anton Khirnov 2023-05-03 10:05 ` Hendrik Leppkes 2023-05-03 10:49 ` Michael Niedermayer 2023-05-03 12:24 ` Hendrik Leppkes 2023-05-03 19:08 ` Michael Niedermayer 2023-05-03 21:01 ` Timo Rothenpieler 2023-05-03 22:26 ` Michael Niedermayer 2023-05-03 9:23 ` Anton Khirnov 2023-05-03 11:16 ` Rémi Denis-Courmont 2023-05-03 13:33 ` Michael Niedermayer 2023-05-03 16:07 ` Rémi Denis-Courmont 2023-05-03 19:05 ` Michael Niedermayer 2023-05-03 19:35 ` Rémi Denis-Courmont [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1848811.AjfgE4jnd7@basile.remlab.net \ --to=remi@remlab.net \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git