Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: bgpd: EVPN, don't overflow vni in log_evpnaddr
To:
tech@openbsd.org, denis@openbsd.org
Date:
Thu, 14 May 2026 10:22:11 +0200

Download raw body.

Thread
On Wed, May 13, 2026 at 04:59:35PM +0200, Claudio Jeker wrote:
> In log_evpnaddr() the labellen for EVPN_ROUTE_TYPE_2 can either be 3 or 6.
> Fitting 6 bytes into a uint32_t is tight.
> 
> I think this code just wants to print the first label (which always
> exists).
> 
> Also I dislike this memcpy, lets just use the old school shift and or
> method. We can certainly keep the memcpy but then with a fixed length of
> 3.

I'm fine with your approach, seems clear enough.

ok

(The second memcpy is interesting...)