]> git.ipfire.org Git - thirdparty/bird.git/commit
Nest: Function aspa_check() should return ASPA_INVALID for paths containing AS_SET
authorEvann DREUMONT <53308142+LeGmask@users.noreply.github.com>
Tue, 2 Sep 2025 14:23:34 +0000 (16:23 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 2 Sep 2025 14:23:34 +0000 (16:23 +0200)
commit93012b3ac81bc8e2a0a9b7e48b552c269b0523d9
tree9ba58054140f8f6cd892def7f2087bdb57bbcc8b
parentab827cb157d7081f4d27b14f4dc4ed3dbd0bfd26
Nest: Function aspa_check() should return ASPA_INVALID for paths containing AS_SET

The aspa_check() uses as_path_getlen() to estimate the size of a buffer,
which does not work for AS_SET segments, because as_path_getlen() returns
length 1 for them regardless of their length. This may cause buffer
overflow and crash.

As AS_SET segments are not valid for ASPA verification, we can just
handle them explicitly. See https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-aspa-verification#section-6

Co-Authored-By: Alarig <alarig@swordarmor.fr>
Minor changes by committer.
nest/a-path.c
nest/attrs.h
nest/rt-table.c