Skip to content

fix(ipv6): CALIPSO make() writes a corrupt length on overflow and raises raw errors for a bad pad #1408

Closed

Description

@JarryShaw

Describe the bug
make() for a CALIPSO option does not validate its inputs. _make_opt_calipso (pcapkit/protocols/internet/hopopt.py, ipv6_opts.py):

  • writes a corrupt header when the bitmap plus pad exceeds the 1-octet Opt Data Len;
  • surfaces a raw struct.error or TypeError for a pad of the wrong type, not a library error.

To Reproduce

Expected behavior
Raise ProtocolError (or a field error) when the option would exceed 255 octets of data, and reject non-bytes pads with a library error.

Found by the #1407 cross-review. Blocked until #1407 merges, which edits the same function.

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

    @JarryShaw
    OwnerAuthor

    Unblocked: #1407 has merged. A worker is starting on it.

  3. 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 8, 2026
  4. added 2 commits that reference this issue on Oct 8, 2026
    5a3cfb5
    c228007
  5. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 8, 2026
  6. 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