إرسال #846839: GPAC v0.9.0 - v2.5-DEV Double Freeالمعلومات

عنوانGPAC v0.9.0 - v2.5-DEV Double Free
الوصف A double-free vulnerability exists in GPAC MP4Box in the ISOBMFF NALU sample rewrite logic. The issue affects gf_isom_nalu_sample_rewrite() in src/isomedia/avc_ext.c when processing crafted AVC/HEVC samples through MP4Box -cat. During NALU rewriting, mdia->nalu_out_bs may be reassigned to directly reference sample->data. On normal paths the buffer is detached with gf_bs_get_content_no_truncate(), but when an invalid NAL size is encountered, the function returns through the goto exit error path without detaching mdia->nalu_out_bs->original from sample->data. This leaves nalu_out_bs->original pointing to a buffer that is later freed as part of sample cleanup. When the media box is destroyed, mdia_box_del() calls gf_bs_del() on nalu_out_bs. Since the bitstream is in GF_BITSTREAM_WRITE_DYN mode and original is still non-NULL, gf_bs_del() frees the same buffer again, resulting in a double-free. The vulnerability can be triggered by a crafted media file using: ./MP4Box -cat <crafted_file> white.mp4 -out /dev/null Successful exploitation can cause process crash and denial of service, and may lead to memory corruption depending on allocator behavior. The issue is fixed by ensuring the error path detaches the reused bitstream buffer before returning.
المصدر⚠️ https://github.com/gpac/gpac/issues/3403
المستخدم
 noki (UID 98507)
ارسال03/06/2026 02:28 PM (1 شهر منذ)
الاعتدال04/07/2026 07:16 AM (1 month later)
الحالةتمت الموافقة
إدخال VulDB376292 [GPAC حتى 2.5-DEV MP4Box src/isomedia/avc_ext.c gf_isom_nalu_sample_rewrite nalu_out_bs تلف الذاكرة]
النقاط20

Interested in the pricing of exploits?

See the underground prices here!