Theo de Raadt <[email protected]> wrote:

> [email protected] wrote:
> 
> > It appears that the lldpd (in base) process dies anytime
> > a logical interface is created (ex: when a vm is started).
> > 
> > On a vm running amd64 -current:
> > 
> > # cat /var/db/installed.BUILDINFO
> > Build date: 1787294679 - Fri Aug 21 06:44:39 UTC 2026
> > 
> > # lldpd -d
> > lldpd: vio0 index 1
> > lldpd: route message: 26 bytes
> > lldpd[83203]: pledge "tty", syscall 54
> > Abort trap
> 
> Probably this.
> 
> static void
> rtsock_if_attach(struct lldpd *lldpd, const struct if_announcemsghdr *ifan)
> {
> ...
>         if (ioctl(lldpd->s, SIOCGIFDATA, &ifr) == -1) {
> 
> 
> This may help, please test and let me know.
> 
> Index: lldpd.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/lldpd/lldpd.c,v
> diff -u -p -u -r1.9 lldpd.c
> --- lldpd.c   16 May 2025 04:04:41 -0000      1.9
> +++ lldpd.c   23 Aug 2026 00:47:32 -0000
> @@ -268,7 +268,7 @@ main(int argc, char *argv[])
>       if (!debug && rdaemon(devnull) == -1)
>               err(1, "unable to daemonize");
>  
> -     if (pledge("stdio unix", NULL) == -1)
> +     if (pledge("stdio unix route", NULL) == -1)
>               err(1, "pledge");
>  
>       event_init();
> 

Wait that won't work.  SIOCGIFDATA is not permitted at all.  I'm
surprised, it is like this code was never tested.

Reply via email to