• Job Snijders's avatar
    RPKI: Add contextual out-of-bound checks in RTR Prefix PDU handler · b9f38727
    Job Snijders authored and Ondřej Zajíček's avatar Ondřej Zajíček committed
    RFC 6810 and RFC 8210 specify that the "Max Length" value MUST NOT be
    less than the Prefix Length element (underflow). On the other side,
    overflow of the Max Length element also is possible, it being an 8-bit
    unsigned integer allows for values larger than 32 or 128. This also
    implicitly ensures there is no overflow of "Length" value.
    
    When a PDU is received where the Max Length field is corrputed, the RTR
    client (BIRD) should immediately terminate the session, flush all data
    learned from that cache, and log an error for the operator.
    
    Minor changes done by commiter.
    b9f38727