-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CVE-2018-20483 aka user.xdg.origin.url #2766
Comments
I want add to discussion - this is very important especially for TOR in Brave browser. |
Has anyone verified this issue repros in the new version of Brave? |
I can confirm that the current Linux version of brave-core is affected (Version 0.58.21 Chromium: 71.0.3578.98 (Official Build) (64-bit)):
Note that this metadata is not present when the file is downloaded in:
|
It looks pretty easy to patch out. The extended attributes are defined here and then set in this function. |
The URL and referrer are explicitly omitted when the user is in an off-the-record window. This is apparently from a Windows feature called the Mark of the Web which allows some software (e.g. MS Office, Windows Explorer) to treat these files are less trustworthy and display extra warnings or apply extra restrictions when they are opened. |
Note: Firefox doesn't set any Linux extended attributes on downloads in normal mode. |
@diracdeltas suggested looking into spoofing the value of the URL to see if we can get the benefits of the Mark of the Web without having the exact URL in there. We could try setting the URL to |
I discussed this bug with someone who works on Windows Defender and he told me that the Mark of the Web is very important since A/V products will treat files from the Web as suspicious and do extra checks on them. Having the real URL and referrer means that these products can do additional reputation checks against the URLs that are included, however, they will still scan the files if the original URL has been scrubbed and replaced with a bogus one. What I therefore propose is to:
In addition, since we would no longer be leaking the original URL, we could also mark files that are downloaded in Private windows (but not Tor windows), which would be a security win. |
I did some more testing on Firefox for Windows and found that they add the alternate NTFS data stream with the same content in normal and private modes (and in Tor Browser Bundle):
Therefore they never leak the URLs at all. In contrast, Brave/Chromium on Windows will put the following in the NTFS data stream in normal windows:
and the following in Private and Tor windows:
|
It turns out that this metadata has been removed from Linux builds in Chromium 74.0.3691.0. Therefore the only platforms that need to be fixed (in normal mode) are Windows and macOS. |
This fixes brave/brave-browser#2766 by making the download metadata the same whether it's coming from normal, private or Tor windows.
This fixes brave/brave-browser#2766 by making the download metadata the same whether it's coming from normal, private or Tor windows.
This fixes brave/brave-browser#2766 by making the download metadata the same whether it's coming from normal, private or Tor windows.
I tested the fix for this on Windows, Mac and Linux using Nightly 0.65.16 and following the test plan in brave/brave-core#2100 (comment). |
Verified passed with
Verification passed on
Verification passed on
|
Description
Carried over from brave/browser-laptop#15344
Downloaded files are saving URLs from which are downloaded into «user.xdg.origin.url» or «user.xdg.referrer.url»
Steps to Reproduce
Actual result:
Expected result:
Reproduces how often:
Brave version (brave://version info)
Version 0.58.17 Chromium: 71.0.3578.98 (Official Build) (64-bit)
Reproducible on current release:
Website problems only:
Additional Information
The text was updated successfully, but these errors were encountered: