google / google/gvisor

Stop accepting unknown set socket options

Open
#2,947 1 comment 0 reactions 0 assignees View on GitHub
area: networking type: enhancement
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

Currently we return success when unknown socket options (opts) are set. This worked well when we supported a small number of socket options and had little data about which would be required. We should switch to rejecting unknown socket options, stubbing out specific options.

As part of this process, it is important that we don't miss any options which applications are currently relying on gVisor stubbing out.

Possible solutions:
- Collect data on socket options used by real applications and stub out all of them (upon verifying their legitimacy).
- Audit Linux codebase to determine which options it allows setting per socket type and stub out all of them.

Since we kind of already did the second one for our unimplemented syscall alerting, maybe we could use that?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.