You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a scenario with an invalid distinct (invalid as in invalid expr expression) results to a runtime crash. The crash seems to happen when the bucket is poured/instantiated for the first time.
What did you expect to happen?
No crash
How can we reproduce it (as minimally and precisely as possible)?
Having a scenario such as:
type: leakyformat: 3.0debug: truename: crowdsecurity/appsec-outofband-ban-HEADER-VALUEdescription: "Ban IPs repeateadly triggering out of band rules"filter: "evt.Meta.log_type == 'appsec-info' && evt.Meta.rule_name == 'crowdsecurity/foobar-access'"distinct: foobar == something#distinct: req.Header.Get('something')leakspeed: "60s"capacity: 1groupby: evt.Meta.source_ipblackhole: 1m
(notice the invalid distinct expr)
Leads to a crash at runtime (when event is poured to bucket) :
DEBU[2024-12-02T15:47:05+01:00] Creating Live bucket cfg=red-field name=crowdsecurity/appsec-outofband-ban-HEADER-VALUE
ERRO[2024-12-02T15:47:05+01:00] crowdsec - goroutine crowdsec/LeakRoutine/crowdsecurity/appsec-outofband-ban-HEADER-VALUE crashed: runtime error: invalid memory address or nil pointer dereference
ERRO[2024-12-02T15:47:05+01:00] please report this error to https://github.com/crowdsecurity/crowdsec/issues
DEBU[2024-12-02T15:47:05+01:00] Created new bucket 1823a94770a3ab5ec73dd6800337a84dabaccfd1 cfg=red-field name=crowdsecurity/appsec-outofband-ban-HEADER-VALUE
ERRO[2024-12-02T15:47:05+01:00] stacktrace/report is written to ...crowdsec/crowdsec-v1.6.4-rc4-2-gbbe77529/tests/data/trace/crowdsec-crash.1373402735.txt: please join it to your issue
FATA[2024-12-02T15:47:05+01:00] crowdsec stopped
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
Enabled collections and parsers
$ cscli hub list -o raw
# paste output here
Acquisition config
```console
# On Linux:
$ cat /etc/crowdsec/acquis.yaml /etc/crowdsec/acquis.d/*
# paste output here
Check Releases to make sure your agent is on the latest version.
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
What happened?
Creating a scenario with an invalid
distinct
(invalid as in invalidexpr
expression) results to a runtime crash. The crash seems to happen when the bucket is poured/instantiated for the first time.What did you expect to happen?
No crash
How can we reproduce it (as minimally and precisely as possible)?
Having a scenario such as:
(notice the invalid distinct expr)
Leads to a crash at runtime (when event is poured to bucket) :
Trace being:
Anything else we need to know?
N/A
Crowdsec version
OS version
Enabled collections and parsers
Acquisition config
On Windows:
C:> Get-Content C:\ProgramData\CrowdSec\config\acquis.yaml
paste output here
Config show
Prometheus metrics
Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.
The text was updated successfully, but these errors were encountered: