-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
helper/hasher general improvements (#41863)
* Fix a TOCTOU by opening the file handle and then doing stat(), instead of doning stat() and then opening. * Make sure this is a regular file, otherwise you could trick auditbeat into hashing an infinite source like a pipe. * Allow for rate (but not file size) to be infinite, this is needed for an upcoming new backend for module/system/process. * Finally, fix error messages that show up on ECS, see below. before: ``` failed to hash executable /d/e/beats/x-pack/auditbeat/auditbeat for PID 50751: failed to hash file /d/e/beats/x-pack/auditbeat/auditbeat: hasher: file size 143673152 exceeds max file size ``` after: ``` failed to hash executable /d/e/beats/x-pack/auditbeat/auditbeat for PID 50804: size 143673152 exceeds max file size ``` (cherry picked from commit 8b38b65)
- Loading branch information
1 parent
fb6f3f9
commit 38794f4
Showing
2 changed files
with
33 additions
and
14 deletions.
There are no files selected for viewing
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
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