Re: bgpd aspath_extract overflow check

2022-07-19 Thread Claudio Jeker
On Tue, Jul 19, 2022 at 12:31:47PM +0200, Theo Buehler wrote: > On Tue, Jul 19, 2022 at 11:43:25AM +0200, Claudio Jeker wrote: > > aspath_extract() should do at least a minimal overflow check and not > > access memory after the segment. Can't use fatalx here because bgpctl > > also uses this functi

Re: bgpd aspath_extract overflow check

2022-07-19 Thread Theo Buehler
On Tue, Jul 19, 2022 at 11:43:25AM +0200, Claudio Jeker wrote: > aspath_extract() should do at least a minimal overflow check and not > access memory after the segment. Can't use fatalx here because bgpctl > also uses this function. Instead return 0, that is an invalid ASN. > No code will check the

bgpd aspath_extract overflow check

2022-07-19 Thread Claudio Jeker
aspath_extract() should do at least a minimal overflow check and not access memory after the segment. Can't use fatalx here because bgpctl also uses this function. Instead return 0, that is an invalid ASN. No code will check the return value but that is fine since all callers ensure that pos does n