-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathChangeLog.txt
More file actions
3722 lines (3138 loc) · 154 KB
/
ChangeLog.txt
File metadata and controls
3722 lines (3138 loc) · 154 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2.1.0 - 2021-xx-xx
==================
# Broker
## Deprecations
- The acl_file option is deprecated in favour of the acl-file plugin, which is
the same code but moved into a plugin. The acl_file option will be removed
in 3.0.
- The password_file option is deprecated in favour of the password-file plugin,
which is the same code but moved into a plugin. The password_file option will
be removed in 3.0.
- The per_listener_settings option is deprecated in favour of the new listener
specific options. The per_listener_settings option will be removed in 3.0.
## Behaviour changes
- acl_file and password_file will produce an error on invalid input when
reloading the config, causing the broker to quit.
## Protocol related
- Add support for broker created topic aliases. Topics are allocated on a
first come first serve basis.
- Add support for bridges to allow remote brokers to create topic aliases when
running in MQTT v5 mode.
- Enforce receive maximum on MQTT v5.
- Return protocol error if a client attemps to subscribe to a shared
subscription and also sets no-local.
- Protocol version numbers reported in the log when a client connects now
match the MQTT protocol version numbers, not internal Mosquitto values.
- Send DISCONNECT With session-takeover return code to MQTT v5 clients when a
client connects with the same client id. Closes #2340.
- The `allow_duplicate_messages` now defaults to `true`.
- Add `accept_protocol_versions` option to allow limiting which MQTT protocol
versions are allowed for a particular listener.
## TLS related
- Add `--tls-keylog` option which can be used to generate a file that can be
used by wireshark to decrypt TLS traffic for debugging purposes. Closes #1818.
- Add `disable_client_cert_date_checks` option to allow expired client
certificate to be considered valid.
- Add `bridge_tls_use_os_certs` option to allow bridges to be easily configured
to trust default CA certificates. Closes #2473.
- Remove support for TLS v1.1.
- Use openssl provided function for x509 certificate hostname verification,
rather than own function.
## Bridge related
- Add `bridge_receive_maximum` option for MQTT v5.0 bridges.
- Add `bridge_session_expiry_interval` option for MQTT v5.0 bridges.
- Bridge reconnection backoff improvements.
## Transport related
- Add the `websockets_origin` option to allow optional enforcement of origin
when a connection attempts an upgrade to WebSockets.
- Add built-in websockets support that doesn't use libwebsockets. This is the
preferred websockets implementation.
- Add support for X-Forwarded-For header for built in websockets.
- Add suport for PROXY protocol v1 and v2.
## Platform specific
- Increase maximum connection count on Windows from 2048 to 8192 where
supported. Closes #2122.
- Allow multiple instances of mosquitto to run as services on Windows. See
README-windows.txt.
- Add kqueue support.
- Add support for systemd watchdog.
## General
- Report on what compile time options are enabled. Closes #2193.
- Performance: reduce memory allocations when sending packets.
- Log protocol version and ciphers that a client negotiates when connecting.
- Password salts are now 64 bytes long.
- Add the `global_plugin` option, which gives global plugin loaded regardless
of `per_listener_settings`.
- Add `global_max_clients` option to allow limiting client sessions globally
on the broker.
- Add `global_max_connections` option to allow limiting client connections globally
on the broker.
- Improve idle performance. The broker now calculates when the next event of
interest is, and uses that as the timeout for e.g. `epoll_wait()`. This can
reduce the number of process wakeups by 100x on an idle broker.
- Add more efficient keepalive check.
- Add support for sending the SIGRTMIN signal to trigger log rotation.
Closes #2337.
- Add `--test-config` option which can be used to test a configuration file
before trying to use it in a live broker. Closes #2521.
- Add support for PUID/PGID environment variables for setting the user/group
to drop privileges to. Closes #2441.
- Report persistence stats when starting.
- $SYS updates are now aligned to `sys_interval` seconds, meaning that if set
to 10, for example, updates will be sent at times matching x0 seconds.
Previously update intervals were aligned to the time the broker was started.
- Add `log_dest android` for logging to the Android logd daemon.
- Fix some retained topic memory not being cleared immediately after used.
- Add -q option to allow logging to be disabled at the command line.
- Log message if a client attempts to connect with TLS to a non-TLS listener.
- Add `listener_allow_anonymous` option.
- Add `listener_auto_id_prefix` option.
- Allow seconds when defining `persistent_client_expiration`.
## Plugin interface
- Add `mosquitto_topic_matches_sub_with_pattern()`, which can match against
subscriptions with `%c` and `%u` patterns for client id / username
substitution.
- Add support for modifying outgoing messages using `MOSQ_EVT_MESSAGE_OUT`.
- Add `mosquitto_client()` function for retrieving a client struct if that
client is connected.
- Add `MOSQ_ERR_PLUGIN_IGNORE` to allow plugins to register basic auth or acl
check callbacks, but still act as though they are not registered. A plugin
that wanted to act as a blocklist for certain usernames, but wasn't carrying
out authentication could return `MOSQ_ERR_PLUGIN_IGNORE` for usernames not on
its blocklist. If no other plugins were configured, the client would be
authenticated. Using `MOSQ_ERR_PLUGIN_DEFER` instead would mean the clients
would be denied if no other plugins were configured.
- Add `mosquitto_client_port()` function for plugins.
- Add `MOSQ_EVT_CONNECT`, to allow plugins to know when a client has
successfully authenticated to the broker.
- Add connection-state example plugin to demonstrate `MOSQ_EVT_CONNECT`.
- Add `MOSQ_EVT_CLIENT_OFFLINE`, to allow plugins to know when a client with a
non-zero session expiry interval has gone offline.
- Plugins on non-Windows platforms now no longer make their symbols globally
available, which means they are self contained.
- Add support for delayed basic authentication in plugins.
- Plugins using the `MOSQ_EVT_MESSAGE_WRITE` callback can now return
`MOSQ_ERR_QUOTA_EXCEEDED` to have the message be rejected. MQTT v5 clients
using QoS 1 or 2 will receive the quota-exceeded reason code in the
corresponding PUBACK/PUBREC.
- `MOSQ_EVT_TICK` is now passed to plugins when `per_listener_settings` is true.
- Add `mosquitto_sub_matches_acl()`, which can match one topic filter (a
subscription) against another topic filter (an ACL).
- Registration of the `MOSQ_EVT_CONTROL` plugin event is now handled globally
across the broker, so only a single plugin can register for a given $CONTROL
topic.
- Add `mosquitto_plugin_set_info()` to allow plugins to tell the broker their
name and version.
- Add builtin $CONTROL/broker/v1 control topic with the `listPlugins`
command. This is disabled by default, but can be enabled with the
`enable_control_api` option.
- Plugins no longer need to define `mosquitto_plugin_cleanup()` if they do not
need to do any of their own cleanup. Callbacks will be unregistered
automatically.
- Add `mosquitto_set_clientid()` to allow plugins to force a client id for a
client.
- Add `MOSQ_EVT_SUBSCRIBE` and `MOSQ_EVT_UNSUBSCRIBE` events that are called when
subscribe/unsubscribes actually succeed. Allow modifying topic and qos.
- Add `mosquitto_persistence_location()` for plugins to use to find a valid
location for storing persistent data.
- Plugins can now use the `next_s` and `next_ms` members of the tick event data
struct to set a minimum interval that the broker will wait before calling the
tick callback again.
- Add `mosquitto_plugin_publish()` and `mosquitto_plugin_publish_copy()`.
These allow plugins to publish messages on the broker that will also be
consumed by other plugins in their message-in events.
# Plugins
- Add acl-file plugin.
- Add password-file plugin.
- Add persist-sqlite plugin.
- Add sparkplug-aware plugin.
# Dynamic security plugin
- Add ability to deny wildcard subscriptions for a role to the dynsec plugin.
- The dynamic security plugin now only kicks clients at the start of the next
network loop, to give chance for PUBACK/PUBREC to be sent. Closes #2474.
- The dynamic security plugin now reports client connections in getClient and
listClients.
- The dynamic security plugin now generates an initial configuration if none
is present, including a set of default roles.
- The dynamic security plugin now supports `%c` and `%u` patterns for
substituting client id and username respectively, in all ACLs except for
subscribeLiteral and unsubscribeLiteral.
- The dynamic security plugin now supports multiple ways to initialise the
first configuration file.
# Client library
- Add `MOSQ_OPT_DISABLE_SOCKETPAIR` to allow the disabling of the socketpair
feature that allows the network thread to be woken from select() by another
thread when e.g. `mosquitto_publish()` is called. This reduces the number of
sockets used by each client by two.
- Add `on_pre_connect()` callback to allow clients to update
username/password/TLS parameters before an automatic reconnection.
- Callbacks no longer block other callbacks, and can be set from within a
callback. Closes #2127.
- Add support for MQTT v5 broker to client topic aliases.
- Add `mosquitto_topic_matches_sub_with_pattern()`, which can match against
subscriptions with `%c` and `%u` patterns for client id / username
substitution.
- Add `mosquitto_sub_matches_acl()`, which can match one topic filter (a
subscription) against another topic filter (an ACL).
- Add `mosquitto_sub_matches_acl_with_pattern()`, which can match one topic
filter (a subscription) against another topic filter (an ACL), with `%c` and
`%u` patterns for client id / username substitution.
- Performance: reduce memory allocations when sending packets.
- Reintroduce threading support for Windows. Closes #1509.
- `mosquitto_subscribe*()` now returns `MOSQ_ERR_INVAL` if an empty string is
passed as a topic filter.
- `mosquitto_unsubscribe*()` now returns `MOSQ_ERR_INVAL` if an empty string is
passed as a topic filter.
- Add websockets support.
- `mosquitto_property_read_binary/string/string_pair` will now set the
name/value parameter to NULL if the binary/string is empty. This aligns the
behaviour with other property functions. Closes #2648.
- Add `mosquitto_unsubscribe2_v5_callback_set`, which provides a callback that
gives access to reason codes for each of the unsubscription requests.
- Add `mosquitto_property_remove`, for removing properties from property
lists.
- Add `on_ext_auth()` callback to allow handling MQTT v5 extended authentication.
- Add `mosquitto_ext_auth_continue()` function to continue an MQTT v5 extended
authentication.
- Remove support for TLS v1.1.
- Use openssl provided function for x509 certificate hostname verification,
rather than own function.
# Clients
## General
- Add `-W` timeout support to Windows.
- The `--insecure` option now disables all server certificate verification.
- Add websockets support.
- Using `-x` now sets the clients to use MQTT v5.0.
- Fix parsing of IPv6 addresses in socks proxy urls.
- Add `--tls-keylog` option which can be used to generate a file that can be
used by wireshark to decrypt TLS traffic for debugging purposes.
- Remove support for TLS v1.1.
## mosquitto_rr
- Fix `-f` and `-s` options in mosquitto_rr.
- Add `--latency` option to mosquitto_rr, for printing the request/response
latency.
- Add `--retain-handling` option.
## mosquitto_sub
- Fix incorrect output formatting in mosquitto_sub when using field widths
with `%x` and `%X` for printing the payload in hex.
- Add float printing option to mosquitto_sub.
- mosquitto_sub payload hex output can now be split by fixed field length.
- Add `--message-rate` option to mosquitto_sub, for printing the count of
messages received each second.
- Add `--retain-handling` option.
# Apps
## mosquitto_signal
- Add `mosquitto_signal` for helping send signals to mosquitto on Windows.
## mosquitto_ctrl
- Add interactive shell mode to mosquitto_ctrl.
- Add support for `listPlugins` to mosquitto_ctrl.
- Allow mosquitto_ctrl dynsec module to update passwords in files rather than
having to connect to a broker.
## mosquitto_passwd
- Print messages in mosquitto_passwd when adding/updating passwords.
Closes #2544.
- When creating a new file with `-c`, setting the output filename to a dash `-`
will output the result to stdout.
## mosquitto_db_dump
- Add `--json` output mode do mosquitto_db_dump.
# Build
- Increased CMake minimal required version to 3.14, which is required for the
preinstalled SQLite3 find module.
- Add an CMake option `WITH_LTO` to enable/disable link time optimization.
- Set C99 as the explicit, rather than implicit, build standard.
- cJSON is now a required dependency.
- Refactored headers for easier discovery.
- Support for openssl < 3.0 removed.
2.0.22 - 2025-07-11
===================
# Broker
- Windows: Fix broker crash on startup if using `log_dest stdout`
- Bridge: Fix idle_timeout never occurring for lazy bridges.
- Fix case where max_queued_messages = 0 was not treated as unlimited.
Closes #3244.
- Fix `--version` exit code and output. Closes #3267.
- Fix crash on receiving a $CONTROL message over a bridge, if
per_listener_settings is set true and the bridge is carrying out topic
remapping. Closes #3261.
- Fix incorrect reference clock being selected on startup on Linux.
Closes #3238.
- Fix reporting of client disconnections being incorrectly attributed to "out
of memory". Closes #3253.
- Fix compilation when using `WITH_OLD_KEEPALIVE`. Closes #3250.
- Add Windows linker file for the broker to the installer. Closes #3269.
- Fix Websockets PING not being sent on Windows. Closes #3272.
- Fix problems with secure websockets. Closes #1211.
- Fix crash on exit when using WITH_EPOLL=no. Closes #3302.
- Fix clients being incorrectly expired when they have keepalive ==
max_keepalive. Closes #3226, #3286.
# Dynamic security plugin
- Fix mismatch memory free when saving config which caused memory tracking to
be incorrect.
# Client library
- Fix C++ symbols being removed when compiled with link time optimisation.
Closes #3259.
- TLS error handling was incorrectly setting a protocol error for non-TLS
errors. This would cause the mosquitto_loop_start() thread to exit if no
broker was available on the first connection attempt. This has been fixed.
Closes #3258.
- Fix linker errors on some architectures using cmake. Closes #3167.
# Tests
- Fix 08-ssl-connect-cert-auth-expired and 08-ssl-connect-cert-auth-revoked
tests when running on a single CPU system. Closes #3230.
2.0.21 - 2025-03-06
===================
# Security
- Fix leak on malicious SUBSCRIBE by authenticated client.
Closes eclipse #248.
- Further fix for CVE-2023-28366.
# Broker
- Fix clients sending a RESERVED packet not being quickly disconnected.
Closes #2325.
- Fix `bind_interface` producing an error when used with an interface that has
an IPv6 link-local address and no other IPv6 addresses. Closes #2696.
- Fix mismatched wrapped/unwrapped memory alloc/free in properties. Closes #3192.
- Fix `allow_anonymous false` not being applied in local only mode. Closes #3198.
- Add `retain_expiry_interval` option to fix expired retained message not
being removed from memory if they are not subscribed to. Closes #3221.
- Produce an error if invalid combinations of cafile/capath/certfile/keyfile
are used. Closes #1836. Closes #3130.
- Backport keepalive checking from develop to fix problems in current
implementation. Closes #3138.
# Client library
- Fix potential deadlock in mosquitto_sub if `-W` is used. Closes #3175.
# Apps
- mosquitto_ctrl dynsec now also allows `-i` to specify a clientid as well as
`-c`. This matches the documentation which states `-i`. Closes #3219.
# Client library
- Fix threads linking on Windows for static libmosquitto library
Closes #3143
# Build
- Fix Windows builds not having websockets enabled.
- Add tzdata to docker images
# Tests
- Fix 08-ssl-connect-cert-auth-expired and 08-ssl-connect-cert-auth-revoked
tests when under load. Closes #3208.
2.0.20 - 2024-10-16
===================
# Broker
- Fix QoS 1 / QoS 2 publish incorrectly returning "no subscribers".
Closes #3128.
- Open files with appropriate access on Windows. Closes #3119.
- Don't allow invalid response topic values.
- Fix some strict protocol compliance issues. Closes #3052.
# Client library
- Fix cmake build on OS X. Closes #3125.
# Build
- Fix build on NetBSD
2.0.19 - 2024-10-02
===================
# Security
- Fix mismatched subscribe/unsubscribe with normal/shared topics.
- Fix crash on bridge using remapped topic being sent a crafted packet.
# Broker
- Fix assert failure when loading a persistence file that contains
subscriptions with no client id.
- Fix local bridges being incorrectly expired when
persistent_client_expiration is in use.
- Fix use of CLOCK_BOOTTIME for getting time. Closes #3089.
- Fix mismatched subscribe/unsubscribe with normal/shared topics.
- Fix crash on bridge using remapped topic being sent a crafted packet.
# Client library
- Fix some error codes being converted to string as "unknown". Closes #2579.
- Clear SSL error state to avoid spurious error reporting. Closes #3054.
- Fix "payload format invalid" not being allowed as a PUBREC reason code.
- Don't allow SUBACK with missing reason codes.
# Build
- Thread support is re-enabled on Windows.
2.0.18 - 2023-09-18
===================
# Broker
- Fix crash on subscribe under certain unlikely conditions. Closes #2885.
Closes #2881.
# Clients
- Fix mosquitto_rr not honouring `-R`. Closes #2893.
# Windows
- Installer will start/stop the mosquitto service when installing and
uninstalling, to prevent problems with not being able to overwrite or remove
mosquitto.exe.
2.0.17 - 2023-08-22
===================
# Broker
- Fix `max_queued_messages 0` stopping clients from receiving messages.
Closes #2879.
- Fix `max_inflight_messages` not being set correctly. Closes #2876.
# Apps
- Fix `mosquitto_passwd -U` backup file creation. Closes #2873.
2.0.16 - 2023-08-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. Closes #2708.
- Fix default settings incorrectly allowing TLS v1.1. Closes #2722.
- Use line buffered mode for stdout. Closes #2354. Closes #2749.
- Fix bridges with non-matching cleansession/local_cleansession being expired
on start after restoring from persistence. Closes #2634.
- Fix connections being limited to 2048 on Windows. The limit is now 8192,
where supported. Closes #2732.
- 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. Closes #2760.
- Fix default settings incorrectly allowing TLS v1.1. Closes #2722.
- Fix high CPU use on slow TLS connect. Closes #2794.
# Clients
- Fix incorrect topic-alias property value in mosquitto_sub json output.
- Fix confusing message on TLS certificate verification. Closes #2746.
# Apps
- mosquitto_passwd uses mkstemp() for backup files.
- `mosquitto_ctrl dynsec init` will refuse to overwrite an existing file,
without a race-condition.
2.0.15 - 2022-08-16
===================
# Security
- Deleting the group configured as the anonymous group in the Dynamic Security
plugin, would leave a dangling pointer that could lead to a single crash.
This is considered a minor issue - only administrative users should have
access to dynsec, the impact on availability is one-off, and there is no
associated loss of data. It is now forbidden to delete the group configured
as the anonymous group.
# Broker
- Fix memory leak when a plugin modifies the topic of a message in
MOSQ_EVT_MESSAGE.
- Fix bridge `restart_timeout` not being honoured.
- Fix potential memory leaks if a plugin modifies the message in the
MOSQ_EVT_MESSAGE event.
- Fix unused flags in CONNECT command being forced to be 0, which is not
required for MQTT v3.1. Closes #2522.
- Improve documentation of `persistent_client_expiration` option.
Closes #2404.
- Add clients to session expiry check list when restarting and reloading from
persistence. Closes #2546.
- Fix bridges not sending failure notification messages to the local broker if
the remote bridge connection fails. Closes #2467. Closes #1488.
- Fix some PUBLISH messages not being counted in $SYS stats. Closes #2448.
- Fix incorrect return code being sent in DISCONNECT when a client session is
taken over. Closes #2607.
- Fix confusing "out of memory" error when a client is kicked in the dynamic
security plugin. Closes #2525.
- Fix confusing error message when dynamic security config file was a
directory. Closes #2520.
- Fix bridge queued messages not being persisted when local_cleansession is
set to false and cleansession is set to true. Closes #2604.
- Dynamic security: Fix modifyClient and modifyGroup commands to not modify
the client/group if a new group/client being added is not valid.
Closes #2598.
- Dynamic security: Fix the plugin being able to be loaded twice. Currently
only a single plugin can interact with a unique $CONTROL topic. Using
multiple instances of the plugin would produce duplicate entries in the
config file. Closes #2601. Closes #2470.
- Fix case where expired messages were causing queued messages not to be
delivered. Closes #2609.
- Fix websockets not passing on the X-Forwarded-For header.
# Client library
- Fix threads library detection on Windows under cmake. Bumps the minimum
cmake version to 3.1, which is still ancient.
- Fix use of `MOSQ_OPT_TLS_ENGINE` being unable to be used due to the openssl
ctx not being initialised until starting to connect. Closes #2537.
- Fix incorrect use of SSL_connect. Closes #2594.
- Don't set SIGPIPE to ignore, use MSG_NOSIGNAL instead. Closes #2564.
- Add documentation of struct mosquitto_message to header. Closes #2561.
- Fix documentation omission around mosquitto_reinitialise. Closes #2489.
- Fix use of MOSQ_OPT_SSL_CTX when used in conjunction with
MOSQ_OPT_SSL_CTX_DEFAULTS. Closes #2463.
- Fix failure to close thread in some situations. Closes #2545.
# Clients
- Fix mosquitto_pub incorrectly reusing topic aliases when reconnecting.
Closes #2494.
# Apps
- Fix `-o` not working in `mosquitto_ctrl`, and typo in related documentation.
Closes #2471.
2.0.14 - 2021-11-17
===================
# Broker
- Fix bridge not respecting receive-maximum when reconnecting with MQTT v5.
# Client library
- Fix mosquitto_topic_matches_sub2() not using the length parameters.
Closes #2364.
- Fix incorrect subscribe_callback in mosquittopp.h. Closes #2367.
2.0.13 - 2021-10-27
===================
# Broker
- Fix `max_keepalive` option not being able to be set to 0.
- Fix LWT messages not being delivered if `per_listener_settings` was set to
true. Closes #2314.
- Various fixes around inflight quota management. Closes #2306.
- Fix problem parsing config files with Windows line endings. Closes #2297.
- Don't send retained messages when a shared subscription is made.
- Fix log being truncated in Windows.
- Fix client id not showing in log on failed connections, where possible.
- Fix broker sending duplicate CONNACK on failed MQTT v5 reauthentication.
Closes #2339.
- Fix mosquitto_plugin.h not including mosquitto_broker.h. Closes #2350.
- Fix unlimited message quota not being properly checked for incoming
messages. Closes #2593.
- Fixed build for openssl compiled with OPENSSL_NO_ENGINE. Closes #2589.
# Client library
- Initialise sockpairR/W to invalid in `mosquitto_reinitialise()` to avoid
closing invalid sockets in `mosquitto_destroy()` on error. Closes #2326.
# Clients
- Fix date format in mosquitto_sub output. Closes #2353.
2.0.12 - 2021-08-31
===================
# Security
- 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. This has been fixed.
- Fix `max_keepalive` not applying to MQTT v3.1.1 and v3.1 connections.
These clients are now rejected if their keepalive value exceeds
max_keepalive. This option allows CVE-2020-13849, which is for the MQTT
v3.1.1 protocol itself rather than an implementation, to be addressed.
- Using certain listener related configuration options e.g. `cafile`, that
apply to the default listener without defining any listener would cause a
remotely accessible listener to be opened that was not confined to the local
machine but did have anonymous access enabled, contrary to the
documentation. This has been fixed. Closes #2283.
- CVE-2021-34434: If a plugin had granted ACL subscription access to a
durable/non-clean-session client, then removed that access, the client would
keep its existing subscription. This has been fixed.
- Incoming QoS 2 messages that had not completed the QoS flow were not being
checked for ACL access when a clean session=False client was reconnecting.
This has been fixed.
# Broker
- Fix possible out of bounds memory reads when reading a corrupt/crafted
configuration file. Unless your configuration file is writable by untrusted
users this is not a risk. Closes #567213.
- Fix `max_connections` option not being correctly counted.
- Fix TLS certificates and TLS-PSK not being able to be configured at the same
time.
- Disable TLS v1.3 when using TLS-PSK, because it isn't correctly configured.
- Fix `max_keepalive` not applying to MQTT v3.1.1 and v3.1 connections.
These clients are now rejected if their keepalive value exceeds
max_keepalive. This option allows CVE-2020-13849, which is for the MQTT
v3.1.1 protocol itself rather than an implementation, to be addressed.
- Fix broker not quitting if e.g. the `password_file` is specified as a
directory. Closes #2241.
- Fix listener mount_point not being removed on outgoing messages.
Closes #2244.
- Strict protocol compliance fixes, plus test suite.
- Fix $share subscriptions not being recovered for durable clients that
reconnect.
- Update plugin configuration documentation. Closes #2286.
# Client library
- If a client uses TLS-PSK then force the default cipher list to use "PSK"
ciphers only. This means that a client connecting to a broker configured
with x509 certificates only will now fail. Prior to this, the client would
connect successfully without verifying certificates, because they were not
configured.
- Disable TLS v1.3 when using TLS-PSK, because it isn't correctly configured.
- Threaded mode is deconfigured when the mosquitto_loop_start() thread ends,
which allows mosquitto_loop_start() to be called again. Closes #2242.
- Fix MOSQ_OPT_SSL_CTX not being able to be set to NULL. Closes #2289.
- Fix reconnecting failing when MOSQ_OPT_TLS_USE_OS_CERTS was in use, but none
of capath, cafile, psk, nor MOSQ_OPT_SSL_CTX were set, and
MOSQ_OPT_SSL_CTX_WITH_DEFAULTS was set to the default value of true.
Closes #2288.
# Apps
- Fix `mosquitto_ctrl dynsec setDefaultACLAccess` command not working.
# Clients
- Add `-o` option for all clients loading options from a specific file.
- Add `--no-tls` option for all clients which disables all TLS options for
that instance. This is useful for negating TLS options provided in a config
file, or to disable the automatic use of TLS when using port 8883.
Closes #2180.
- Add `-w`/`--watch` to mosquitto_sub which means messages will be printed on a
fixed line number based on the topic and order in which messages were
received. Requires ANSI escape code support in the terminal.
- mosquitto_sub now only needs `-t` or `-U` to run - this means that `-t` is
not required in all situations.
- mosquitto_sub and mosquitto_rr now open stdout in binary mode on Windows
so binary payloads are not modified when printing.
- Document TLS certificate behaviour when using `-p 8883`.
# Build
- Fix installation using WITH_TLS=no. Closes #2281.
- Fix builds with libressl 3.4.0. Closes #2198.
- Remove some unnecessary code guards related to libressl.
- Fix printf format build warning on MIPS. Closes #2271.
2.0.11 - 2021-06-08
===================
# Security
- If a MQTT v5 client connects with a crafted CONNECT packet a memory leak
will occur. This has been fixed.
# Broker
- Fix possible crash having just upgraded from 1.6 if `per_listener_settings
true` is set, and a SIGHUP is sent to the broker before a client has
reconnected to the broker. Closes #2167.
- Fix bridge not reconnectng if the first reconnection attempt fails.
Closes #2207.
- Improve QoS 0 outgoing packet queueing.
- Fix non-reachable bridge blocking the broker on Windows. Closes #2172.
- Fix possible corruption of pollfd array on Windows when bridges were
reconnecting. Closes #2173.
- Fix QoS 0 messages not being queued when `queue_qos0_messages` was enabled.
Closes #2224.
- Fix openssl not being linked to dynamic security plugin. Closes #2277.
# Clients
- If sending mosquitto_sub output to a pipe, mosquitto_sub will now detect
that the pipe has closed and disconnect. Closes #2164.
- Fix `mosquitto_pub -l` quitting if a message publication is attempted when
the broker is temporarily unavailable. Closes #2187.
2.0.10 - 2021-04-03
==================
# Security
- CVE-2021-28166: If an authenticated client connected with MQTT v5 sent a
malformed CONNACK message to the broker a NULL pointer dereference occurred,
most likely resulting in a segfault.
Affects versions 2.0.0 to 2.0.9 inclusive.
# Broker
- Don't over write new receive-maximum if a v5 client connects and takes over
an old session. Closes #2134.
- Fix CVE-2021-28166. Closes #2163.
# Clients
- Set `receive-maximum` to not exceed the `-C` message count in mosquitto_sub
and mosquitto_rr, to avoid potentially lost messages. Closes #2134.
- Fix TLS-PSK mode not working with port 8883. Closes #2152.
# Client library
- Fix possible socket leak. This would occur if a client was using
`mosquitto_loop_start()`, then if the connection failed due to the remote
server being inaccessible they called `mosquitto_loop_stop(, true)` and
recreated the mosquitto object.
# Build
- A variety of minor build related fixes, like functions not having previous
declarations.
- Fix CMake cross compile builds not finding opensslconf.h. Closes #2160.
- Fix build on Solaris non-sparc. Closes #2136.
2.0.9 - 2021-03-11
==================
# Security
- If an empty or invalid CA file was provided to the client library for
verifying the remote broker, then the initial connection would fail but
subsequent connections would succeed without verifying the remote broker
certificate. Closes #2130.
- If an empty or invalid CA file was provided to the broker for verifying the
remote broker for an outgoing bridge connection then the initial connection
would fail but subsequent connections would succeed without verifying the
remote broker certificate. Closes #2130.
# Broker
- Fix encrypted bridge connections incorrectly connecting when `bridge_cafile`
is empty or invalid. Closes #2130.
- Fix `tls_version` behaviour not matching documentation. It was setting the
exact TLS version to use, not the minimum TLS version to use. Closes #2110.
- Fix messages to `$` prefixed topics being rejected. Closes #2111.
- Fix QoS 0 messages not being delivered when max_queued_bytes was configured.
Closes #2123.
- Fix bridge increasing backoff calculation.
- Improve handling of invalid combinations of listener address and bind
interface configurations. Closes #2081.
- Fix `max_keepalive` option not applying to clients connecting with keepalive
set to 0. Closes #2117.
# Client library
- Fix encrypted connections incorrectly connecting when the CA file passed to
`mosquitto_tls_set()` is empty or invalid. Closes #2130.
- Fix connections retrying very rapidly in some situations.
# Build
- Fix cmake epoll detection.
2.0.8 - 2021-02-25
==================
# Broker
- Fix incorrect datatypes in `struct mosquitto_evt_tick`. This changes the
size and offset of two of the members of this struct, and changes the size
of the struct. This is an ABI break, but is considered to be acceptable
because plugins should never be allocating their own instance of this
struct, and currently none of the struct members are used for anything, so a
plugin should not be accessing them. It would also be safe to read/write
from the existing struct parameters.
- Give compile time warning if libwebsockets compiled without external poll
support. Closes #2060.
- Fix memory tracking not being available on FreeBSD or macOS. Closes #2096.
# Client library
- Fix mosquitto_{pub|sub}_topic_check() functions not returning MOSQ_ERR_INVAL
on topic == NULL.
# Clients
- Fix possible loss of data in `mosquitto_pub -l` when sending multiple long
lines. Closes #2078.
# Build
- Provide a mechanism for Docker users to run a broker that doesn't use
authentication, without having to provide their own configuration file.
Closes #2040.
2.0.7 - 2021-02-04
==================
# Broker
- Fix exporting of executable symbols on BSD when building via makefile.
- Fix some minor memory leaks on exit only.
- Fix possible memory leak on connect. Closes #2057.
- Fix openssl engine not being able to load private key. Closes #2066.
# Clients
- Fix config files truncating options after the first space. Closes #2059.
# Build
- Fix man page building to not absolutely require xsltproc when using CMake.
This now handles the case where we are building from the released tar, or
building from git if xsltproc is available, or building from git if xsltproc
is not available.
1.6.13 - 2021-02-04
===================
# Broker
- Fix crash on Windows if loading a plugin fails. Closes #1866.
- Fix DH group not being set for TLS connections, which meant ciphers using
DHE couldn't be used. Closes #1925. Closes #1476.
- Fix local bridges being disconnected on SIGHUP. Closes #1942.
- Fix $SYS/broker/publish/messages/+ counters not being updated for QoS 1, 2
messages. Closes #1968.
- Fix listener not being reassociated with client when reloading a persistence
file and `per_listener_settings true` is set and the client did not set a
username. Closes #1891.
- Fix file logging on Windows. Closes #1880.
- Fix bridge sock not being removed from sock hash on error. Closes #1897.
# Client library
- Fix build on Mac Big Sur. Closes #1905.
- Fix DH group not being set for TLS connections, which meant ciphers using
DHE couldn't be used. Closes #1925. Closes #1476.
# Clients
- mosquitto_sub will now quit with an error if the %U option is used on
Windows, rather than just quitting. Closes #1908.
- Fix config files truncating options after the first space. Closes #2059.
# Apps
- Perform stricter parsing of input username in mosquitto_passwd. Closes
#570126 (Eclipse bugzilla).
# Build
- Enable epoll support in CMake builds.
2.0.6 - 2021-01-28
# Broker
- Fix calculation of remaining length parameter for websockets clients that
send fragmented packets. Closes #1974.
# Broker
- Fix potential duplicate Will messages being sent when a will delay interval
has been set.
- Fix message expiry interval property not being honoured in
`mosquitto_broker_publish` and `mosquitto_broker_publish_copy`.
- Fix websockets listeners with TLS not responding. Closes #2020.
- Add notes that libsystemd-dev or similar is needed if building with systemd
support. Closes #2019.
- Improve logging in obscure cases when a client disconnects. Closes #2017.
- Fix reloading of listeners where multiple listeners have been defined with
the same port but different bind addresses. Closes #2029.
- Fix `message_size_limit` not applying to the Will payload. Closes #2022.
- The error topic-alias-invalid was being sent if an MQTT v5 client published
a message with empty topic and topic alias set, but the topic alias hadn't
already been configured on the broker. This has been fixed to send a
protocol error, as per section 3.3.4 of the specification.
- Note in the man pages that SIGHUP reloads TLS certificates. Closes #2037.
- Fix bridges not always connecting on Windows. Closes #2043.
# Apps
- Allow command line arguments to override config file options in
mosquitto_ctrl. Closes #2010.
- mosquitto_ctrl: produce an error when requesting a new password if both
attempts do not match. Closes #2011.
# Build
- Fix cmake builds using `WITH_CJSON=no` not working if cJSON not found.
Closes #2026.
# Other
- The SPDX identifiers for EDL-1.0 have been changed to BSD-3-Clause as per
The Eclipse legal documentation generator. The licenses are identical.
2.0.5 - 2021-01-11
==================
# Broker
- Fix `auth_method` not being provided to the extended auth plugin event.
Closes #1975.
- Fix large packets not being completely published to slow clients.
Closes #1977.
- Fix bridge connection not relinquishing POLLOUT after messages are sent.
Closes #1979.
- Fix apparmor incorrectly denying access to
/var/lib/mosquitto/mosquitto.db.new. Closes #1978.
- Fix potential intermittent initial bridge connections when using poll().
- Fix `bind_interface` option. Closes #1999.
- Fix invalid behaviour in dynsec plugin if a group or client is deleted
before a role that was attached to the group or client is deleted.
Closes #1998.
- Improve logging in dynsec addGroupRole command. Closes #2005.
- Improve logging in dynsec addGroupClient command. Closes #2008.
# Client library
- Improve documentation around the `_v5()` and non-v5 functions, e.g.
`mosquitto_publish()` and `mosquitto_publish_v5().
# Build
- `install` Makefile target should depend on `all`, not `mosquitto`, to ensure
that man pages are always built. Closes #1989.
- Fixes for lots of minor build warnings highlighted by Visual Studio.
# Apps
- Disallow control characters in mosquitto_passwd usernames.
- Fix incorrect description in mosquitto_ctrl man page. Closes #1995.
- Fix `mosquitto_ctrl dynsec getGroup` not showing roles. Closes #1997.
2.0.4 - 2020-12-22
==================
# Broker
- Fix $SYS/broker/publish/messages/+ counters not being updated for QoS 1, 2
messages. Closes #1968.
- mosquitto_connect_bind_async() and mosquitto_connect_bind_v5() should not
reset the bind address option if called with bind_address == NULL.
- Fix dynamic security configuration possibly not being reloaded on Windows
only. Closes #1962.
- Add more log messages for dynsec load/save error conditions.
- Fix websockets connections blocking non-websockets connections on Windows.
Closes #1934.
# Build
- Fix man pages not being built when using CMake. Closes #1969.
2.0.3 - 2020-12-17
==================
# Security
- Running mosquitto_passwd with the following arguments only
`mosquitto_passwd -b password_file username password` would cause the
username to be used as the password.
# Broker
- Fix excessive CPU use on non-Linux systems when the open file limit is set
high. Closes #1947.
- Fix LWT not being sent on client takeover when the existing session wasn't
being continued. Closes #1946.
- Fix bridges possibly not completing connections when WITH_ADNS is in use.
Closes #1960.
- Fix QoS 0 messages not being delivered if max_queued_messages was set to 0.
Closes #1956.
- Fix local bridges being disconnected on SIGHUP. Closes #1942.
- Fix slow initial bridge connections for WITH_ADNS=no.
- Fix persistence_location not appending a '/'.
# Clients
- Fix mosquitto_sub being unable to terminate with Ctrl-C if a successful
connection is not made. Closes #1957.
# Apps
- Fix `mosquitto_passwd -b` using username as password (not if `-c` is also
used). Closes #1949.
# Build
- Fix `install` target when using WITH_CJSON=no. Closes #1938.
- Fix `generic` docker build. Closes #1945.
2.0.2 - 2020-12-10
==================
# Broker
- Fix build regression for WITH_WEBSOCKETS=yes on non-Linux systems.
2.0.1 - 2020-12-10
==================
# Broker
- Fix websockets connections on Windows blocking subsequent connections.
Closes #1934.
- Fix DH group not being set for TLS connections, which meant ciphers using
DHE couldn't be used. Closes #1925. Closes #1476.
- Fix websockets listeners not causing the main loop not to wake up.
Closes #1936.
# Client library
- Fix DH group not being set for TLS connections, which meant ciphers using