[Analyzer] SocketTransportOptions.MaxReadBufferSize, MaxWriteBufferSize set to null, 0, max value
Open
analyzer
area-networking
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
A value of null or 0 disables backpressure entirely allowing unlimited buffering. Unlimited server buffering is a security risk given untrusted clients.
### Describe the solution you'd like
An analyzer that looks for SocketTransportOptions.MaxReadBufferSize, MaxWriteBufferSize and detects what value it is set to.
Should check for all problematic values: null, 0, max value (has issues of its own). The analyzer should warn.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.