ipsec: the default offer names the null cipher beside aes-cbc
The UE is to announce the IPsec algorithms it supports (TS 24.229 5.1.1.2.2 d), and TS 33.203 7.2 has its first REGISTER carry "a list of identifiers for the integrity and encryption algorithms, which the UE supports". The null cipher is one a UE must support (7.1 by TS 33.210 5.3.3 and RFC 8221; GSMA IR.92 5.3), and imsd can install it, but its default offer named aes-cbc alone. Ice Norway has answered imsd's first REGISTER 403 (2026-11-01, -02), where the phone's own modem had carried a call with the CS domain detached (2026-09-02). On Odido it drew an answer that the imsd of that day did not log, and the Python stack's REGISTER minutes later a 403 (2026-09-16), with a SIM that another Fairphone 6's own IMS client had registered with (2026-07-15). That client's four mechanisms were answered with one naming ealg=null, as the Python stack's offer of the null cipher was (2026-07-13). Whether the offer is the reason for either answer is not measured. The default offer is aes-cbc, then null. A P-CSCF that selects the null cipher from it gets SAs that protect the signalling's integrity and do not encrypt it; EALG=aes-cbc gives 1.2.1's offer. Tested: the suites; the daemon of this commit against a stand-in P-CSCF on the workstation that refuses an offer without the null cipher (imsd 1.2.1 is answered 403 there, this commit's is challenged and selects the null mechanism); on the FP6 on KPN, in an earlier build of this change, on 1.2.0, a reregistration and a fresh registration with the default offer: KPN named aes-cbc, and answered the reregistration, the fresh registration's protected REGISTER and the reg-event SUBSCRIBEs 200.
This commit is contained in:
parent
ed2a009425
commit
d3c1ba4a29
6 changed files with 53 additions and 13 deletions
|
|
@ -94,7 +94,7 @@ Configuration is environment variables in `/etc/imsd.env`, none are required.
|
|||
| `HOLDS_FILE` | `/run/imsd.holds` (root) / `$XDG_RUNTIME_DIR/imsd.holds` (`/tmp/imsd.holds` without a runtime dir) | the waits the network imposed (a `Retry-After`, the refusal schedule), where that schedule stands whether the old registration is gone (`old_gone`) and the refusal count (`refusals`: a resume refused without a Retry-After at a start with no fresh target is one, the restart's the second), kept across a restart of imsd for the PDN they were set on — not across a reboot; `/dev/null` switches the file off (only a regular file is ever removed; anything else is emptied). `imsd-handover.sh` honours it too |
|
||||
| `RESUME` | `auto` | `0` forces a fresh registration (ignores a warm SA) where there is a fresh target; with none the untried pair is removed and the bring-up ends as AGENTS §7.2 (the daemon's own bring-up) step 1 says |
|
||||
| `REFRESH_INTERVAL` | *(auto)* | keepalive re-REGISTER period in s; default = half the granted expiry, clamped to [120, 1800] |
|
||||
| `EALG` | `aes-cbc` | the ESP ciphers offered, in order: a comma-separated list of `aes-cbc`, `null` (no encryption) and `des-ede3-cbc`; a name imsd cannot install is ignored with a journal line. From the 401's `Security-Server` list imsd selects the `ipsec-3gpp` mechanism the P-CSCF put the SPIs on when it is the only such entry and one of the offer, else the mechanism of the offer with the highest preference (the `q` of RFC 3329 §2.3.1), and takes the SPIs/ports from the entry carrying them (some cores list every mechanism they support and put the SPIs on the one they applied); when no entry matches, the P-CSCF's SPI-carrying entry is taken as listed (`hmac-md5-96`, an absent `ealg` = null) where imsd can install it, and the journal says so. The offer is logged at bring-up beside the SIP transport, the line, the selection and the SA parameters at every fresh registration |
|
||||
| `EALG` | `aes-cbc,null` | the ESP ciphers offered, in order: a comma-separated list of `aes-cbc`, `null` (no encryption) and `des-ede3-cbc`; a name imsd cannot install is ignored with a journal line. From the 401's `Security-Server` list imsd selects the `ipsec-3gpp` mechanism the P-CSCF put the SPIs on when it is the only such entry and one of the offer, else the mechanism of the offer with the highest preference (the `q` of RFC 3329 §2.3.1), and takes the SPIs/ports from the entry carrying them (some cores list every mechanism they support and put the SPIs on the one they applied); when no entry matches, the P-CSCF's SPI-carrying entry is taken as listed (`hmac-md5-96`, an absent `ealg` = null) where imsd can install it, and the journal says so. The offer is logged at bring-up beside the SIP transport, the line, the selection and the SA parameters at every fresh registration |
|
||||
| `SIP_TRANSPORT` | `auto` | transport of the protected leg (the second REGISTER and everything after it): `tcp`, `udp`, or `auto` = TCP, falling back to a fresh registration over UDP when the P-CSCF leaves two TCP connects unanswered — but only on a phone that has never registered over TCP: once the state file records a TCP registration, a silent connect is treated as an outage, not a policy (delete the file or set `udp` to override, e.g. after a SIM change). The challenge (first REGISTER) is always UDP. Over UDP a REGISTER or INVITE larger than ~1.2 KB leaves as IPv6 fragments at the ims PDN's 1280-byte MTU (the journal says so once per flow); there are no SIP retransmission timers over UDP yet, so a lost datagram costs a timeout. The SAs, the listener and the firewall rule cover both transports |
|
||||
| `SMS_OVER_IMS` | `0` | `1` takes short messages over IMS (AGENTS.md §7.9): the REGISTER Contact advertises `+g.3gpp.smsip` and `net.catcrafts.IMS1.Messaging.Send` submits one; off, imsd does not advertise it and refuses `Send` (AGENTS.md §7.9 says how imsd answers a text the network sends anyway) |
|
||||
| `SMSC` | *(EF_SMSP)* | the service centre a submission is addressed to, in international form (`+31653131313`; spaces, dashes and dots dropped; a national or `00`-prefixed number, or a `*` or `#` in it, is refused at bring-up); unset, imsd reads the (U)SIM's EF_SMSP record 1. Without either, `Send` fails with the reason |
|
||||
|
|
|
|||
Loading…
Reference in a new issue