<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Nice!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> David E DeMarle [mailto:dave.demarle@kitware.com]
<br>
<b>Sent:</b> Monday, April 10, 2017 9:54 AM<br>
<b>To:</b> Moreland, Kenneth <kmorel@sandia.gov><br>
<b>Cc:</b> Boeckel, Ben (External Contacts) <ben.boeckel@kitware.com>; Scott, W Alan <wascott@sandia.gov>; paraview-developers@paraview.org<br>
<b>Subject:</b> [EXTERNAL] Re: [Paraview-developers] strcpy and other bad actors<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">In related news...<br>
<a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/2675">https://gitlab.kitware.com/vtk/vtk/merge_requests/2675</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">David E DeMarle<br>
Kitware, Inc.<br>
R&D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: 518-881-4909<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Mon, Apr 10, 2017 at 11:36 AM, Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">If you are worried about malicious code, I would be even more worried about the use of sprintf. Like strcpy there is no check that the target buffer is not overrun, and it is much harder to predict how large of a buffer you will need to
 begin with. Plus, there are multiple points in the ParaView interface that allow users to pass format descriptors to sprintf from the GUI or a script. This could definitely be a target for malicious code. We could (and probably should) protected these by using
 snprintf, but in the cases where users pass in their own format descriptors they could do all sorts of weird stuff like read data off the stack.<br>
<br>
-Ken<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
-----Original Message-----<br>
From: Paraview-developers [mailto:<a href="mailto:paraview-developers-bounces@paraview.org">paraview-developers-bounces@paraview.org</a>] On Behalf Of Ben Boeckel<br>
Sent: Monday, April 10, 2017 7:48 AM<br>
To: Scott, W Alan <<a href="mailto:wascott@sandia.gov">wascott@sandia.gov</a>><br>
Cc: <a href="mailto:paraview-developers@paraview.org">paraview-developers@paraview.org</a><br>
Subject: [EXTERNAL] Re: [Paraview-developers] strcpy and other bad actors<br>
<br>
On Fri, Apr 07, 2017 at 20:41:52 +0000, Scott, W Alan wrote:<br>
> It made me start to wonder - do we care about ParaView (which of<br>
> course runs in user space).  I just looked, and there are about 1800<br>
> uses of strcpy in ParaView.  Is that an issue?<br>
<br>
As with many thing, it depends :) . I wouldn't object to moving to at least `strncpy`, but I suspect that just switching over to `std::string` would just be easier in the long run (since even `strncpy` has buffer calculations which can be done improperly).
 That may require some reworking around each change though, so is not likely scriptable.<br>
<br>
--Ben<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" target="_blank">
http://markmail.org/search/?q=Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" target="_blank">
http://markmail.org/search/?q=Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>