-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fluentbit crashes when channel does not exists or it is ignored #11198
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
base: master
Are you sure you want to change the base?
Fluentbit crashes when channel does not exists or it is ignored #11198
Conversation
WalkthroughAdded null-safety guards to the Windows Event Log input plugin. A check skips collection when active channels are absent in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
cosmo0920
left a comment
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.
We only need to guard NULL deref lines.
We shouldn't exit in_winevtlog plugin even if there's no active channels.
| /* If there are no active channels (e.g., all missing and ignored), | ||
| * there is nothing to collect. Guard against NULL to avoid dereferencing. | ||
| */ | ||
| if (ctx == NULL || ctx->active_channel == NULL) { | ||
| return 0; | ||
| } | ||
|
|
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.
We don't want to do this. This is because some sort of usages implies that there is no active channels but still wanted to run without collecting Windows EventLog.
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.