Repository navigation
cell M6: grant-map authentication (GM IE v2, the cell key's tag) - #537
Conversation
The grant map IE was the one scheduling IE without a tag: a forged map could move a UE's slots and, since #536, reset its grant state through the restart path. GM v2 carries the first 8 bytes of mac('G' || body..crc) with the cell key (CELL_PSK), as the NL/MR/handover IEs do; encode/decode/find take the Mac (mandatory: every caller decides). With a key a forged or untagged map is refused before any offer; without one (an unauthenticated development cell, a passive witness) only the structure is checked; v1 is refused. Mac moves from Rach.h to GrantMap.h. The UE counts serving maps taken and refused (cell.ue.done gm_ok/gm_refused, cell.ue.gm_refused). docs: the M5/M6 rig results before this ran without CELL_PSK (zero tags, unchecked; F1 was keyed) — stated, and the suite re-run keyed. Rig (testrig, every cell role on one CELL_PSK): m6_gmauth.sh 2/2 — UE1 586-587 maps taken, 0 refused, in slot 99.8 %; UE2 under another key 0 taken, 586-587 refused, never in slot. The M6 suite keyed: handover 2+1, inter-frequency 2, DAPS 2+2 (0/0 missing vs 11/16), measurement gaps 2, phase planning 2, clock fit + restart 1+1 — all pass, no refusal at any keyed UE. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
PR Summary by QodoAuthenticate v2 grant maps with the cell key
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can switch off images and animations for a plain-text comment |
|
CI green. Qodo: no bugs, rule violations or requirement gaps; the remaining item is the high-level alternative (require a key at every decoder), for which Qodo recommends this PR's explicit-Mac, keyed-verification approach that keeps the documented keyless modes. Merging with skip-qodo-gate. |
M6 (#260, EPIC #254): the grant map IE is now authenticated. This closes the open item from #536.
Why
The grant map was the only scheduling IE without a tag. A forged map could already move a UE's slots, and since #536 it could also reset the UE's grant state through the DU-restart path.
What
src/cell/GrantMap.h) has the layout… crc16 tag(8). The tag is the first 8 bytes ofmac('G' || body..crc)under the cell key (CELL_PSK), the same scheme as the NL/MR/handover IEs.encode_grant_ie,decode_grant_ieandfind_grant_maptake theMac. It is mandatory, so every caller decides.Macmoves fromRach.htoGrantMap.h, whichRach.hincludes.build_du_beacon(map, mac, …);auth;CELL_PSKif it has one.gm_ok/gm_refusedincell.ue.done, and the first refusal logscell.ue.gm_refused.A correction this PR makes
The M5/M6 rig scripts never set
CELL_PSK. So the handover, DAPS, inter-frequency, measurement-gap, phase-planning and clock-fit rig results ran as an unauthenticated development cell: zero tags, not checked. F1 was keyed throughout.docs/cell-m6.mdnow says so. The testrig scripts give every cell role one key, and the suite was re-run keyed (below).Rig
Wrong-key test (testrig
scripts/m6_gmauth.sh, 2/2). Every role holds the cell key except UE2:The M6 suite keyed, all pass. No keyed UE refused a map (36 UE runs), apart from UE2 above.
🤖 Generated with Claude Code