Skip to content

fix(reassembly): IPv6 reassembly zero-fills a snaplen-cut non-final fragment and reports it COMPLETE #1567

Closed

Description

@JarryShaw

IPv6 reassembly zero-fills a non-final fragment that the snapshot length cut, and reports the datagram COMPLETE. This was found in the #1564 review and re-measured on both main and e7c9e5fba, which give the same result.

Repro. A 3-fragment IPv6 datagram carries fragments of 64, 64 and 72 octets.

  • With the first fragment captured to 60 octets, the result is COMPLETE, 200 octets, with octets 60–63 zero-filled. This holds on the default, dpkt and scapy engines, strict and lax.
  • With the first fragment captured to 52 octets, strict gives PARTIAL runs (56, 136) and lax gives a zero-filled payload.

Cause. ipv6_reassembly derives tl from the captured payload (pcapkit/toolkit/pcap.py:244, tl=hdr_len + len(payload)), so a cut can't show up in TL. A non-final fragment must carry a multiple of 8 octets (RFC 8200 §4.5). So an MF=1 fragment whose payload length isn't a multiple of 8 can only be a cut. #1564 applies that rule to IPv4 TSO frames (TL 0).

Expected: PARTIAL, with the missing octets left as a hole, as IPv4 does after #1564.

Blocked until #1564 merges, because the guard lives in pcapkit/foundation/reassembly/ip.py.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 10, 2026
  2. moved this to Blocked in PyPCAPKiton Oct 10, 2026
  3. JarryShaw commented on Oct 10, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1564 has merged (e0d3c8512). One worker is fixing this together with #1566, in pcapkit/foundation/reassembly/. toolkit/pcap.py is held by #1570.

  4. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 10, 2026
  5. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions