Download raw body.
rpki-client: reject CustomerASID 0 in ASPAs
On Wed, Nov 11, 2026 at 06:00:11PM +0100, Theo Buehler wrote:
> The customerASID element has type CAS ::= INTEGER (1..4294967295) with
> section 3.2 of draft-ietf-sidrops-aspa-profile-30 explicitly saying
> "The customerASID field contains a positive integer [...]".
>
> as_id_parse() accepts all values in [0, UINT32_MAX], so we need to
> exclude 0 explicitly.
>
> Index: aspa.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/rpki-client/aspa.c,v
> diff -u -p -U4 -r1.49 aspa.c
> --- aspa.c 10 Nov 2026 06:53:27 -0000 1.49
> +++ aspa.c 11 Nov 2026 16:44:31 -0000
> @@ -142,8 +142,12 @@ aspa_parse_econtent(const char *fn, void
> if (!as_id_parse(aspa_asn1->customerASID, &aspa->custasid)) {
> warnx("%s: malformed CustomerASID", fn);
> goto out;
> }
> + if (aspa->custasid == 0) {
> + warnx("%s: CustomerASID 0 not allowed", fn);
> + goto out;
> + }
>
> if (!aspa_parse_providers(fn, aspa, aspa_asn1->providers))
> goto out;
>
>
OK claudio@
--
:wq Claudio
rpki-client: reject CustomerASID 0 in ASPAs