Skip to content

Validate the AS number of BGP peers #14939

Backlog

Description

@MitchDrage

The required feature described as a wish

As an operator I would like createBgpPeer and updateBgpPeer to check that the AS number is a valid 2-byte (1-65535) or 4-byte (65536-4294967295) AS number, and refuse the ones that can't be used by a peer:

  • 23456, AS_TRANS (RFC 6793)
  • 65535 and 4294967295, reserved (RFC 7300)

Private AS numbers would still be accepted.

There's no check today. createBgpPeer accepts 0, but FRR 8.4.4 rejects the neighbour line with "Unknown command", so the peer exists in CloudStack but isn't configured on the VR.

This is very minor. Only root admins can create or update BGP peers by default, so the chance of this being encountered is low.

Activity

  1. added this to the unplanned milestone on Dec 2, 2026
  2. DaanHoogland commented on Dec 3, 2026

    @DaanHoogland
    Contributor

    @MitchDrage , will you implement this yourself? (and for what milestone?)

  3. weizhouapache commented on Dec 3, 2026

    @weizhouapache
    Member

    makes sense

  4. MitchDrage commented on Dec 3, 2026

    @MitchDrage
    ContributorAuthor

    @MitchDrage , will you implement this yourself? (and for what milestone?)

    Yes, I'll raise a PR for it tomorrow. I'm aiming for 24.0 if possible.
    It's a small change and easy to test.

  5. MitchDrage commented on Dec 4, 2026

    @MitchDrage
    ContributorAuthor

    @DaanHoogland - PR Raised. Do you think this will make it in for 24.0?

  6. github-actions commented on Dec 4, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    createBgpPeer and updateBgpPeer accept any AS number, including values that cannot be used by a BGP peer (23456/AS_TRANS, 65535 and 4294967295). FRR then rejects the neighbour line, so the peer exists in CloudStack but is not configured on the VR. The reporter asks for range and reserved-value validation, and says private AS numbers should still be accepted.

    📊 Assessment

    Dimension Value Reasoning
    Type type:improvement Input validation; the report notes low impact
    Component component:api, component:virtual-router API validation and VR BGP configuration
    Severity n/a Not a bug report; low exposure as only root admins can create peers by default
    Labels type:improvement, component:api, component:virtual-router
    Coding agent Suitable Validation rules are specified (RFC 6793 and RFC 7300). PR #14976 is already open

    🔗 Similar issues

    💡 Notes and suggestions
    • Check the RFC ranges in the report against the API parameter types before merging. A 4-byte AS of 4294967295 is the reserved value and must be rejected.
    • Add a test for both create and update, since the report covers both.

    Triage by Copilot (automated)

    Generated by Daily Issue Triage · copilot · haiku55 · ~8 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions