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 92DB746FF3 for ; Tue, 25 Jul 2023 02:28:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8CC6868C82B; Tue, 25 Jul 2023 05:28:31 +0300 (EEST) Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ACBF268C755 for ; Tue, 25 Jul 2023 05:28:24 +0300 (EEST) Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-1bb98474b8cso98014fac.3 for ; Mon, 24 Jul 2023 19:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690252103; x=1690856903; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=HnNkaF8h4VlwIxrATWB/mPK3jNDyHeefvAWkRPMt0cM=; b=eJIp1NFrkO14Qv2s/qI/FjjhcBb0ZHMTn5/SgOvfbp8Kt7CbYBRgGOvHk48CD52u6S ZTHgxBF9zC8X1K/RfKvBh8Qa1VqWDULcCi5CTNoItuAg7y125yhNYViMlx6PqxRr0zgR De6B/DG8CFZ6tVbqGr+F6qxj9R0SCbMWpUi9IrJR0ouzD02qm6t7nsvpED0BVQSkUjgf osoMjOUqIJxD+a8ygbErFHaaqJHbdPyMjotJRBayAYFaeppZnelH1zBQVsYGLl0V65CG De+CToApHhH1cHlxW6jBNY2lytQwoJnwoubWVRRc4g/QhN8TaSkXptVaWvE8rrCId0YZ Sb1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690252103; x=1690856903; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HnNkaF8h4VlwIxrATWB/mPK3jNDyHeefvAWkRPMt0cM=; b=fp5KXTacXsMTcjgjc2qmWzdjtsZA6qAYbHK0gCkuYryIt1y9AjNYS7iJ5h89vbYwOU ehoJXZ4p8Axq0Xaroj+0k37BXA4T7+G0e+WnagkvaKkRA5F+2vzJ33JqXJDudo+YSgy1 rkRI4dYrCzXWtNtM1OIWjcKvP8dWqzkjAl/HHqv7XcvJU8P+0+euT3+VhpMC8BLzMhwU LRsurPobew3p/PqaKuj0b5WAJadPwORar4YNeGF+KVLhwyOlHihsvC9P9Mf0xieKCSOD q57U9UzMKqg5RdcGXV5MUG9kjI5WSUok9jEEQ8e65FeTvfUGq2p/zjlls6vTSPlOPpgi 9ENQ== X-Gm-Message-State: ABy/qLbzJDiE/qIJ4QtmltUA3QMtUFCVDw7wvs0Xhsd4BmceWu8dMHX7 hurh0fjFEbRDhlRyTICIYIDOJfz2miw= X-Google-Smtp-Source: APBJJlFo+oG3DC61HxfXhchYr01tL1PUiyjU4r/yqMv0TpXFGNX3XL6eGwyvZN5vx/gYm4HLAtzQLw== X-Received: by 2002:a05:6870:d207:b0:1b4:689b:209f with SMTP id g7-20020a056870d20700b001b4689b209fmr14751369oac.52.1690252102546; Mon, 24 Jul 2023 19:28:22 -0700 (PDT) Received: from [192.168.0.16] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id x16-20020a056830115000b006b9cc67386fsm4483806otq.66.2023.07.24.19.28.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Jul 2023 19:28:22 -0700 (PDT) Message-ID: Date: Mon, 24 Jul 2023 23:28:20 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230725004609.17750-1-michael@niedermayer.cc> <20230725004609.17750-3-michael@niedermayer.cc> From: James Almer In-Reply-To: <20230725004609.17750-3-michael@niedermayer.cc> Subject: Re: [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid an unchecked bytesteram read 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 7/24/2023 9:46 PM, Michael Niedermayer wrote: > The unchecked read caused the 2nd subsequent tell call to move backward resulting > in a negative length > > Fixes: assertion failure > Fixes: 60276/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5434126636023808 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/cbs_h2645.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c > index 34c5d1d372..21c8bc76d5 100644 > --- a/libavcodec/cbs_h2645.c > +++ b/libavcodec/cbs_h2645.c > @@ -695,7 +695,7 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx, > int nal_unit_type = bytestream2_get_byte(&gbc) & 0x1f; > unsigned int num_nalus = 1; > if(nal_unit_type != VVC_DCI_NUT && nal_unit_type != VVC_OPI_NUT) > - num_nalus = bytestream2_get_be16u(&gbc); > + num_nalus = bytestream2_get_be16(&gbc); > > start = bytestream2_tell(&gbc); > for(i = 0; i < num_nalus; i++) { LGTM. _______________________________________________ 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".