-
Notifications
You must be signed in to change notification settings - Fork 39
group_access_list() always adds group 'root' #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
since |
(users PR 45) Fix group listing: don't add root every time Resolves ogham/rust-users#44
hey, is there CVE assigned for this vulnerability? |
CVE-2025-5791 seems to have been assigned for this issue. |
Hi, I'm kinda new at rust, but I think I have found a bug in this crate
Basically the function
group_access_list
should return the list the current available groups for the process...except it seems to always add the
root
groupThe bug might be here:
The vector has 1024 elements inside, default 0. Then the
libc::getgroups
will get, sayres = 42
groupsbut
buff.into_iter()
goes through all 1024 elements.The final
groups.dedup_by_key(|i| i.gid());
removes multiple occurrences of theroot
group.However, even that is probably kinda wrong since the docs say:
...meaning that the list
root,users,root
will not get deduped, correct?I have not checked for similar bugs elsewhere in the codebase
The text was updated successfully, but these errors were encountered: