New issue
Advanced search Search tips

Issue 810068 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

ZoneIdentifierPresentForFile inaccurate on Windows 10 Insider builds

Project Member Reported by elawrence@chromium.org, Feb 7 2018

Issue description

Chrome Version: 66
OS: Windows 10 1709/17074

What steps will reproduce the problem?
 
 1. Download an EXE on Windows 10
 2. Look at chrome://histograms/Download.AttachmentServices.Result 

Observe: Bucket 1 (SUCCESS_WITHOUT_MOTW) was recorded
Expect: Bucket 0 (SUCCESS_WITH_MOTW) is recorded

Problem: ZoneIdentifierPresentForFile() includes the following test:

  std::vector<base::StringPiece> lines =
      base::SplitStringPiece(zone_identifier_contents, "\n",
                             base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
  return lines.size() == 2 && lines[0] == "[ZoneTransfer]" &&
         lines[1].find("ZoneId=") == 0;

The problem is that Windows 10 introduces new lines to this file, e.g. 

  [ZoneTransfer]
  ZoneId=3
  HostUrl=about:internet
  ReferrerUrl=http://whatever/

(See https://twitter.com/ericlaw/status/903065616055185409)

The presence of the third line in the file means that lines.size() returns 3.

While introducing a full .INI parser here is probably unreasonable, changing |lines.size() == 2| to |lines.size() > 1| would be simple and resolve the issue for the latest format of the file.

Alternatively, we could check to see if ANY line has a ZoneId specified.
 
Owner: elawrence@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/39af10aac0db71b88d7b85b7ee13aeca07fb9f54

commit 39af10aac0db71b88d7b85b7ee13aeca07fb9f54
Author: Eric Lawrence <elawrence@chromium.org>
Date: Mon Feb 12 19:05:15 2018

Correct ZoneIdentifierPresentForFile test for Windows 10

Current builds of Windows 10 introduce new lines to the Zone.Identifier
alternate data stream file, causing our metrics to record the wrong
value. Loosen the criteria so that the metric is recorded correctly.

Bug:  810068 
Change-Id: I4fe209cbde9f7bb8a7289998732a2317c4194f20
Reviewed-on: https://chromium-review.googlesource.com/907747
Reviewed-by: Asanka Herath <asanka@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Eric Lawrence <elawrence@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536149}
[modify] https://crrev.com/39af10aac0db71b88d7b85b7ee13aeca07fb9f54/content/common/quarantine/quarantine_win.cc

Status: Fixed (was: Started)
Labels: Needs-Feedback
Tested the issue on latest chrome version 66.0.3346.0 using windows-10 with steps mentioned below:
1) Launched chrome version and entered chrome://histograms/Download.AttachmentServices.Result 
2) Observed "Stats accumulated since browser startup. Reload to refresh."
Observations: Checked the same behaviour on 66.0.3326.0, when enterted "chrome://histograms/Download.AttachmentServices.Result" observed " Stats accumulated from browser startup to previous page load; reload to get stats as of this page load."

@elawrence:
Please find the attached screen shot for your reference and let us know the excepted behaviour for verifying the fix.

Thanks!
810068.PNG
331 KB View Download
Labels: M-66
Status: Verified (was: Fixed)
Re #5: To verify, you must download an internet executable (e.g. https://bayden.com/dl/sr-setup.exe) on Windows, then look at the recorded metric.

I've verified the behavior is correct in Chrome Canary version 66.3347.

Sign in to add a comment