Skip to content

fix(misc): IP_Pseudo misses a malformed IPv6 extension header past the first one #2513

Closed

Description

@JarryShaw

On main, IP_Pseudo (pcapkit/protocols/misc/checksum/ip_pseudo.py, from #2479) misses a malformed IPv6 extension header that sits past the first one. The original #2479 worker raised this in its own close-out; I checked it against the code.

  • _source / _destination: the guard for "a malformed Destination Options / Routing header stopped the walk" only tests ip.info.next, the first header after the fixed header. With a valid Hop-by-Hop header in front of a malformed Destination Options (or Routing) header, the guard does not fire, and the address silently falls back to the fixed header's. A Home Address option, or the route's final destination, is then lost from the pseudo-header without any error.
  • _upper: when the walk ends on Raw, the error says "give src" / "give dst". Supplying those does not help derive the protocol or the length, which is what _upper needs.
  • test_ip_pseudo_2471_unit.py covers only the first-header cases.

Fix: detect the header the walk stopped on at any depth, in the same way _upper already walks extension_headers, word _upper's error for what it actually needs, and add tests that fail without the fix.

Blocked: the checksum wave (#2470, #2472–#2475) is editing pcapkit/protocols/misc/checksum/* right now. This goes onto that branch once its worker hands back, rather than as a parallel edit that would collide.

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 Nov 1, 2026
  2. moved this to Blocked in PyPCAPKiton Nov 1, 2026
  3. JarryShaw commented on Nov 1, 2026

    @JarryShaw
    OwnerAuthor

    Unblock condition, stated so it can be checked: the checksum wave's PR for #2470/#2472–#2475 is opened. That branch owns pcapkit/protocols/misc/checksum/*, and this fix goes onto it as a follow-up commit.

  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 Nov 1, 2026
  5. JarryShaw commented on Nov 1, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked and covered: the checksum-wave PR #2543 is open and carries this fix (74595a754). IP_Pseudo now detects an unparsed Destination Options or Routing header at any depth.

  6. moved this from Blocked to WIP in PyPCAPKiton Nov 1, 2026
  7. JarryShaw commented on Nov 1, 2026

    @JarryShaw
    OwnerAuthor

    Done in #2543, which merged as the checksum wave. Its body listed this issue after one Closes, which GitHub reads as closing only the first.

  8. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Nov 1, 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