Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: Fix error handling when receiving BGP Prefix SID attribute (backport #15628) #15657

Merged
merged 2 commits into from
Apr 3, 2024

Commits on Apr 2, 2024

  1. bgpd: Fix error handling when receiving BGP Prefix SID attribute

    Without this patch, we always set the BGP Prefix SID attribute flag without
    checking if it's malformed or not. RFC8669 says that this attribute MUST be discarded.
    
    Also, this fixes the bgpd crash when a malformed Prefix SID attribute is received,
    with malformed transitive flags and/or TLVs.
    
    Reported-by: Iggy Frankovic <iggyfran@amazon.com>
    Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
    (cherry picked from commit ba6a8f1)
    ton31337 authored and mergify[bot] committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    1cf60e5 View commit details
    Browse the repository at this point in the history
  2. bgpd: Prevent from one more CVE triggering this place

    If we receive an attribute that is handled by bgp_attr_malformed(), use
    treat-as-withdraw behavior for unknown (or missing to add - if new) attributes.
    
    Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
    (cherry picked from commit babb23b)
    ton31337 authored and mergify[bot] committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    850b745 View commit details
    Browse the repository at this point in the history