diff options
author | Ondrej Mosnáček <omosnace@redhat.com> | 2018-06-05 11:00:10 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2018-06-19 10:33:04 -0400 |
commit | af85d1772e31fed34165a1b3decef340cf4080c0 (patch) | |
tree | ca0eeeab957a8724b475a47b0d2b1e27fdec4476 /drivers/nvme | |
parent | d87de4a878e110d0061fb22726d37a54a281285d (diff) | |
download | linux-af85d1772e31fed34165a1b3decef340cf4080c0.tar.bz2 |
audit: Fix extended comparison of GID/EGID
The audit_filter_rules() function in auditsc.c used the in_[e]group_p()
functions to check GID/EGID match, but these functions use the current
task's credentials, while the comparison should use the credentials of
the task given to audit_filter_rules() as a parameter (tsk).
Note that we can use group_search(cred->group_info, ...) as a
replacement for both in_group_p and in_egroup_p as these functions only
compare the parameter to cred->fsgid/egid and then call group_search.
In fact, the usage of in_group_p was even more incorrect: it compares to
cred->fsgid (which is usually equal to cred->egid) and not cred->gid.
GitHub issue:
https://github.com/linux-audit/audit-kernel/issues/82
Fixes: 37eebe39c973 ("audit: improve GID/EGID comparation logic")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'drivers/nvme')
0 files changed, 0 insertions, 0 deletions