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

Fix crash on API queries with Fedora 28 hardening and GCC 8 #6596

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

dnsmichi
Copy link
Contributor

@dnsmichi dnsmichi commented Sep 5, 2018

The actual fix is to handle nullptr references differently
for an empty filter expression. The other changes include
oob checks not necesarily involved.

fixes #6533

@dnsmichi dnsmichi added bug Something isn't working core/crash Shouldn't happen, requires attention labels Sep 5, 2018
@dnsmichi dnsmichi added this to the 2.10.0 milestone Sep 5, 2018
The actual fix is to handle nullptr references differently
for an empty filter expression. The other changes include
oob checks not necesarily involved.

fixes #6533
@dnsmichi dnsmichi force-pushed the bugfix/gcc-8-f28-hardening-crash branch from 8dd931c to 1f4f628 Compare September 6, 2018 07:56
@dnsmichi
Copy link
Contributor Author

dnsmichi commented Sep 6, 2018

Tested this on macOS so it doesn't break anything else.

@dnsmichi
Copy link
Contributor Author

dnsmichi commented Sep 6, 2018

This affects any request handler in the API, so I've tested other URL endpoints with and without the filter parameter too. Please do the same when reviewing this PR.

@lazyfrosch
Copy link
Contributor

How about a Unit test for FilterUtility? Should not be complicated since it is all static

@dnsmichi
Copy link
Contributor Author

dnsmichi commented Sep 6, 2018

I don't think that a unit test is that easy to implement with filter expressions, we should keep this out of this PR. I'm more interested in another pair of eyes looking at the fix :)

@dnsmichi dnsmichi merged commit dd59964 into master Sep 11, 2018
@dnsmichi dnsmichi deleted the bugfix/gcc-8-f28-hardening-crash branch September 11, 2018 18:44
@dnsmichi dnsmichi modified the milestones: 2.10.0, 2.9.2 Sep 12, 2018
dnsmichi pushed a commit that referenced this pull request Sep 20, 2018
The actual fix is to handle nullptr references differently
for an empty filter expression. The other changes include
oob checks not necesarily involved.

fixes #6533
refs #6596
@dnsmichi dnsmichi added the backported Fix was included in a bugfix release label Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Fix was included in a bugfix release bug Something isn't working core/crash Shouldn't happen, requires attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icinga2 crashes after using some api-commands on Fedora 28
2 participants