Skip to content

Conversation

@vseanreesermsft
Copy link
Contributor

No description provided.

dotnet-bot and others added 15 commits February 2, 2022 01:25
…in ASP.NET Core via FormPipeReader

# [6.0] MSRC 69432 - ASP.NET Core - Denial of service in ASP.NET Core via FormPipeReader

Fixes a bug in FormPipeReader where data without a delimiter will be buffered indefinitely, beyond configured limits.

## Description

When chunked data without a delimiter is sent to FormPipeReader, FormPipeReader will read the entire stream of data, starting from the beginning each time, without honoring configured length limits. This is because, after each read, it checks if `SequenceReader.Consumed` is greater than the configured limit, but `SequenceReader.Consumed` is 0 when no delimiter was found. Therefore the check against the length limit is never honored, and we continue to read data indefinitely, starting from the beginning of the stream each time.

## Customer Impact

Potential Denial-Of-Service attack on services using FormPipeReader

## Regression?

- [ ] Yes
- [ x ] No

[If yes, specify the version the behavior has regressed from]

## Risk

- [ ] High
- [ x ] Medium
- [ ] Low

The fix is a one-liner, and tests confirm a significant positive improvement on perf. There could be orthogonal issues that we've missed

## Verification

- [ x ] Manual (required)
- [ x ] Automated

## Packaging changes reviewed?

- [ x ] Yes
- [ ] No
- [ ] N/A

----

## When servicing release/2.1

- [ ] Make necessary changes in eng/PatchConfig.props

FormPipeReader
…t-efcore dnceng/internal/dotnet-runtime

 - Revert "Make UseUrls() override default hosting config (dotnet#39836)"
…ng/internal/dotnet-efcore

This pull request updates the following dependencies

[marker]: <> (Begin:1ac68a20-28fc-4e11-3a4d-08d961c5a689)
## From https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- **Subscription**: 1ac68a20-28fc-4e11-3a4d-08d961c5a689
- **Build**: 20220223.6
- **Date Produced**: February 24, 2022 6:36:40 AM UTC
- **Commit**: 0257e5c118d78ce1b4d5e514779240c929c4b8aa
- **Branch**: refs/heads/internal/release/6.0

[DependencyUpdate]: <> (Begin)

- **Updates**:
  - **Microsoft.EntityFrameworkCore.Tools**: [from 6.0.3 to 6.0.3][1]
  - **dotnet-ef**: [from 6.0.3 to 6.0.3][1]
  - **Microsoft.EntityFrameworkCore**: [from 6.0.3 to 6.0.3][1]
  - **Microsoft.EntityFrameworkCore.Design**: [from 6.0.3 to 6.0.3][1]
  - **Microsoft.EntityFrameworkCore.InMemory**: [from 6.0.3 to 6.0.3][1]
  - **Microsoft.EntityFrameworkCore.Relational**: [from 6.0.3 to 6.0.3][1]
  - **Microsoft.EntityFrameworkCore.Sqlite**: [from 6.0.3 to 6.0.3][1]
  - **Microsoft.EntityFrameworkCore.SqlServer**: [from 6.0.3 to 6.0.3][1]

[1]: https://dev.azure.com/dnceng/internal/_git/dotnet-efcore/branches?baseVersion=GC348a3ca&targetVersion=GC0257e5c&_a=files

[DependencyUpdate]: <> (End)

[marker]: <> (End:1ac68a20-28fc-4e11-3a4d-08d961c5a689)
@ghost ghost added this to the 6.0.x milestone Mar 8, 2022
@ghost
Copy link

ghost commented Mar 8, 2022

Hi @vseanreesermsft. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@Pilchie Pilchie added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Mar 8, 2022
@dougbu dougbu added the tell-mode Indicates a PR which is being merged during tell-mode label Mar 9, 2022
- reenable baseline validation
- set `$(IsPublicRuntime)` back to `true`
@vseanreesermsft vseanreesermsft requested a review from a team as a code owner March 9, 2022 05:48
@dougbu dougbu requested a review from wtgodbe March 9, 2022 18:20
@dougbu
Copy link
Contributor

dougbu commented Mar 9, 2022

@wtgodbe please confirm your change merged correctly. I didn't do anything special but would prefer an extra set of 👀 on it.

@dougbu dougbu merged commit f5d3816 into dotnet:release/6.0 Mar 9, 2022
@dougbu dougbu modified the milestones: 6.0.x, 6.0.4 Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework tell-mode Indicates a PR which is being merged during tell-mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants