Skip to content
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

Fixes out-of-memory fuzzing issue. #3469

Merged
merged 2 commits into from
Mar 12, 2021
Merged

Conversation

cyriltovena
Copy link
Contributor

Fixes Issue 28535 in oss-fuzz: loki:fuzz_parse_expr: Out-of-memory in fuzz_parse_expr

We were allowing non-utf8 and regex parsing would go crazy with this.

Signed-off-by: Cyril Tovena cyril.tovena@gmail.com

Fixes Issue 28535 in oss-fuzz: loki:fuzz_parse_expr: Out-of-memory in fuzz_parse_expr

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Copy link
Contributor

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -133,7 +134,12 @@ func (l *lexer) Lex(lval *exprSymType) int {

case scanner.String, scanner.RawString:
var err error
lval.str, err = strutil.Unquote(l.TokenText())
tokenText := l.TokenText()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a test case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying :P

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slim-bean slim-bean merged commit e29d536 into grafana:master Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants