Debian DSA-5511-1 : mosquitto - security update

medium Nessus Plugin ID 182418

Synopsis

The remote Debian host is missing one or more security-related updates.

Description

The remote Debian 11 / 12 host has packages installed that are affected by multiple vulnerabilities as referenced in the dsa-5511 advisory.

- In Eclipse Mosquitto versions 2.0 to 2.0.11, when using the dynamic security plugin, if the ability for a client to make subscriptions on a topic is revoked when a durable client is offline, then existing subscriptions for that client are not revoked. (CVE-2021-34434)

- In versions 1.6 to 2.0.11 of Eclipse Mosquitto, an MQTT v5 client connecting with a large number of user- property properties could cause excessive CPU usage, leading to a loss of performance and possible denial of service. (CVE-2021-41039)

- The broker in Eclipse Mosquitto 1.3.2 through 2.x before 2.0.16 has a memory leak that can be abused remotely when a client sends many QoS 2 messages with duplicate message IDs, and fails to respond to PUBREC commands. This occurs because of mishandling of EAGAIN from the libc send function.
(CVE-2023-28366)

- 2.0.17 Broker: * Fix `max_queued_messages 0` stopping clients from receiving messages * Fix `max_inflight_messages` not being set correctly. Apps: * Fix `mosquitto_passwd -U` backup file creation.
2.0.16 Security: * CVE-2023-28366: Fix memory leak in broker when clients send multiple QoS 2 messages with the same message ID, but then never respond to the PUBREC commands. * CVE-2023-0809: Fix excessive memory being allocated based on malicious initial packets that are not CONNECT packets. * CVE-2023-3592:
Fix memory leak when clients send v5 CONNECT packets with a will message that contains invalid property types. * Broker will now reject Will messages that attempt to publish to $CONTROL/. * Broker now validates usernames provided in a TLS certificate or TLS-PSK identity are valid UTF-8. * Fix potential crash when loading invalid persistence file. * Library will no longer allow single level wildcard certificates, e.g.
*.com Broker: * Fix $SYS messages being expired after 60 seconds and hence unchanged values disappearing. * Fix some retained topic memory not being cleared immediately after used. * Fix error handling related to the `bind_interface` option. * Fix std* files not being redirected when daemonising, when built with assertions removed. * Fix default settings incorrectly allowing TLS v1.1. * Use line buffered mode for stdout. Closes #2354. * Fix bridges with non-matching cleansession/local_cleansession being expired on start after restoring from persistence. * Fix connections being limited to 2048 on Windows. The limit is now 8192, where supported. * Broker will log warnings if sensitive files are world readable/writable, or if the owner/group is not the same as the user/group the broker is running as. In future versions the broker will refuse to open these files. * mosquitto_memcmp_const is now more constant time. * Only register with DLT if DLT logging is enabled. * Fix any possible case where a json string might be incorrectly loaded. This could have caused a crash if a textname or textdescription field of a role was not a string, when loading the dynsec config from file only. * Dynsec plugin will not allow duplicate clients/groups/roles when loading config from file, which matches the behaviour for when creating them. * Fix heap overflow when reading corrupt config with log_dest file. Client library: * Use CLOCK_BOOTTIME when available, to keep track of time. This solves the problem of the client OS sleeping and the client hence not being able to calculate the actual time for keepalive purposes. * Fix default settings incorrectly allowing TLS v1.1. * Fix high CPU use on slow TLS connect. Clients: * Fix incorrect topic-alias property value in mosquitto_sub json output. * Fix confusing message on TLS certificate verification. Apps: * mosquitto_passwd uses mkstemp() for backup files. * `mosquitto_ctrl dynsec init` will refuse to overwrite an existing file, without a race-condition. (CVE-2023-0809, CVE-2023-3592)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade the mosquitto packages.

For the stable distribution (bookworm), these problems have been fixed in version 2.0.11-1.2+deb12u1.

See Also

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993400

https://security-tracker.debian.org/tracker/source-package/mosquitto

https://www.debian.org/security/2023/dsa-5511

https://security-tracker.debian.org/tracker/CVE-2021-34434

https://security-tracker.debian.org/tracker/CVE-2021-41039

https://security-tracker.debian.org/tracker/CVE-2023-0809

https://security-tracker.debian.org/tracker/CVE-2023-28366

https://security-tracker.debian.org/tracker/CVE-2023-3592

https://packages.debian.org/source/bullseye/mosquitto

https://packages.debian.org/source/bookworm/mosquitto

Plugin Details

Severity: Medium

ID: 182418

File Name: debian_DSA-5511.nasl

Version: 1.0

Type: local

Agent: unix

Published: 10/2/2023

Updated: 10/2/2023

Supported Sensors: Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Continuous Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 4.4

CVSS v2

Risk Factor: Medium

Base Score: 5

Temporal Score: 3.9

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N

CVSS Score Source: CVE-2021-34434

CVSS v3

Risk Factor: Medium

Base Score: 5.3

Temporal Score: 4.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: cpe:/o:debian:debian_linux:11.0, p-cpe:/a:debian:debian_linux:libmosquittopp1, p-cpe:/a:debian:debian_linux:mosquitto-clients, p-cpe:/a:debian:debian_linux:mosquitto-dev, p-cpe:/a:debian:debian_linux:libmosquittopp-dev, p-cpe:/a:debian:debian_linux:libmosquitto1, p-cpe:/a:debian:debian_linux:mosquitto, cpe:/o:debian:debian_linux:12.0, p-cpe:/a:debian:debian_linux:libmosquitto-dev

Required KB Items: Host/local_checks_enabled, Host/Debian/release, Host/Debian/dpkg-l

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 10/1/2023

Vulnerability Publication Date: 8/30/2021

Reference Information

CVE: CVE-2021-34434, CVE-2021-41039, CVE-2023-0809, CVE-2023-28366, CVE-2023-3592