Skip to content

Conversation

@ryalanms
Copy link
Member

Update branding for 3.1.6

Includes the merge from internal/release/3.1 (847da8f) which resulted in no changes after resolving merge conflicts. No MSRCs were taken for this release, so that is expected.

dotnet-bot and others added 11 commits January 14, 2020 19:52
…4de4-930c-a2dfacbe8d40 into internal/release/3.1
…Sequence` method which could lead to code execution [.Net Core 3.1] - Missing variant fix

[Bug 1092072](https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1092072): MSRC 54120: XAMLReader.Load used by `GetFixedDocumentSequence` method which could lead to code execution [.Net Core 3.1] - Missing variant fix

## **Description**
Loose xaml can contain executable payload e.g. `ObjectDataProvider`. This XAML can be included as part of `XpsDocument`s in their `FixedDocumentSequence` or `FixedPage`.

In WPF, we were allowing `XpsDocument`s to be loaded freely via `XamlReader.Load`.

This exposes an attack vector - when a user downloads an XPS file from the internet for viewing, they could end up executing untrusted code.

The fix is to identify known dangerous `Type`s and limit them from being deserialized during XAML loading. In order to accomplish this, we previously added new non-public overloads to the `XamlReader.Load` method to enable the use of `RestrictiveXamlXmlReader`.`RestrictiveXamlXmlReader` restricts known dangerous `Type`s from being loaded while deserializing xaml.

One of these dangerous `Type`s is `System.Windows.ResourceDictionary`, which is a valid `Type` in XML schema. To allow this valid `Type` we added another non-public overload to the `XamlReader.Load` method which takes an additional parameter, safeTypes, a list of `Type`s which can be loaded safely. We also added a new constructor to the `RestrictiveXamlXmlReader` which takes an additional parameter of safeTypes which are marked as safe to load for this instance of the `RestrictiveXamlXmlReader`.

### **Customer Impact**
Customers would be protected from opening potentially-compromised XPS documents.

### **Regression**
No. This security issue was reported by an external party.

### **Risk - Low**
- This change only affects loading XPS documents.
- The change has been tested well internally.
  - We ran regression tests to ensure nothing else is inadvertently broken.
  - Validated against POC to ensure that the fix works as intended.
…41ec-ae19-7278e25b4774 into internal/release/3.1
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jun 11, 2020
@ryalanms ryalanms force-pushed the release3.1-3.1.5-update branch from 271a294 to 0d0602a Compare June 11, 2020 18:58
@ryalanms
Copy link
Member Author

Thanks for reviewing.

@ryalanms ryalanms merged commit 2b430cd into dotnet:release/3.1 Jun 11, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Apr 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants