Skip to content

fix(protocols): a non-first IPv6 fragment's data is dissected as an upper-layer header #1545

Closed

Description

@JarryShaw

On main b6b95bc8e, the default engine dissects the data of a non-first IPv6 fragment as if it began with the header named in the Fragment header's Next Header field.

examples/captures/ipv6.pcap, frames 13–16 (Fragment offsets 0, 1448, 2896, 4344), all read Ethernet:IPv6:IPv6-Frag:UDP:Raw:

Frame Offset UDP read
13 0 51234 → 5001, len 4778 (real)
14 1448 39645 → 58998, len 24206 (payload bytes)
15 2896 62624 → 12089, len 12864
16 4344 10352 → 14281, len 20758

Frag(offset > 0) + TCP does the same (Frag:TCP:Raw), so TCP flow tracing and reassembly can ingest garbage segments.

RFC 8200 §4.5: subsequent fragments carry the Per-Fragment headers, the Fragment header, then "the fragment itself", a slice of the Fragmentable Part. No header begins there. The Next Header field names the first header of the Fragmentable Part, which is only in the first fragment.

Expected: after a Fragment header with offset > 0, the remainder is opaque payload (Raw), not a parsed upper layer. This changes the sample digests for frames 14–16, deliberately.

The #1540 worker and its reviewer found this; I re-derived it on a git archive of main.

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. JarryShaw commented on Oct 10, 2026

    @JarryShaw
    OwnerAuthor

    Blocked until #1540 merges, since both change the fragment walk in pcapkit/protocols/internet/ipv6.py.

  3. JarryShaw commented on Oct 10, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1540 has merged (f4243bcbb). A worker is on the fix in pcapkit/protocols/internet/ipv6.py.

  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. moved this from Blocked to WIP in PyPCAPKiton Oct 10, 2026
  6. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 10, 2026
  7. added this to the PyPCAPKit v1.5 milestone on Oct 26, 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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions