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
Will publishing is not working as expected when Will Delay Interval is longer than Session Expiry Interval #1401
Comments
Thanks for the good description, I'm looking at this now. |
I believe this is fixed in the |
@ralight thanks for the quick response. I just tested the fix and it works as expected 👍 |
@ralight I was running an automated test suite for an MQTT client that I'm writing for SwiftNIO and I noticed a race / crash still in play with LWT, Will Delay, and Session Expiry after the fix. It would be a little difficult for me to share that test suite since the project is still WIP (although I'm open to it if needed, since it's reproducing the bug consistently), but I was able to quickly put together a simple node.js script that often reproduces the same issue. I've attached the an archive of the node.js app that can reproduce the race / crash.
Let me know what you think / if it makes sense and I'm happy to provide more info to help close this out. Thanks again, |
I think the new commit sorts that out. |
@ralight tests pass – thanks 🙌 |
Thanks for confirming. |
@ralight: Can you confirm if this is CVE-2019-11778? |
Overview
The Will Message is not published when the Will Delay Interval is longer than the Session Expiry Interval.
Steps to Reproduce
Start the mosquitto broker
Add a subscriber to a
will-topic
topicAdd a subscriber with a LWT and Will Delay Interval that is longer than the Session Expiry Interval
Terminate the connection of the subscriber with the LWT using
⌃c
to trigger a disconnectExpected Results
The Will Message should be published when the session expires (after 5 seconds).
Relevant sections from the MQTT 5.0 spec:
Observed Results
The Will Message is not published when either the Will Delay Interval has elapsed or the session ends when the Will Delay Interval is longer than the Session Expiry Interval.
I've also sometimes seen the broker exit with a status of
139
after the Will Delay Interval (30 seconds in this example).Additional Notes
The Will Publish works as expected when the Will Delay Interval is shorter than the Session Expiry Interval.
The text was updated successfully, but these errors were encountered: