Skip to content

Commit

Permalink
x-pack/auditbeat/tracing: fix regexp for kprobe description line (ela…
Browse files Browse the repository at this point in the history
…stic#28609)

The pattern was previously lacking knowledge of the MAXACTIVE field that may be
present in return probes. The new pattern is slightly less strict than it could
be but is simpler for it.
  • Loading branch information
efd6 authored and wiwen committed Nov 1, 2021
1 parent 1335bc9 commit 51cf2d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- File integrity dataset: Remove non-ECS `hash.*` fields. Hashes are under `file.hash.*`. {issue}19039[19039] {pull}28378[28378]
- Auditd dataset: Removes the authentication_success and authentication_failure event.type values for user logins. {issue}19039[19039] {pull}28378[28378]
- Fix handling of long file names on Windows. {issue}25334[25334] {pull}28517[28517]
- System/socket dataset: Fix uninstallation of return kprobes. {issue}28608[28608] {pull}28609[28609]

*Filebeat*

Expand Down
5 changes: 4 additions & 1 deletion x-pack/auditbeat/tracing/tracefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ const (
)

var (
kprobeRegexp *regexp.Regexp = regexp.MustCompile("^([pr]):(?:([^/ ]*)/)?([^/ ]+) ([^ ]+) ?(.*)")
// p[:[GRP/]EVENT] [MOD:]SYM[+offs]|MEMADDR [FETCHARGS] : Set a probe
// r[MAXACTIVE][:[GRP/]EVENT] [MOD:]SYM[+0] [FETCHARGS] : Set a return probe
kprobeRegexp *regexp.Regexp = regexp.MustCompile("^([pr])[0-9]*:(?:([^/ ]*)/)?([^/ ]+) ([^ ]+) ?(.*)")

formatRegexp *regexp.Regexp = regexp.MustCompile("\\s+([^:]+):([^;]*);")
)

Expand Down

0 comments on commit 51cf2d8

Please sign in to comment.