diff options
Diffstat (limited to 'pkgs/servers/mqtt/nanomq/0.18.2-CVE-2024-31040.patch')
-rw-r--r-- | pkgs/servers/mqtt/nanomq/0.18.2-CVE-2024-31040.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/servers/mqtt/nanomq/0.18.2-CVE-2024-31040.patch b/pkgs/servers/mqtt/nanomq/0.18.2-CVE-2024-31040.patch new file mode 100644 index 0000000000000..0453415e88d64 --- /dev/null +++ b/pkgs/servers/mqtt/nanomq/0.18.2-CVE-2024-31040.patch @@ -0,0 +1,15 @@ +Based on upstream +https://github.com/nanomq/NanoNNG/commit/543ce93017a488c5001ac450c2a2c1ff6dca19d1 +with conflicting formatting changes removed + +--- a/nng/src/sp/protocol/mqtt/mqtt_parser.c ++++ b/nng/src/sp/protocol/mqtt/mqtt_parser.c +@@ -583,7 +583,7 @@ + if (cparam->pro_ver == MQTT_PROTOCOL_VERSION_v5) { + // check length + log_trace("Decoding MQTT V5 Properties"); +- if (pos >= max) ++ if (pos + 4 >= max) + return PROTOCOL_ERROR; + cparam->prop_len = (uint32_t) get_var_integer(packet + pos, + &len_of_var); |