json: skip json_object_put leak assert on json-c >= 0.19
json-c 0.19 returns 0 from json_object_put() for freed scalars and empty containers, so the return value can't identify leaked references. Fix proposed upstream in json-c/json-c#945.
Alan T. DeKok [Fri, 10 Jul 2026 13:19:14 +0000 (09:19 -0400)]
tweak doc.raddb rules
add "clean" rule, add rule for radrelay.conf
change rules so that for modules, their example configuration
is placed at the bottom of the converted file. So that the
documentation is a bit clearer.
For everything else, the example configuration is inline with the
documentation. For virtual servers, the docs say things like
"this next policy", which is confusing when the policy is at the
bottom of the file instead of in-line
eap_aka_sim: allow externally-derived CK'/IK' for EAP-AKA' (#5894)
* eap_aka_sim: allow externally-derived CK'/IK' for EAP-AKA'
In a 3GPP SWx deployment the HSS performs the EAP-AKA' key transform
itself (TS 33.402 Annex A) and returns CK'/IK' already bound to the
Access Network Identity. The server must then not derive CK'/IK' a
second time from CK/IK, or the MSK will not match the peer.
Add a per-instance config item derive_ck_ik_prime (default yes,
unchanged behavior) to the eap-aka-prime process module. When set to
no, the module reads CK'/IK' from the new control.CK-Prime /
control.IK-Prime attributes and fr_aka_sim_crypto_umts_kdf_1() skips
its local derivation.
- dictionary: add CK-Prime (284) and IK-Prime (285)
- keys: add ck_ik_prime_provided flag
- vector: add fr_aka_sim_vector_umts_ck_ik_prime_from_attrs()
- crypto: guard ck_ik_prime_derive() on the flag; add unit test
- process/eap_aka_prime: add derive_ck_ik_prime config item
* eap_aka_sim: gate external CK'/IK' on attribute presence
Per arr2036 review on #5894: drop the derive_ck_ik_prime config knob
and route the external CK'/IK' path purely on the presence of
control.CK-Prime / control.IK-Prime in the request control list.
If the operator's quintuplet source (e.g. a 3GPP HSS over SWx that
performs the RFC 5448 / TS 33.402 Annex A transform itself) populates
control.CK-Prime, the AKA' KDF reads it from there. If the attributes
are absent the module falls back to the local derivation against
control.CK / control.IK as before.
Removes:
- submodule_config entry for derive_ck_ik_prime in eap_aka_prime/base.c
- derive_ck_ik_prime field on eap_aka_sim_process_conf_t
- branch in state_machine.c that read inst->derive_ck_ik_prime
Functionally equivalent for the existing use case (eap-aka-prime site
with control.CK-Prime / control.IK-Prime populated by the quintuplet
fetch); plain EAP-AKA and EAP-AKA' without external keys are
unaffected.
* eap_aka_sim: distinguish absent vs invalid CK-Prime/IK-Prime
fr_aka_sim_vector_umts_ck_ik_prime_from_attrs() now returns three
states so the caller can tell a normal "fall back to local Annex A
derivation" path apart from a real configuration error:
0 control.CK-Prime / control.IK-Prime both present and valid;
keys->ck_ik_prime_provided is set and kdf_1 skips the local
transform.
1 Neither attribute is supplied. Logged at RDEBUG3 only (the
default AKA' path that derives CK'/IK' locally is the normal
case for most callers); the caller falls through to kdf_1 which
performs the Annex A derivation.
-1 One of the two attributes is present but the other is missing,
or either attribute has the wrong octet length. Logged at
REDEBUG (real configuration error); the state machine routes to
common_failure_notification.
Updates the eap-aka-prime state-machine branch added in the previous
commit to use the new contract (goto failure only on -1). Default
EAP-AKA' deployments that do not set CK-Prime/IK-Prime see no log
noise on a production debug level, matching pre-arr2036 behaviour
where the helper was never invoked unless derive_ck_ik_prime=no.
* eap_aka_sim: avoid duplicate control_pairs lookup for CK-Prime/IK-Prime
Per arr2036 review on #5894: pair lookups walk the request control
list, so doing them twice (once in the eap-aka-prime state machine, once
inside fr_aka_sim_vector_umts_ck_ik_prime_from_attrs) is wasteful.
The state machine now looks up control.CK-Prime and control.IK-Prime
once and passes the resulting fr_pair_t * values into the derivation
function. The helper no longer touches the control list directly; it
just classifies the two pointers (neither / one / both) and validates
the octet length when both are supplied.
Signature change in base.h matches the new contract. No behavioural
change for callers that previously got 0 / 1 / -1 returns.
* eap_aka_sim: drop unused inst declaration in send_aka_challenge_request
The only reference to inst in this RESUME was the old check on
inst->derive_ck_ik_prime, which was removed when the config knob was
dropped. -Werror=unused-variable now flags the declaration.
Alan T. DeKok [Thu, 9 Jul 2026 15:14:33 +0000 (11:14 -0400)]
We don't support DHCPv6 Reconfigure messages.
Because (a) most clients don't support it, and (b) we still need
to write the code to handle the Auth option. Which includes a
bunch of additional requirements about storing keys and replay
counters.
Nick Porter [Wed, 24 Jun 2026 06:18:13 +0000 (07:18 +0100)]
Ensure that calling fr_ring_buffer_alloc returns reserved memory
fr_message_set_t uses two ring buffers, one for the fixed length message
and the other for the variable length data.
If the reservation of ring buffer space for the variable length data
causes garbage collection to run, this can result in all entries in the
fixed length message ring buffer to be freed, which sets all the offsets
to zero.
This would result in the subsequent allocation call returning a
different pointer to the previously reserved one.
Keeping track of the write offset at reservation time allows the
original pointer to be returned.