[rrd-developers] [BUG] rrd_open bugs when handling truncated files

Tobias Oetiker tobi at oetiker.ch
Sat Oct 4 00:53:46 CEST 2008


Hi Kevin,

thanks ... its in r1570

cheers
tobi

Yesterday kevin brintnall wrote:

> Tobi,
>
> Right now, truncated files may cause crashes with MMAP.  This is because
> we only MMAP the file size, but we write to memory based on which DS we
> think we're operating on.  Since there's no bounds checking after the file
> is opened, a truncated file may trigger a memory access outside of the
> mmap()'ed region.
>
> The following two patches fix the issue:
>
>   * The first patch makes sure that we do not extend past the end of the
>     file when reading the header.
>
>   * the second patch makes sure that the data portion of the file
>     is large enough, based on the ds_cnt and the total number of RRA rows
>
>
> _______________________________________________
> rrd-developers mailing list
> rrd-developers at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list