-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## The receiver supports a sender the project never wrote\n\nThe wire format for CVE-2026-10649 is defined in `lib/common/remote.c` as a packed forty-byte header:\n\n```c\nstruct remote_header_v0 {\n uint32_t endian; /* Detect messages from hosts with different endian-ness */\n uint32_t version;\n uint64_t id;\n uint64_t flags;\n uint32_t size_total;\n uint32_t payload_offset;\n uint32_t payload_compressed;\n uint32_t payload_uncompressed;\n\n /* New fields get added here */\n\n} __attribute__ ((packed));\n```\n\nFour `uint32_t` size fields. Three of them name lengths the receiver will trust. `payload_compressed != 0` is the switch that selects the decompression branch inside `pcmk__remote_message_xml()`. `payload_uncompressed` is the size the bzlib decompressor will be told to write. `payload_offset` is added on top.\n\nThe sender side is `pcmk__remote_send_xml()` in the same file. It builds messages this way:\n\n```c\nheader->id = id;\nheader->endian = ENDIAN_LOCAL;\nheader->version = REMOTE_MSG_VERSION;\nheader->payload_offset = iov[0].iov_len;\nheader->payload_uncompressed = iov[1].iov_len;\n\n/* ... */\n\nheader->size_total = iov[0].iov_len + iov[1].iov_len;\n```\n\n`payload_compressed` is not assigned. The header was zero-initialized at allocation. `payload_compressed` ships as zero. Every other internal caller in the Pacemaker tree that constructs a `remote_header_v0` ships it the same way.\n\nThe receiver has carried the compression branch since October 14, 2013. The comment above it in the pre-fix source was the testimony:\n\n```c\n/* Support compression on the receiving end now, in case we ever want to add it later */\nif (header->payload_compressed) {\n int rc = 0;\n unsigned int size_u = 1 + header->payload_uncompressed;\n char *uncompressed =\n pcmk__assert_alloc(header->payload_offset + size_u, sizeof(char));\n ...\n```\n\n\"Now\" was October 14, 2013, the day Andrew Beekhof committed the protocol versioning code to `lib/common/remote.c`. \"Later\" never came. The branch is dead from the project's view. It is live to anyone who can write the four-byte endianness magic `0xBADADBBD`, followed by a valid forty-byte header, to TCP port 3121. This is the [Receiver Supports No Sender](/patterns/receiver-supports-no-sender) shape: a network protocol receiver carrying decode logic for a feature no sender in the project's own code ever produces, audited only by attackers because attackers are the only callers.\n\n## The integer overflow is two characters of arithmetic\n\n```c\nunsigned int size_u = 1 + header->payload_uncompressed;\nchar *uncompressed =\n pcmk__assert_alloc(header->payload_offset + size_u, sizeof(char));\n```\n\n`payload_uncompressed` is `uint32_t`, attacker-supplied. Set it to `0xFFFFFFFE`. `size_u` becomes `0xFFFFFFFF`. `payload_offset + size_u` is the addition of two `uint32_t` values, performed in `unsigned int` arithmetic, and the sum wraps: `0x28 + 0xFFFFFFFF = 0x27` modulo 2^32. `pcmk__assert_alloc(0x27, 1)` calls `calloc(39, 1)`. The receiver now holds a thirty-nine-byte heap buffer.\n\nThe next line is the decompressor:\n\n```c\nrc = BZ2_bzBuffToBuffDecompress(uncompressed + header->payload_offset, &size_u,\n remote->buffer + header->payload_offset,\n header->payload_compressed, 1, 0);\n```\n\n`uncompressed + header->payload_offset` is already past the end of the 39-byte allocation. `size_u`, passed by pointer, is `0xFFFFFFFF`. bzlib has been told it owns a four-gigabyte output region starting forty bytes past the start of a thirty-nine-byte buffer. It writes to that region until the compressed input is exhausted.\n\nThe PoC parameters in the AISLE advisory for CVE-2026-10649 chose a less aggressive value:\n\n```python\npayload_offset = 0x00000028\npayload_uncompressed = 0xFFFFFFC0\npayload_compressed = len(bz2_payload)\nbz2_payload = bz2.compress(b\"A\"*512 + b\"\\x00\")\n```\n\nWith those values, `size_u = 0xFFFFFFC1`, `payload_offset + size_u = 0xFFFFFFE9` with no wrap, and the receiver calls `calloc(0xFFFFFFE9, 1)`. That is a request for roughly four gigabytes of contiguous virtual memory, allocated and zero-filled. On any host where the request fails, `pcmk__assert_alloc`'s wrapper calls `crm_abort(...)` and `crm_exit(CRM_EX_OSERR)`. The process dies. The advisory describes this primitive. The wraparound primitive at `payload_uncompressed = 0xFFFFFFFE` sits one constant away from it.\n\n## Pre-auth, on the cluster's CIB listener\n\nThe decompressor runs inside `cib_remote_msg()` in `daemons/based/based_remote.c`:\n\n```c\nrc = pcmk__read_available_remote_data(client->remote);\n/* ... */\n\n/* must pass auth before we will process anything else */\nif (!pcmk__is_set(client->flags, pcmk__client_authenticated)) {\n xmlNode *reg;\n const char *user = NULL;\n\n command = pcmk__remote_message_xml(client->remote);\n if (!cib_remote_auth(command)) {\n pcmk__xml_free(command);\n return -1;\n }\n\n pcmk__set_client_flags(client, pcmk__client_authenticated);\n /* ... */\n}\n```\n\n`pcmk__remote_message_xml` is the function with the integer overflow. It runs in the branch reached when `pcmk__client_authenticated` is not yet set. The XML it returns is then handed to `cib_remote_auth()` to check the password. The decompressor runs first. The password check runs against whatever the decompressor returned.\n\nFor the `remote-clear-port` listener (no TLS), the attacker needs nothing more than a TCP connection. For `remote-tls-port`, the attacker needs to complete the gnutls handshake, which the patch commit notes explicitly: \"if remote-tls-port is in use, it requires the client to complete the gnutls handshake procedure (`pcmk__remote_message_xml` is only called in `cib_remote_msg` after the handshake but before the client has authenticated).\" The handshake gates the listener. The authentication gates the cluster. The integer overflow sits between them.\n\nPacemaker does not enable remote CIB administration by default. Operators turn it on. When they do, the listener accepts traffic from anywhere the network routes it to.\n\n## Crash the CIB, fence the node\n\n`pcmk__assert_alloc` is two layers of macros around a one-paragraph function in `include/crm/common/memory_internal.h`:\n\n```c\nstatic inline void *\npcmk__assert_alloc_as(const char *file, const char *function, uint32_t line,\n size_t nmemb, size_t size)\n{\n void *ptr = calloc(nmemb, size);\n\n if (ptr == NULL) {\n crm_abort(file, function, line, \"Out of memory\", FALSE, TRUE);\n crm_exit(CRM_EX_OSERR);\n }\n return ptr;\n}\n```\n\nA failed allocation is not a return value. It is a process termination. The CIB daemon (`pacemaker-based`) is the cluster's information base, the single source of truth for cluster configuration and state. When it dies on a node, the rest of the cluster sees the node as no longer participating in the CIB and proceeds with whatever recovery policy the cluster was configured for.\n\nThe patch commit `bb37829` names the consequence directly: \"we'll crash due to an out of memory error and the node could potentially be fenced.\"\n\nAn unauthenticated attacker on the wire holds the input to that decision. A cluster manager designed to maintain availability is being asked, by an unauthenticated remote, to remove one of its own hosts from itself. The same pre-auth socket is reachable on every cluster member that runs the CIB remote listener.\n\n## Twelve and a half years of dead receiver\n\nThe integer-overflow line was introduced in commit `aa024490a0`, Andrew Beekhof, October 14, 2013: \"Feature: remote: Properly version the remote connection protocol.\" It survived the 2020 refactor that split IPC code into multiple files. It survived the 2025 sanity-check pass that touched the surrounding `localized_remote_header()` function. It was not introduced by a recent change.\n\nThe fix commit `1e1825b` is unambiguous about why no one noticed:\n\n> Such a header would have to indicate that the payload is compressed, which nothing in pacemaker is doing. In fact, we haven't used any of the remote message compression code since it was introduced in 2013 which explains why we haven't seen any problems with it.\n\nA second commit `8e667ef`, the medium-severity sanity-check fix in `localized_remote_header`, makes the same admission in shorter form:\n\n> These checks haven't failed in the past because nothing is using the compressed payload code.\n\nThe codepath had been auditable in the source for twelve and a half years. No internal traffic exercised it. No fuzz target reached it through `pcmk__remote_send_xml`, because that function never sets the gate field. No production crash report pointed at it, because production senders never produced a compressed remote message. The first traffic ever to exercise the branch was, by construction, attacker traffic, because the field that gates the branch is one no Pacemaker sender has ever set to nonzero.\n\nAISLE, the AI-assisted code-review platform that has now produced more than 225 CVE disclosures against widely-deployed codebases, reported the bug to Red Hat. The disclosure credit on CVE-2026-10649 reads \"AISLE in partnership with Red Hat.\" A pipeline whose job is to read every codepath read the one nobody on the project had a reason to exercise.\n\n## What the patch did, and what the wire format still says\n\nThe fix for CVE-2026-10649 lands in four commits on PR [#4128](https://github.com/clusterLabs/pacemaker/pull/4128):\n\n| Commit | Severity | Effect |\n|---|---|---|\n| `8e667ef` | Med | Rewrites the `expected_size` check in `localized_remote_header` to handle the compressed case correctly and guards the addition against `SIZE_MAX`. The pre-fix check assumed one of `payload_compressed` or `payload_uncompressed` would be zero, which is true only for traffic the project itself produces. |\n| `1e1825b` | High | Adds explicit bounds checks on `payload_uncompressed`, on `size_u`, and on `payload_offset + size_u` against `UINT_MAX` and `SIZE_MAX` before the allocation. This is the integer-overflow fix. |\n| `bb37829` | High | Introduces `PCMK__REMOTE_MSG_MAX_SIZE`, set to 20 MB, and caps both the read-side buffer and the decompression buffer against it. Bounds the cost of a single remote message. |\n| `6dd7ce8` | High | Fixes the send side: `pcmk__remote_send_xml` was computing `header->size_total = iov[0].iov_len + iov[1].iov_len` (two `size_t` values) into a `uint32_t` field with no overflow check. |\n\nThe wire format is unchanged. `payload_compressed`, `payload_uncompressed`, and `payload_offset` are still `uint32_t`. The receiver still trusts them as inputs to an allocation. The new checks bound that trust to twenty megabytes; the patch's own commit message calls that \"doubly unfortunate given how much work we've recently put into removing restrictions on IPC messages allowing for much larger clusters.\"\n\nWhat the receiver does not do, in any version, is delete the decompression branch. The branch that no Pacemaker sender has ever exercised still exists, still runs against attacker-supplied size fields, still calls `BZ2_bzBuffToBuffDecompress` if `payload_compressed` is nonzero. The patch made the branch safe to be wrong. It did not make the branch necessary.\n\nThis is also the [Declared Size Is Allocation](/patterns/declared-size-is-allocation) shape on a C network protocol. The wire field is four bytes; the allocation the receiver was performing was four gigabytes; the amplification ratio is one to a billion. The earlier exhibit was [Svelte devalue passing the wire's length field straight to `new Array(len)`](/posts/svelte-devalue-cve-2026-42570-new-array-allocates-eagerly), where V8 committed 800 megabytes of backing store for an eighteen-byte JSON payload. The pattern recurs at every layer where a parser hands a declared length to a runtime constructor that defaults to eager allocation. The Pacemaker exhibit is the C/network instance, in pre-auth code, against a daemon that decides which nodes get fenced. The wire still names the size. The new code caps the runtime's response at twenty megabytes. The next version of the protocol will still carry the field.\n\nPoC: [seclists.org/oss-sec/2026/q2/944](https://seclists.org/oss-sec/2026/q2/944)","closing_line":"The receiver supports compression. The sender does not. The attacker does.","hook_md":"Pacemaker's CIB remote listener has been decompressing messages that no Pacemaker sender produces. The decompression code lives in `pcmk__remote_message_xml()` in `lib/common/remote.c`, runs before the client authenticates, and trusts three attacker-controlled `uint32_t` size fields to compute a heap allocation. The path has been in the receiver since October 14, 2013. Nothing in Pacemaker has ever set `payload_compressed` to a nonzero value. The codepath is dead from the project's view, and reachable from any TCP socket that completes the listener's handshake. AISLE found it and reported it to Red Hat, which published CVE-2026-10649 to oss-security on June 16, 2026. The fix commit, signed by Chris Lumens at Red Hat, states the gap directly: \"These checks haven't failed in the past because nothing is using the compressed payload code.\"","post_id":652,"slug":"pacemaker-cve-2026-10649-receiver-with-no-sender","title":"CVE-2026-10649: Pacemaker's Remote Listener Has Decompressed Messages Pre-Auth Since 2013. Nothing In Pacemaker Has Ever Compressed One.","type":"initial","unreadable_sentence":"The first traffic ever to exercise the branch was, by construction, attacker traffic, because the field that gates the branch is one no Pacemaker sender has ever set to nonzero."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCauzmtgAKCRDeZjl4jgkQ JgIQAPwJNX399vAX4LWK6IXVgB3ag5euefJEGpfMCuyN/+tTVAD+M39XWEeYYKOk O+MHQmIBoGgn6efTXGiUPkF8k2dXQAg= =dZMH -----END PGP SIGNATURE-----