[FFmpeg-trac] #8848(ffmpeg:new): A memory leak in ffmpeg
FFmpeg
trac at avcodec.org
Thu Aug 13 19:54:50 EEST 2020
#8848: A memory leak in ffmpeg
-------------------------------------+-------------------------------------
Reporter: MoonLight- | Type: defect
SteinsGate |
Status: new | Priority: normal
Component: ffmpeg | Version:
| unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug: A memory leak in function av_malloc of
libavutil/mem.c:87
How to reproduce:
{{{
% ffmpeg -i PoC
ffmpeg version is ffmpeg-4.1.3
built on Ubuntu 16.04.
}}}
I have found the bug by fuzzing. I compile ffmpeg-4.1.3 to x86-64 version
with address sanitizer in Ubuntu-16.04 and print the debug information as:
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --disable-stripping
--prefix=/home/ubuntu/yuetai/asan_programs/ffmpeg-4.1.3/ffmpeg-install/
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
[dv @ 0x61b000000080] Format dv detected only with low score of 25,
misdetection possible!
./crashes/avconv/seeds/queue/id:088235,src:077720,op:havoc,rep:64:
Input/output error
=================================================================
==28203==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 33192 byte(s) in 1 object(s) allocated from:
#0 0x7fc545a3c790 in posix_memalign (/usr/lib/x86_64-linux-
gnu/libasan.so.4+0xdf790)
#1 0x555a0a559cdc in av_malloc libavutil/mem.c:87
SUMMARY: AddressSanitizer: 33192 byte(s) leaked in 1 allocation(s).
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8848>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list