www/posts/2018/02/security-advisory-cve-2017-7651-cve-2017-7652.md
Mosquitto 1.4.15 has been released to address two security vulnerabilities.
A vulnerability exists in all Mosquitto versions up to and including 1.4.14 known as CVE-2017-7651.
Unauthenticated clients can send a crafted CONNECT packet which causes large amounts of memory use in the broker. If multiple clients do this, an out of memory situation can occur and the system may become unresponsive or the broker will be killed by the operating system.
The issue is fixed in Mosquitto 1.4.15. Patches for older versions are available at https://mosquitto.org/files/cve/2017-7651
The fix addresses the problem by limiting the permissible size for CONNECT
packet, and by adding a memory_limit configuration option that allows the
broker to self limit the amount of memory it uses.
Thanks to Felipe Balabanian for finding this vulnerability and responsibly reporting it.
A vulnerability exists in Mosquitto versions 1.0 to 1.4.14 inclusive known as CVE-2017-7652.
If the broker has exhausted all of its free sockets/file descriptors and then a SIGHUP signal is received to trigger reloading of the configuration, then the reloading will fail. This results in many of the configuration options, including security options, being set to their default value. This means that authorisation and access control may no longer be in place.
The issue is fixed in Mosquitto 1.4.15. Patches for older versions are available at https://mosquitto.org/files/cve/2017-7652
The fix addresses the problem by only copying the new configuration options to the in use configuration after a successful reload has taken place.
The complete list of fixes addressed in version 1.4.15 is:
memory_limit
configuration option has also been added to allow the overall memory used by
the broker to be limited.use_identity_as_username configured.use_identity_as_username not working on websockets clients.MOSQ_ERR_AUTH for a username check on
a websockets client. Closes #490.upgrade_outgoing_qos for retained message. Closes #534.mosquitto_topic_matches_sub. Closes #654.mosquitto_topic_matches_sub() not correctly matching foo/bar against
foo/+/#. Closes #670.mosquitto_pub -l. Closes #676.