You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(hip): make() rounds Header Length down for an unpadded raw parameter #1313
Describe the bug length = total_length // 8 + 4 (hip.py:654) assumes every parameter is already 8-octet aligned, but the bytes branch of _make_hip_param (hip.py:2968-2970) neither pads nor validates the item.
To Reproduce HIP.__new__(HIP).make(parameters=[b'\x00\x41\x00\x08' + bytes(8)]).pack() (a 12-octet parameter; the constructor path is blocked by D1): Header Length byte is 5 but 52 octets are packed (48 would be consistent). A 7-octet raw parameter gives 4 and 47 octets.
Expected behavior
Pad the raw parameter to a multiple of 8, or reject an unaligned one with ProtocolError.
Found by the internet-v4 round-trip audit (#1202); reproduced on main at 11ae68ebf (repro check D2).
Found by the internet-v4 round-trip audit (#1202). The repro was re-checked by an independent verifier, and I re-ran it on main at 11ae68ebf.
Activity
fix(hip): rebuild parsed packets byte-exactly (Header Length, no para…