Skip to content

usermod: TOCTOU race conditions #1579

@stoeckmann

Description

@stoeckmann

The usermod utility reads password and shadow entries before these files are locked. This happens in process_flags to see if any actions have to be performed.

While it's kind of okay to prevent unneeded operations, the actual content AFTER the lock should be compared again.

I leave this as an issue for now before this gets into the way of existing PRs.

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