<div dir="ltr"><div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:14.6667px">Thanks for the great feedback. </span><span style="font-size:14.6667px">Fixed all and attached the new zip (same password). I also reran the tests, but for 3) the Microsoft fuzz test seems to have no coverage. It keeps asking for sense data with aloc length of 0 (like 100 times).</span></font><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:14.6667px"> I artificially tested this by modifying the </span><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:14.6667px">allocLength </span><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:14.6667px">variable in kernel debugger.</span></div><div><br></div><div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:14.6667px"><br></span></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 14, 2015 at 1:41 PM, Thomas Freeman <span dir="ltr"><<a href="mailto:thomas.freeman@hgst.com" target="_blank">thomas.freeman@hgst.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Iuliu,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">The changes look good.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I have just a few comments.<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> nvmeSnti.C/Line 1157 –</span>
<b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">memset(pResponseBuffer, 0, allocLength);</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> This was added to the comment, but it’s not clear
why. I suspect it is an accidental addition. If so, this should be removed.<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">nvmeSnti.c/Line 1519 – Since the Lun value is actually written to the second byte of the entry, the comparison should be:<u></u><u></u></span></p>
<p><b><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">if (lunIdDataOffset + SINGLE_LVL_LUN_OFFSET >= allocLength</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">)<u></u><u></u></span></p>
<p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">As an example, test with a buffer size of 0x11. Without this change, the driver will actually write the byte after the allocated buffer.
<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>3.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">nvmeSnti.c/Line 2652 & 2669. Your change handles the case where there is no data buffer. But, it does not handle the case where the buffer is smaller
than sizeof(DESCRIPTOR_FORMAT_SENSE_DATA). With a small buffer allocation, these writes would access beyond the allocated buffer<u></u><u></u></span></p>
<p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">
</span><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">pSenseData->ErrorCode = FIXED_SENSE_DATA;<u></u><u></u></span></p>
<p><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d"> pSenseData->SenseKey = SCSI_SENSE_NO_SENSE;<u></u><u></u></span></p>
<p><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d"> pSenseData->AdditionalSenseLength = FIXED_SENSE_DATA_ADD_LENGTH;<u></u><u></u></span></p>
<p><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d"> pSenseData->AdditionalSenseCode = SCSI_ADSENSE_NO_SENSE;<u></u><u></u></span></p>
<p><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d"> pSenseData->AdditionalSenseCodeQualifier = 0;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Regards,<u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="line-height:90%"><b><span style="font-size:10.0pt;line-height:90%;font-family:"Arial",sans-serif;color:#1f497d">Tom Freeman</span></b><b><span style="font-family:"Arial",sans-serif;color:#1f497d"><u></u><u></u></span></b></p>
<p class="MsoNormal" style="line-height:90%"><b><span style="font-size:10.0pt;line-height:90%;font-family:"Arial",sans-serif;color:#1f497d">Software Engineer, Device Manager and Driver Development</span></b><span style="color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:90%"><span style="font-size:10.0pt;line-height:90%;font-family:"Arial",sans-serif;color:#1f497d">HGST, a Western Digital company</span><span style="color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:90%"><a href="mailto:thomas.freeman@hgst.com" target="_blank"><span style="font-size:10.0pt;line-height:90%;font-family:"Arial",sans-serif;color:#0563c1">thomas.freeman@hgst.com</span></a><span style="color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:90%"><span style="font-size:10.0pt;line-height:90%;font-family:"Arial",sans-serif;color:#1f497d"><a href="tel:507-322-2311" value="+15073222311" target="_blank">507-322-2311</a><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:90%"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="line-height:90%"><span style="font-size:11.0pt;line-height:90%;font-family:"Calibri",sans-serif;color:#1f497d"><img border="0" width="172" height="56" src="cid:image001.png@01D0EEFD.F0DEE360" alt="HGST_Logo_email"><u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:90%">
<span style="font-size:8.0pt;line-height:90%;font-family:"Arial",sans-serif;color:#1f497d">3605 Hwy 52 N
</span><span style="color:#1f497d"><br>
</span><span style="font-size:8.0pt;line-height:90%;font-family:"Arial",sans-serif;color:#1f497d">Rochester, MN 55901</span><span style="color:#1f497d"><br>
</span><a href="https://hgst.jiveon.com/external-link.jspa?url=http://www.hgst.com/" target="_blank"><span style="font-size:8.0pt;line-height:90%;font-family:"Arial",sans-serif;color:#0563c1">www.hgst.com</span></a><span style="color:#1f497d"><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<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"> <a href="mailto:nvmewin-bounces@lists.openfabrics.org" target="_blank">nvmewin-bounces@lists.openfabrics.org</a> [mailto:<a href="mailto:nvmewin-bounces@lists.openfabrics.org" target="_blank">nvmewin-bounces@lists.openfabrics.org</a>]
<b>On Behalf Of </b>Robles, Raymond C<br>
<b>Sent:</b> Friday, September 11, 2015 3:29 PM<br>
<b>To:</b> <a href="mailto:nvmewin@lists.openfabrics.org" target="_blank">nvmewin@lists.openfabrics.org</a><br>
<b>Subject:</b> [nvmewin] FW: NVME fuzz test fixes<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Intel Clear";color:#002060">All,
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Intel Clear";color:#002060"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Intel Clear";color:#002060">Here is the original patch from Google (Iuliu) for the WHCK fuzz tests.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Intel Clear";color:#002060"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Intel Clear";color:#002060">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Intel Clear";color:#002060">Ray<u></u><u></u></span></p>
<p class="MsoNormal"><a name="14fcd97962ab5f28__MailEndCompose"></a><span style="font-size:10.0pt;font-family:"Intel Clear";color:#002060"><u></u> <u></u></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">
</span><a href="mailto:nvmewin-bounces@lists.openfabrics.org" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">nvmewin-bounces@lists.openfabrics.org</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> [</span><a href="mailto:nvmewin-bounces@lists.openfabrics.org" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">mailto:nvmewin-bounces@lists.openfabrics.org</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">]
<b>On Behalf Of </b>Iuliu Rus<br>
<b>Sent:</b> Monday, August 03, 2015 1:37 PM<br>
<b>To:</b> </span><a href="mailto:nvmewin@lists.openfabrics.org" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">nvmewin@lists.openfabrics.org</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><br>
<b>Subject:</b> [nvmewin] NVME fuzz test fixes<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<div>
<p class="MsoNormal">I have attached the fixes we (Google) did for the several crashes / corruptions exposed by the Windows HCK fuzztest.exe.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">We have tested this on qemu/ Server 2012 R2.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">The password on the zip is "nvme" :)<u></u><u></u></p>
</div>
</div>
</div></div></div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><strong>HGST E-mail
Confidentiality Notice & Disclaimer:</strong><br>This e-mail and any files transmitted with it may contain confidential
or legally privileged information of HGST and are intended solely for the use
of the individual or entity to which they are addressed. If you are not the
intended recipient, any disclosure, copying, distribution or any action taken
or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error,
please notify the sender immediately and delete the e-mail in its entirety from
your system.<u></u><u></u></span></p></div>
<br>_______________________________________________<br>
nvmewin mailing list<br>
<a href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</a><br>
<a href="http://lists.openfabrics.org/mailman/listinfo/nvmewin" rel="noreferrer" target="_blank">http://lists.openfabrics.org/mailman/listinfo/nvmewin</a><br>
<br></blockquote></div><br></div>