From patchwork Sat Jul 10 21:26:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 28890 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:bbc9:0:0:0:0:0 with SMTP id c9csp1648022ybk; Sat, 10 Jul 2021 14:33:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMYUrS/aQHHzuH6pzYK2rpd2sgJjfvqYpWuJSPHTfHfWSW2OkQ/7oawUQzWbWBOlWfP7Cj X-Received: by 2002:a17:907:97d2:: with SMTP id js18mr39063131ejc.517.1625952806899; Sat, 10 Jul 2021 14:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625952806; cv=none; d=google.com; s=arc-20160816; b=QJ8gcb0IJLJs6dcAf9OeL+LhzjzN19Uzl2Xjo1a0VwKEYoU8X+YkPUT+IimMzmFjII qklaz0rUDLb0FIWtqKeUfONXUHDhuvX7yGonmOg7zlfxnEQl1m6eBFM0ZoRV5t0Cu3ak 2bDEgZmvZ2c+PonjPkQJv00WN2a7JOWxmbrT5hAB9l5Rkt+0kjfkpm0yabhZE9mKbmWS BaBBrUCIy3A0skV2uHEYQPzbxocwdh3c+ePAyfbG1zCH54c0AHlDjDx95KmA6DtXBE9m V64DTntKuVqieVHo75DrjFY1JO9j0BoOrUZCdzxl5s9cUkJoDqYmtAwI/4uoM9M20W1J DPyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=dDUP/NDKQT3LNz079Qwh4pwtWQV38AyNth981C6QR5I=; b=qGAjdJp3v1oiTPMDAwm14NzHg2nXNoiTKT5QdRYF9qFoB1UIQ/UsvBsQtRHopI6hr7 /FA+uV1ZH6maT7xObcWsSWz0a1kt7umZR+WtAIycWMKira6TFdX521KB+GQZ3qeweSGe azJOI+z4QM9MFeiEjajo4u5v5aZKNxWVOdBjc+0hydsdZl5x93rO8KdjrDcXlqbvwfrK /xs4+r+XknYzl0YJwIVRBDROGodQkvLIg/awu7iP12+NKiNyr4M2PN8Fh6yY0DNunA9h +JMswDPjRLMHNCRmcqUqvZxFxW5iyyA0BpMITgIfVsCExzjtzR+dDTOWVrE+O7pa/wqX 0CAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ca23si6435190edb.106.2021.07.10.14.33.23; Sat, 10 Jul 2021 14:33:26 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9E3A868A58C; Sun, 11 Jul 2021 00:33:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe02-2.mx.upcmail.net (vie01a-dmta-pe02-2.mx.upcmail.net [62.179.121.158]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 172816899A4 for ; Sun, 11 Jul 2021 00:33:12 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1m2KVJ-006H0H-0C for ffmpeg-devel@ffmpeg.org; Sat, 10 Jul 2021 23:27:17 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 2KULmZl3MljeH2KULmoftN; Sat, 10 Jul 2021 23:26:17 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=BoHjPrf5 c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=nZOtpAppAAAA:20 a=mVzny28SqK9HmxzjsUcA:9 a=1fhp2MxaeJtTNGEnv6mo:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 10 Jul 2021 23:26:17 +0200 Message-Id: <20210710212617.28438-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfEhyQb81TwU0j158Qh5ijvVJTuhM8fn3iLxtznpaKr8wUYukIyyWoHI4xWNxr3TtcXHj6HKZJqKjbWusQRviYUNIBWHYQAB2KzLvLGCsNdudfBYvWSEi 5NLEazCwe1BTNjCX+gL9j+DCWtyppbTKACpJctptXwd1ABWybyC8bHaJ Subject: [FFmpeg-devel] [PATCH] avformat/aaxdec: Ask for a sample and disable COLUMN_FLAG_DEFAULT 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mjlyytR8ZNry Content-Length: 1575 The codepath repeatly seeks back to the same byte and fills the table with this Fixes: Timeout (reading billions of times the same byte) Fixes: 35510/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5742289044504576 I have not found any samples in our archive or the fate samples which use this codepath, also i found no specification. If anyone has either please reply Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/aaxdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c index 643bc5f9a5..1bf4b689c9 100644 --- a/libavformat/aaxdec.c +++ b/libavformat/aaxdec.c @@ -238,6 +238,10 @@ static int aax_read_header(AVFormatContext *s) for (uint64_t r = 0; r < a->nb_segments; r++) { if (flag & COLUMN_FLAG_DEFAULT) { data_offset = a->schema_offset + col_offset; + if (a->nb_segments > 1) { + avpriv_request_sample(s, "Column default"); + return AVERROR_PATCHWELCOME; + } } else if (flag & COLUMN_FLAG_ROW) { data_offset = a->rows_offset + r * a->row_width + col_offset; } else