mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
Merge pull request #310892 from risicle/ris-nanomq-CVE-2024-31040-r23.11
[23.11] nanomq: add patches for CVE-2024-31040 & CVE-2024-31041
This commit is contained in:
15
pkgs/servers/mqtt/nanomq/0.18.2-CVE-2024-31040.patch
Normal file
15
pkgs/servers/mqtt/nanomq/0.18.2-CVE-2024-31040.patch
Normal file
@@ -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);
|
||||
@@ -52,6 +52,10 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0.18.2-CVE-2024-31040.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "DESTINATION /etc" "DESTINATION $out/etc"
|
||||
|
||||
Reference in New Issue
Block a user