You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When querying groups defined in /etc/group, osquery ignores the group if the line in /etc/group exceeds a certain length, and it ignores any groups below that line too.
What operating system and version are you using?
version = 20.04.6 LTS (Focal Fossa)
platform = ubuntu
if (bufsize > 16384) { /* Value was indeterminate */
bufsize = 16384; /* Should be more than enough */
}
And especially the fact that _SC_GETGR_R_SIZE_MAX it's a bit of a misnomer, and it's only the initial suggested buffer size.
For instance on my ArchLinux machine is 1024 bytes. I think we should not use that and just allocate the buffer at the maximum size we are comfortable to allocate.
Bug report
When querying groups defined in
/etc/group
, osquery ignores the group if the line in/etc/group
exceeds a certain length, and it ignores any groups below that line too.What operating system and version are you using?
What version of osquery are you using?
version = 5.12.2
What steps did you take to reproduce the issue?
/etc/group
and add 71 users tofoogroup1
What did you expect to see?
$ osqueryi 'select * from groups'
should return all groupsWhat did you see instead?
By removing the 71st user, the group query worked (returned all groups in
/etc/group
).The text was updated successfully, but these errors were encountered: