-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
x-pack/auditbeat/module/socket/guess: fix creds trigger for newer kernels #37136
Conversation
516614e
to
44d90c4
Compare
This comment was marked as outdated.
This comment was marked as outdated.
44d90c4
to
3224a81
Compare
This comment was marked as outdated.
This comment was marked as outdated.
06da86f
to
070a3ec
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
070a3ec
to
37cff38
Compare
This comment was marked as outdated.
This comment was marked as outdated.
37cff38
to
0e6faf9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
0e6faf9
to
f8c5b67
Compare
This comment was marked as outdated.
This comment was marked as outdated.
f8c5b67
to
6312e56
Compare
This comment was marked as outdated.
This comment was marked as outdated.
5aa90ab
to
a5d8049
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
func (g *guessStructCreds) Trigger() error { | ||
syscall.Syscall(unix.SYS_ACCESS, 0, 0, 0) | ||
return nil | ||
name, err := unix.BytePtrFromString("omg") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use a more unique string here __guess_creds or something.
if err := seccomp.ModifyDefaultPolicy(seccomp.AddSyscall, | ||
"mremap", | ||
"umask", | ||
); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solely whitespace changes would be nicer in a second commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but unfortunately this will all get squashed.
a5d8049
to
135fc9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsExpand to view the GitHub comments
To re-run your PR in the CI, just comment with:
|
This pull request is now in conflicts. Could you fix it? 🙏
|
…nels In kernel commit 981ee95c (into v6.3) calls to access_override_creds were gated behind a test for the requirement for the call. This change results in non-execution of prepare_creds and so failure of the guess. An alternative has been identified that does not exhibit this behaviour, mq_open which calls dentry_open with creds in the third parameter. So replace the sys_access trigger with sys_mq_open and add the probe to dentry_open with P3 for the address. Approach developed by Christiano Haesbaert.
135fc9f
to
29ce401
Compare
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsExpand to view the GitHub comments
To re-run your PR in the CI, just comment with:
|
…nels (#37136) In kernel commit 981ee95c (into v6.3) calls to access_override_creds were gated behind a test for the requirement for the call. This change results in non-execution of prepare_creds and so failure of the guess. An alternative has been identified that does not exhibit this behaviour, mq_open which calls dentry_open with creds in the third parameter. So replace the sys_access trigger with sys_mq_open and add the probe to dentry_open with P3 for the address. Approach developed by Christiano Haesbaert. (cherry picked from commit 284683d)
…nels (#37136) (#37214) In kernel commit 981ee95c (into v6.3) calls to access_override_creds were gated behind a test for the requirement for the call. This change results in non-execution of prepare_creds and so failure of the guess. An alternative has been identified that does not exhibit this behaviour, mq_open which calls dentry_open with creds in the third parameter. So replace the sys_access trigger with sys_mq_open and add the probe to dentry_open with P3 for the address. Approach developed by Christiano Haesbaert. (cherry picked from commit 284683d) Co-authored-by: Dan Kortschak <[email protected]>
…nels (elastic#37136) In kernel commit 981ee95c (into v6.3) calls to access_override_creds were gated behind a test for the requirement for the call. This change results in non-execution of prepare_creds and so failure of the guess. An alternative has been identified that does not exhibit this behaviour, mq_open which calls dentry_open with creds in the third parameter. So replace the sys_access trigger with sys_mq_open and add the probe to dentry_open with P3 for the address. Approach developed by Christiano Haesbaert.
@Mergifyio backport 7.17 |
✅ Backports have been created
|
…nels (#37136) In kernel commit 981ee95c (into v6.3) calls to access_override_creds were gated behind a test for the requirement for the call. This change results in non-execution of prepare_creds and so failure of the guess. An alternative has been identified that does not exhibit this behaviour, mq_open which calls dentry_open with creds in the third parameter. So replace the sys_access trigger with sys_mq_open and add the probe to dentry_open with P3 for the address. Approach developed by Christiano Haesbaert. (cherry picked from commit 284683d)
…nels (backport #37136) (#38027) In kernel commit 981ee95c (into v6.3) calls to access_override_creds were gated behind a test for the requirement for the call. This change results in non-execution of prepare_creds and so failure of the guess. An alternative has been identified that does not exhibit this behaviour, mq_open which calls dentry_open with creds in the third parameter. So replace the sys_access trigger with sys_mq_open and add the probe to dentry_open with P3 for the address. Approach developed by Christiano Haesbaert. (cherry picked from commit 284683d) --------- Co-authored-by: Dan Kortschak <[email protected]>
Proposed commit message
In kernel commit 981ee95c (into v6.3) calls to access_override_creds
were gated behind a test for the requirement for the call. This change
results in non-execution of prepare_creds and so failure of the guess.
An alternative has been identified that does not exhibit this behaviour,
mq_open which calls dentry_open with creds in the third parameter. So
replace the sys_access trigger with sys_mq_open and add the probe to
dentry_open with P3 for the address.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs