-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Crash doing message counter sync #13668
Comments
See also #13397 |
From the stack trace, it looks like a Message counter sync is received as a group message. Guessing that groups are not a secure session Unlikely to yet they want to get secure counters from secure sessions. |
Learning how to investigate this. So far I found:
|
@bzbarsky-apple - Do you by any chance have the reproduction file? https://github.com/google/fuzzing/blob/master/tutorial/libFuzzerTutorial.md seems to say that to reproduce crashes without re-running fuzzing, one would pass in the crash file (?) as an argument to the binary. |
For what its worth, after running fuzzing for a while, I seem to have 3 separate crash files in my directory. Will check to see if they have the same stack trace as this bug. |
Created a crash file with: open('crash-test', 'wb').write(binascii.a2b_base64('DgDxsfHx8fHtcwcAAAAAAAAAwQAAAAAAXPMlAAAAAAA=')) Crash test seems to say just 'Incorrect state' for ble. Did not see an obvious crash, but I may be building the wrong version of the app. |
Merging #14514 made it much harder for the fuzzer to reach the relevant code, because now we need an actual valid MIC and whatnot to reach it.... |
I will try to change things to reproduce it. For now ran the fuzzer on 12 cores for about 20 minutes and no crash yet (previous crashes I had were due to me pressing CTRL+C to stop the fuzzing) Created a fix of 'validate that input argument is indeed a secure session'. I also wonder if this may be a stateful thing as sessions are global state that the fuzzer likely does not reset. |
Group sessions are not global state, fwiw... |
I checked out ae05dfc and then was able to reproduce:
Will cherrypick my fix and validate |
I can confirm that the CP made the test not crash. |
From discussions with @bzbarsky-apple - it seems that this not really 'fix the crash' and more like 'group messaging does not implement MCSP' and existing code is not correct because it assumes 'secure session' (non-group) which would generally not work. This code path is supposed to only apply to groups. |
Problem
Finally got fuzzing stood up, ran the fuzzer, got:
Proposed Solution
Investigate why receiving the given payload:
as a message leads to the above attempt to treat a non-CASE session as a SecureSession.
The text was updated successfully, but these errors were encountered: