From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 3EF064DEA3 for ; Tue, 6 Jan 2026 22:45:38 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'FlgauRfILTr0mU3K9jofPFsxlr4Pl4a7yQDJRUYjzlc=', expected b'truYLYxB91WBsCWO7quaNarbmhOVX2TViTwVf7aRim4=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1767739524; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=FlgauRfILTr0mU3K9jofPFsxlr4Pl4a7yQDJRUYjzlc=; b=rghZnIc/g2786kV2H5r8X0oZSn/JRXj/wU+QBEqcxVQI/Q5S2K9/p8MHFSkEmzBH1Eb2P d6tF4GouR/+2aqFHoQbNAA2Zxm7fN7QPsXQz++y8DNlOAieOYhGnO9OQljRKjEik3ejDMiH 7tv8FkXwt1Fso1FbVIMU7azvPS004Lye6LtecLZmlgWz5TsuDnJAjDQCFAy2tsG9eT57y3O zeSmU+KJorIYCgyVrlQOW0qPf5Ggy9JKwj4YrBts+WoVxK8ECzrKr+IfkDwTk5uluH/Kgdk 4KPhmcDs7EGSGrEA3fhfWFJ+mtd5NVpRFZZ8FepiPz3uRRs8rocNyBS8QDxg== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 86E35690D30; Wed, 7 Jan 2026 00:45:24 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1767739507; b=A+gNbNMWtlaCgFV0G4sFiCDvrWx1gFmtcG3IlixgxlUY9wr/1ITQUG0LuvI2jDFSLd8R3 IMRmyvpMRDs3L5+VUYed2TRpze0yOVSNYJsZHe09/qJ5qB7ctDDUmXU32LvaLRZV+Xgz/PQ dYDHLjLlWw928hZp2hZaZkYLdG9WppVWOsZVoP9t57j+R2BCaPNRNKKW5TthNo0tAmwL60O xu1MM/i/MZQpi2cwvSxTE45URFJoycvT7d2WyyVZhiCk6kXIhqm7mbw6QfIS83FjmJZrc7t CjbkiX1A5upvYYrywk24EvCTypsuybmH4ClIDL3AmqVJkEYP6pruwdJhq1Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1767739507; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=nlv3yeDvP1rX7R0hFA3uWzKQfQu89zNVlHAJnG1tSdA=; b=JjsufQVmY7kIOOtvyrHNC4zYUX1cgSLc3hoDXsluyG9lW6Jia7XLaxijTdW1TYAFpw7m+ rJg2zXYpLUsudYeCQcc7lcNEP7neYjSC+tkdQFk17hecaVPZkw6AK4u4M9skZTSqopwTBpB UHcnZLUCNTgGxFrjlnwTgFhydPN1DDAMXxyILUxWP4uwr1bAf3zsKEDnxYSy5InFnFCQxjl 4LC9/DT1L8HTjSf4EI0fxP3JNrNAeI9NZprU/d2B1CpUrdo52BwX1a/UzE8EpU4YMa7ignn tDaSEEl+M0YmPKuK0qffGRZPM7/tRG8eX0FWs+0HdgrgvbBRIoliP2Y9CxHg== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1767739499; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=truYLYxB91WBsCWO7quaNarbmhOVX2TViTwVf7aRim4=; b=08AOSiBwOHsMQGKUHxE7xFxQa1661JZ01HfaJOgm4S/lsd4hN70EjDzo/3vdU1aHF0Fyw 0/ZrJm0dpA0b93Dl9Mo0DaEs8pDsIMJUX4ZSGY1DZ25+RnkfCi6KNiEP71Tpx1ldMz393/d K+Ol/LCVECJQVaRoEtNkgrvK1jHRgjsu21uWui5X166O73vJxJ3DnyHyuR4FzbuXo/ft8mq m+9Tf78CqVaxXmsVst2lsSbf53XIGEB2ZcMYSN1VZvzOU9S5xy+ipVMsgJ87DG5QjIXC9+3 t7IWfIfg9jzr33xe4I0eL36rU3LeZZ2GAEQA6vSJ95QmNdBEL+5aC08FA0sg== Received: from de3a2b3407a2 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 9378A68FB83 for ; Wed, 7 Jan 2026 00:44:59 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Tue, 06 Jan 2026 22:44:59 -0000 Message-ID: <176773949981.25.4530941136278636308@4457048688e7> Message-ID-Hash: EY5D5Q2AHDXOHROGBDT6G4JCWZWKI476 X-Message-ID-Hash: EY5D5Q2AHDXOHROGBDT6G4JCWZWKI476 X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PR] libavformat/http: Check proto (PR #21400) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: michaelni via ffmpeg-devel Cc: michaelni Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21400 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21400 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21400.patch Fixes: YWH-PGM40646-10 Redirects did not have their protocol checked, this patchset ensures they are within the white/black lists and also are only http / https >>From 13af9a614ae2524c725e9022b242a527c7d15384 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 6 Jan 2026 23:29:18 +0100 Subject: [PATCH 1/2] avformat/http: Check that the protocol of redirects is http or https Fixes: YWH-PGM40646-10 Signed-off-by: Michael Niedermayer --- libavformat/http.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/http.c b/libavformat/http.c index bd25a45636..58c704a7ad 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -253,7 +253,11 @@ static int http_open_cnx_internal(URLContext *h, AVDictionary **options) if (err < 0) goto end; } + } else if (strcmp(proto, "http")) { + err = AVERROR(EINVAL); + goto end; } + if (port < 0) port = 80; -- 2.49.1 >>From 032b0a2ff54bb79f323465a84786da7a3331e17d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 6 Jan 2026 23:30:47 +0100 Subject: [PATCH 2/2] avformat/http: Check white and blacklists on redirects Noticed while fixing the previous Signed-off-by: Michael Niedermayer --- libavformat/http.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavformat/http.c b/libavformat/http.c index 58c704a7ad..6ee498b4df 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -242,6 +242,16 @@ static int http_open_cnx_internal(URLContext *h, AVDictionary **options) proxy_path && av_strstart(proxy_path, "http://", NULL); freeenv_utf8(env_no_proxy); + if (h->protocol_whitelist && av_match_list(proto, h->protocol_whitelist, ',') <= 0) { + av_log(h, AV_LOG_ERROR, "Protocol '%s' not on whitelist '%s'!\n", proto, h->protocol_whitelist); + return AVERROR(EINVAL); + } + + if (h->protocol_blacklist && av_match_list(proto, h->protocol_blacklist, ',') > 0) { + av_log(h, AV_LOG_ERROR, "Protocol '%s' on blacklist '%s'!\n", proto, h->protocol_blacklist); + return AVERROR(EINVAL); + } + if (!strcmp(proto, "https")) { lower_proto = "tls"; use_proxy = 0; -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org