Repository navigation
fix(internet): the Mobility Header refuses RFC 6275's 12-octet Binding Authorization Data and RFC 4285's 17-octet authentication option (#3237) - #3241
Conversation
…g Authorization Data and RFC 4285's 17-octet authentication option (#3237) - _read_opt_bad and _make_opt_bad no longer require a multiple of eight octets: RFC 6275 section 6.2.7 sizes the authenticator by its procedure, 12 octets for return routability. - _read_opt_auth and _make_opt_auth no longer require an Option Length one less than a multiple of four: RFC 4285 section 5 sizes the data by subtype and SPI, a Length of 17 for MN-HA and, from HMAC_SHA1's untruncated output, 25 for MN-AAA under HMAC_SHA1_SPI. A Length under 5, with no room for the subtype and SPI, is still refused. - Both rules read an option's alignment as a length; each maker is now bounded only by its one-octet Option Length. - The MH option generator builds both options at their RFC lengths.
99f89eb to
5c81d8b
Compare
|
Good to go at
|
|
Coverage: 94.98% (unit tier, Python 3.15,
Per-file detail: the |
|
That is a free-threading race in concurrent first imports, and nothing in this PR's Mobility Header change touches it. The same leg passed on |
Please follow the guide below
Put an
xinto every box [ ] that applies to your pull request (like this: [x])Use the Preview tab to see how your pull request will look
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeDescribed the user-visible change below and left its changelog entry to the maintainer, keeping
docs/source/changelog/andCHANGELOG.mdout of the diff, if the change is user-visible: N/A — centralisedWhat is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseAlso tick if it regenerates constant or registry tables, members keeping their numeric values (the
constlabel)Description of your pull request and other information
Closes #3237.
HMAC_SHA1_SPI(§5.2, §8), which the audit missed. Each maker is now bounded only by its one-octet Option Length.Rawinside IPv6). No per-subtype length is enforced: that is a value rule for the design(protocols): an RFC refusal of a format or value raises on construction only; parsing reads on and warns #3234 follow-up, once feat(protocols): a shared helper that warns on parse, raises on construction and spares a rebuild at an RFC format or value rule, first applied to PPP #3235 lands.Tests:
tests/protocols/internet/test_mh_authenticator_lengths_3237_unit.py, parse alone and in IPv6 → rebuild, andmake()with an enum or an int, at 12, 17 and 25, at every Length to 255, and cut short by the capture. Everything but the Length-under-5 guard fails on anorigin/developexport.mh/protocol.pycoverage over the MH unit modules rises from 91.27% to 91.52%.tests/protocols/internet,tests/protocols/*.py,tests/*.py,tests/projectand its Sphinx-gated modules pass aftermake_samples.py, but fortest_conda_dev_release_gate_2458.py's script runs, which fail the same way on adevelopexport.