[vtk-developers] Strange problem with vtkPLYReader

Will Schroeder will.schroeder at kitware.com
Thu Aug 10 14:22:12 EDT 2017


>
> Yup, which is a huge weakness of VTK, IMNSHO.


Actually this is true of almost every scientific computing program that I
have ever used, not just VTK.

But the alternative is crashing upon invalid data.


Another alternative is to assume that users are intelligent and know what
they are doing and can figure out problems (very naive I know) :-) Vetting
data is simple in concept but way worse than we think because if you carry
it to extreme you've got to do things like check whether polygons are
flat/non-self intersecting, cells are not turned inside out, data values
are valid and indeed within the range specified, data time series are
mutually consistent, etc. Like everything there are tradeoffs between
getting stuff done and perfection, whatever the heck that is anyway :-)
There are reasonable things to do but all in balance. I am going to
continue to advocate that we need to keep thinking about new algorithms and
designs (high-level stuff) and avoid getting stuck in the morass of
technical perfection. What makes systems successful in the end are
impactful capabilities--solving important problems--not the perfection of
implementation. So if you've got some cycles to fuzz, I would go in the
directions of added capabilities :-)

Best,
W


On Thu, Aug 10, 2017 at 1:59 PM, Sean McBride <sean at rogue-research.com>
wrote:

> On Thu, 10 Aug 2017 13:38:28 -0400, Will Schroeder said:
>
> >>In which case one may reasonably argue that the PLYReader is indeed
> broken,
> >>for failing to reject invalid files.
> >
> >You are opening a can of worms here. I would humbly suggest that in most
> >all file formats in VTK if the data is invalid then bad things will
> happen.
>
> Yup, which is a huge weakness of VTK, IMNSHO.
>
> >If you want to make a sanity check as part of the read process then do it
> >as an optional step because fully vetting data can take forever.
>
> Vetting the data does take time, yes.  Sometimes the code can be factored
> such that the validation happens at one level, and some lower level
> function can assume it's valid.
>
> But the alternative is crashing upon invalid data.  That's bad, especially
> when dealing with data from untrusted sources like files or the network.
> This is how we're in a world where opening maliciously crafted
> jpeg/pdf/font/etc files can be used to run arbitrary code and do all kinds
> of nastiness.
>
> If I had infinite time, fuzzing the VTK readers would be a fun project...
>
> Sean
>
>
>


-- 
William J. Schroeder, PhD
Kitware, Inc. - Building the World's Technical Computing Software
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com
http://www.kitware.com
(518) 881-4902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170810/81d34802/attachment.html>


More information about the vtk-developers mailing list