From 323e075675c9a43d63de53eb18b31cfb7642f812 Mon Sep 17 00:00:00 2001 From: Kevin Ahrendt Date: Wed, 7 Oct 2026 06:56:26 -0400 Subject: [PATCH] Add truncated fragment frames to malformed sequences --- README.md | 2 +- messaging.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 86db52e..ba2f9d9 100644 --- a/README.md +++ b/README.md @@ -425,7 +425,7 @@ The concatenated `data` from all fragments yields the original message's payload The [ignore rules](#communication) also apply to fragmented messages. If the receiver does not implement `orig_type`, it MAY discard each fragment's `data` instead of allocating a reassembly buffer. It MUST still authenticate every Noise transport message, track the fragment sequence, and enforce the malformed-sequence rules below. The last fragment clears the sequence state. The discarded message is not dispatched. -**Malformed sequences** are protocol errors; the receiver MUST close the connection. They are: a first fragment received while a fragmented message is in flight, a non-first fragment received with none in flight, a non-fragment binary message received while a fragmented message is in flight, a nonzero reserved flag bit, and an `orig_type` of `1`. +**Malformed sequences** are protocol errors; the receiver MUST close the connection. They are: a first fragment received while a fragmented message is in flight, a non-first fragment received with none in flight, a non-fragment binary message received while a fragmented message is in flight, a nonzero reserved flag bit, an `orig_type` of `1`, a fragment missing its `flags` byte, and a first fragment missing its `orig_type` byte. ## Clock Synchronization diff --git a/messaging.md b/messaging.md index e400064..e3572b7 100644 --- a/messaging.md +++ b/messaging.md @@ -109,7 +109,7 @@ The concatenated `data` from all fragments yields the original message's payload The [ignore rules](#communication) also apply to fragmented messages. If the receiver does not implement `orig_type`, it MAY discard each fragment's `data` instead of allocating a reassembly buffer. It MUST still authenticate every Noise transport message, track the fragment sequence, and enforce the malformed-sequence rules below. The last fragment clears the sequence state. The discarded message is not dispatched. -**Malformed sequences** are protocol errors; the receiver MUST close the connection. They are: a first fragment received while a fragmented message is in flight, a non-first fragment received with none in flight, a non-fragment binary message received while a fragmented message is in flight, a nonzero reserved flag bit, and an `orig_type` of `1`. +**Malformed sequences** are protocol errors; the receiver MUST close the connection. They are: a first fragment received while a fragmented message is in flight, a non-first fragment received with none in flight, a non-fragment binary message received while a fragmented message is in flight, a nonzero reserved flag bit, an `orig_type` of `1`, a fragment missing its `flags` byte, and a first fragment missing its `orig_type` byte. ## Clock Synchronization