Skip to content

Linux: implementation incorrectly returns errors on large buffers #32

@josephlr

Description

@josephlr

If the buffer passed to the Linux getrandom(2) system call is longer than 256 bytes, the buffer can be partially written. This happens when the system call is interrupted, which becomes more likely the longer the buffer is.

The current implementation returns an error in this case, when it should just try the call again, attempting to fill the remainder of the buffer.

Thanks to @briansmith's ring implementation, for pointing this out.

Metadata

Metadata

Assignees

No one assigned

    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