From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 14AF641D15 for ; Wed, 15 Dec 2021 20:41:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ECECF68AE51; Wed, 15 Dec 2021 22:41:47 +0200 (EET) Received: from mail-il1-f181.google.com (mail-il1-f181.google.com [209.85.166.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3DEF56897E7 for ; Wed, 15 Dec 2021 22:41:41 +0200 (EET) Received: by mail-il1-f181.google.com with SMTP id t7so3925752iln.12 for ; Wed, 15 Dec 2021 12:41:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandflow-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=aazvfNbol9+b9jc41byFVSH3n10w5ey2wWD/nnfutzM=; b=CpwqjA5egnLLJoiG9XYPQ2miopHQixzvQmBlTntWShmOLKNQbdpREQN833O4VoriXh aloZ2dur566ffS/c8SfpUeeBTmHf8tioUyeL3xCCW/lGOHkfrZb50OtreSzlsDBdZkib 9uPTWC48biffFbrV45acHaFZxPcPsgU+FfdmI0rvpe/qnfuoDglAqj0oBf3Qa8AY1I2w iNh2MOgPg/ifjBNSYlrs152XPv4to/ZWmiPx+TkCvMtgim+jPcspVvWl1TsuT/u+iROB Pdh4XgfNvs5P1LHPixxyNZO45qmkfZ0ogXBPeagu1r4WnSxeWJuWxaXy2RY1ooIuf8kz n5fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=aazvfNbol9+b9jc41byFVSH3n10w5ey2wWD/nnfutzM=; b=W1BDTk7ue2XgsuoPwNPHvIyrstIV+DOop7znJqfAFA5h2NgVfYX5rKANuZNiAGG5Az smKhbR1JOd4poNGqhauyexwrdOr5+fv3+xncC+TFoNtPJHAUj001WQ1Nq9x+Bnsnv+XP N9tkkVjZtEqYu9KdY/P7k5/bLhZC8Xq6bLFwC9MqVKslF338yWpJyOpeti0yRnvrZw5j BOsQifGuI47SsqJpTcO+HqnEk36tM97tMAGmsC+f+zUZHZMcqAuKLji6VekbxQ9UiMeT IibVluS7ZcO+pCzD8dAWfNtvqUPLAj9vl6AtdKuZW3b+2dxT1MoClGiLlUCLPfoxLB2m 50DQ== X-Gm-Message-State: AOAM531o1P5eK8HnsVjjlH1V8k8ShS4wtoBXwSwjwqnl+EdiuWhlU7DZ 8ZlZ1XNoe67eo6rMzzAVVCXb9apRUiSXTA== X-Google-Smtp-Source: ABdhPJw/SyKtbYcVPFRxefbpSAeONGN5u9TsUVaWoLCqS8PTvCA0oxhi+sPM/clikqhTkLCNTKAfrQ== X-Received: by 2002:a92:c563:: with SMTP id b3mr7210391ilj.94.1639600899135; Wed, 15 Dec 2021 12:41:39 -0800 (PST) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com. [209.85.166.50]) by smtp.gmail.com with ESMTPSA id ay13sm1788858iob.37.2021.12.15.12.41.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Dec 2021 12:41:38 -0800 (PST) Received: by mail-io1-f50.google.com with SMTP id b187so32070893iof.11 for ; Wed, 15 Dec 2021 12:41:38 -0800 (PST) X-Received: by 2002:a05:6602:2e03:: with SMTP id o3mr7560494iow.14.1639600897787; Wed, 15 Dec 2021 12:41:37 -0800 (PST) MIME-Version: 1.0 References: <20211213054336.19783-1-pal@sandflow.com> <163947788654.13029.10298345109744593134@lain.red.khirnov.net> <163950889025.13443.18056291142265665105@lain.red.khirnov.net> <163959962513.13029.16441945709966296103@lain.red.khirnov.net> In-Reply-To: <163959962513.13029.16441945709966296103@lain.red.khirnov.net> From: Pierre-Anthony Lemieux Date: Wed, 15 Dec 2021 12:41:25 -0800 X-Gmail-Original-Message-ID: Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH v10 1/2] avformat/imf: Demuxer X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, Dec 15, 2021 at 12:20 PM Anton Khirnov wrote: > > Quoting Pierre-Anthony Lemieux (2021-12-15 01:17:26) > > > > > > Now the question is whether a malicious attacker can craft those two > > > files to get access to anything they shouldn't. I suppose at the very > > > least the attacker can get information that the user opened the file (by > > > adding an asset on an attacker's server) but that will be a danger with > > > any playlists allowing network resources and can be controlled with > > > io_open(). Can you think of any other possible issues? > > > > > > > Some security considerations: > > > > - a DDoS can conceivably occur if a malicious CPL+ASSETMAP is widely > > distributed. Both an ASSETMAP and a CPL are required since (a) the CPL > > does not contain paths/hyperlinks and (b) only those resources > > referenced by the CPL are fetched using the ASSETMAP. > > - the CPL uses XML, which has its own security considerations. For > > example, XML parsing can result in entities being fetched over the > > network, but this is disabled by default in libxml AFAIK. > > This is concerning. From a brief glance at libxml2, it seems that you > need to pass XML_PARSE_NONET as the last parameter to xmlReadMemory() to > actually disabling network fetching. > But it is possible I'm misreading the code, so if you or anyone else > understands this better then clarifications are welcome. I was referring to entity expansion and the loading of DTDs being disabled by default -- see XML_PARSE_NOENT and XML_PARSE_DTDLOAD at [1-2]. [1] http://xmlsoft.org/html/libxml-parser.html [2] https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html > > > - several elements/attributes of the IMF CPL use URIs as unique > > identifiers. These URIs could conceivably be dereferenced. > > Dereferencing these URIs is however not a requirement and the IMF > > demuxer does not do so. > > - IMF only uses MXF to wrap essence but supports various kinds of > > essence, e.g. Prores and J2K, each with its own security > > considerations > > The demuxer should not be concerned about what the user does with the > returned data. Only the behavior of the demuxer itself (and whatever > code it calls) is the question here. > > -- > Anton Khirnov > _______________________________________________ > 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". _______________________________________________ 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".