Skip to content

One chunked syscall can consume multiple open-file descriptions after fd reuse #1261

Description

@CvvT

One bug found by specula

sys_readv validates the raw fd once, then read_from_iovec calls self.sys_read(fd, ...) again for each iovec chunk. If another task sharing FilesState closes and reopens the same raw fd between chunks, one readv can return bytes from two different open-file descriptions.

See the full report for more detail.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions