Samtools v1.22.1 Uncontrolled ... Note

Samtools v1.22.1 Uncontrolled Memory Allocation from Large BED Intervals Causes Denial-of-Service in Samtools/HTSlib

Posted by Ron E on Sep 30A denial-of-service vulnerability exists in Samtools and the underlying HTSlib when processing BED files containing extremely large interval values. The bed_index_core() function in bedidx.c uses the interval end coordinate to calculate allocation size without sufficient validation. By supplying a BED record with a crafted end coordinate (e.g., near 2^61), an attacker can trigger uncontrolled memory allocation requests via hts_resize_array_()....