-
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
[Auditbeat/FIM/fsnotify]: remove time window where a child file operation of a directory can be lost #39133
Merged
pkoutsovasilis
merged 5 commits into
elastic:main
from
pkoutsovasilis:pkoutsovasilis/fix_fsnotify_recursive
Apr 26, 2024
Merged
[Auditbeat/FIM/fsnotify]: remove time window where a child file operation of a directory can be lost #39133
pkoutsovasilis
merged 5 commits into
elastic:main
from
pkoutsovasilis:pkoutsovasilis/fix_fsnotify_recursive
Apr 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkoutsovasilis
added
backport-7.17
Automated backport to the 7.17 branch with mergify
bugfix
Team:Security-Linux Platform
Linux Platform Team in Security Solution
backport-v8.13.0
Automated backport with mergify
labels
Apr 22, 2024
botelastic
bot
added
needs_team
Indicates that the issue/PR needs a Team:* label
and removed
needs_team
Indicates that the issue/PR needs a Team:* label
labels
Apr 22, 2024
pkoutsovasilis
force-pushed
the
pkoutsovasilis/fix_fsnotify_recursive
branch
from
April 22, 2024 15:24
c7759a6
to
b56f1d6
Compare
…eration in of a directory can be lost
pkoutsovasilis
force-pushed
the
pkoutsovasilis/fix_fsnotify_recursive
branch
from
April 22, 2024 15:25
b56f1d6
to
ed523b2
Compare
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
…silis/fix_fsnotify_recursive
intxgo
reviewed
Apr 23, 2024
run docs-build |
Tacklebox
approved these changes
Apr 25, 2024
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
@@ -202,7 +207,7 @@ func TestRecursiveSubdirPermissions(t *testing.T) { | |||
for { | |||
// No event is received | |||
ev, err := readTimeout(t, watcher) | |||
if err == errReadTimeout { | |||
if errors.Is(err, errReadTimeout) { |
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 need to spend more time learning go-isms.
nfritts
approved these changes
Apr 25, 2024
mergify bot
pushed a commit
that referenced
this pull request
Apr 26, 2024
…tion of a directory can be lost (#39133) * fix(auditbeat/fim/fsnotify): remove time window where a child file operation in of a directory can be lost * fix(auditbeat/fim/fsnotify): remove redundant error wrapping (cherry picked from commit 074f221) # Conflicts: # auditbeat/module/file_integrity/monitor/recursive.go
6 tasks
6 tasks
6 tasks
pkoutsovasilis
added a commit
that referenced
this pull request
Apr 30, 2024
…where a child file operation of a directory can be lost (#39231) * [Auditbeat/FIM/fsnotify]: remove time window where a child file operation of a directory can be lost (#39133) * fix(auditbeat/fim/fsnotify): remove time window where a child file operation in of a directory can be lost * fix(auditbeat/fim/fsnotify): remove redundant error wrapping (cherry picked from commit 074f221) # Conflicts: # auditbeat/module/file_integrity/monitor/recursive.go * fix: resolve conflicts --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis
added a commit
that referenced
this pull request
Apr 30, 2024
…tion of a directory can be lost (#39133) (#39233) * fix(auditbeat/fim/fsnotify): remove time window where a child file operation in of a directory can be lost * fix(auditbeat/fim/fsnotify): remove redundant error wrapping (cherry picked from commit 074f221) Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis
added a commit
that referenced
this pull request
Apr 30, 2024
…tion of a directory can be lost (#39133) (#39232) * fix(auditbeat/fim/fsnotify): remove time window where a child file operation in of a directory can be lost * fix(auditbeat/fim/fsnotify): remove redundant error wrapping (cherry picked from commit 074f221) Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-7.17
Automated backport to the 7.17 branch with mergify
backport-v8.13.0
Automated backport with mergify
backport-v8.14.0
Automated backport with mergify
bugfix
Team:Security-Linux Platform
Linux Platform Team in Security Solution
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed commit message
This PR fixes lost events for file integrity module of Auditbeat. Specifically as captured here there is tiny time window where if a child file get's created right after the internal dir contents snapshot of filepath.Walk and before we add the path to the fsnotify watcher, this file is now off the radar.
Mutliple of this tiny windows have been present during some buildkite CI runs (#39110 (comment), #39109 (comment), #39108 (comment))
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
N/A
How to test this PR locally
Related issues
Use cases
N/A
Screenshots
N/A
Logs
N/A