libheif is a HEIF and AVIF file format decoder and encoder. In versions 1.21.2 and below, a crafted 792-byte HEIF sequence file with samples_per_chunk=0 in the stsc box causes an unsigned integer underflow in the Chunk constructor (m_last_sample = 0 + 0 - 1 = UINT32_MAX), mapping all samples to an empty chunk and resulting in a denial of service. When any sample is accessed, the library reads from index 0 of an empty std::vector, causing a guaranteed SEGV (null-page read). The file parses successfully without producing an error; the crash occurs on the first frame access. This issue has been fixed in version 1.22.0.
libheif versions 1.21.2 and below contain an integer underflow vulnerability in the stsc box parser that causes denial of service when processing crafted HEIF files. The vulnerability results in a guaranteed segmentation fault when accessing the first frame of a malicious file.
تحتوي مكتبة libheif على ثغرة تجاوز عدد صحيح غير موقع في مربع stsc حيث يؤدي samples_per_chunk=0 إلى حساب m_last_sample = UINT32_MAX. يتم تعيين جميع العينات إلى مجموعة فارغة، مما يسبب قراءة من فهرس غير صحيح عند الوصول إلى أي عينة. الملف يتم تحليله بنجاح دون إنتاج خطأ، لكن الانهيار يحدث عند محاولة الوصول إلى الإطار الأول.
مكتبة libheif في الإصدارات 1.21.2 وما دونها تحتوي على ثغرة تجاوز عدد صحيح في محلل stsc تسبب رفض الخدمة عند معالجة ملفات HEIF المصنعة. تؤدي الثغرة إلى انهيار مضمون عند الوصول إلى الإطار الأول من ملف خبيث.
Update libheif to version 1.22.0 or later. Organizations should immediately patch all systems using libheif versions 1.21.2 and below, particularly those processing user-supplied HEIF or AVIF image files. Implement input validation and file format verification before processing media files.
قم بتحديث libheif إلى الإصدار 1.22.0 أو أحدث. يجب على المنظمات تصحيح جميع الأنظمة التي تستخدم إصدارات libheif 1.21.2 وما دونها فوراً، خاصة تلك التي تعالج ملفات HEIF أو AVIF التي يوفرها المستخدمون. طبق التحقق من صحة المدخلات والتحقق من صيغة الملف قبل معالجة ملفات الوسائط.