Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Connection not terminated for invalid/ill-formed requests #181

@moozzyk

Description

@moozzyk

If a client sends an incorrect request the connection should be terminated. What happens now is that the connection is not terminated and new data are appended to the buffer but the data from the buffer are never removed so the buffer grows. Kestrel does throw if the data is incorrect (https://github.com/aspnet/KestrelHttpServer/blob/dev/src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs#L560) but the exception is then caught logged and swallowed (https://github.com/aspnet/KestrelHttpServer/blob/dev/src/Microsoft.AspNet.Server.Kestrel/Http/Connection.cs#L87)

Repro steps:

  • With telnet send \r\n to the server

Expected behavior:

  • the connection is closed

Actual behavior:

  • you can continue typing. with each new character an exception will be thrown on the server side. buffer grows. the connection is never closed

Should we do some fuzzing tests in general?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions