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 potential invalid memory access in IMReadReportAttributesResponseCallback #7966

Closed
yunhanw-google opened this issue Jun 28, 2021 · 1 comment

Comments

@yunhanw-google
Copy link
Contributor

Just to reiterate: if err is not CHIP_NO_ERROR at this point then the value of onSuccessCallback is generally speaking garbage we should not be examining it at all. Same for onFailureCallback. Nothing in the callbacks API definition guarantees that it will leave the values untouched on error, or set to anything in particular on error.

So if we got an error here, we are in fact "missing" both callbacks and the filter, as far as we're concerned. Or in other words, we should just log that the GetResponseCallback call failed and not try to log any details about the state of the callback manager, because we don't know those details here.

Originally posted by @bzbarsky-apple in #7634 (comment)

@erjiaqing
Copy link
Contributor

IMReadReportAttributesResponseCallback and similar callbacks are removed after landing cluster object, this should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants