Skip to content

Report incorrect group information in users#2190

Merged
djc merged 1 commit intorustsec:mainfrom
danth:patch-1
Jun 3, 2025
Merged

Report incorrect group information in users#2190
djc merged 1 commit intorustsec:mainfrom
danth:patch-1

Conversation

@danth
Copy link
Contributor

@danth danth commented Jan 15, 2025

This is already documented in ogham/rust-users#44 regarding listing the groups for the current process. However, this also affects listing the supplementary groups for a particular user.

I discovered this while implementing a file server which controls access based on the underlying filesystem permissions. If the file in question was owned by the root group, then it would inadvertently be accessible to everyone, as they are believed to be a member of that group.

There may be other applications out there doing something similar, hence I think it's important to raise this as a security issue and not just a general bug.

The boundary for the affected versions is based on this commit and this commit, where the functionality was first introduced.

@danth danth marked this pull request as draft January 15, 2025 02:31
@danth danth marked this pull request as ready for review January 15, 2025 02:39
@danth danth requested a review from riking June 2, 2025 13:51
@danth danth requested a review from djc June 3, 2025 00:49
Versions older than 0.8.0 do not contain the affected functions, so downgrading
to them is a workaround.

## Recommended alternatives
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I think we have to be a bit careful in our wording here. Suggest to replace "Recommended" with "Potential".

(Also, would be nice to add an empty line after the section title.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section was copied word-for-word from the previous report on users

@djc djc merged commit 0c55633 into rustsec:main Jun 3, 2025
1 check passed
@djc
Copy link
Member

djc commented Jun 3, 2025

@danth thanks for your work on this!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants