Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Oct 2019 21:20:32 +0100
From:      Roy Marples <roy@marples.name>
To:        Hiroki Sato <hrs@allbsd.org>, woodsb02@gmail.com
Cc:        hrs@freebsd.org, brooks@freebsd.org, julian@freebsd.org, driesm.michiels@gmail.com, freebsd-net@freebsd.org
Subject:   Re: DHCPv6 client in base
Message-ID:  <f3c51ba5-ebad-4f2f-2ae5-ab08055f6b6b@marples.name>
In-Reply-To: <20191014.043209.919156653743886519.hrs@allbsd.org>
References:  <CAOc73CCLPmB7m3yaDE7p4izJ8apaO5jcyRPyLkSJtopqsHxtSQ@mail.gmail.com> <CAOc73CD5dAn95mMuzxeNKoJGxdmZF-ChYFm49tLdKca00OSv8w@mail.gmail.com> <CAOc73CBzvRD0Je5%2BXQJ9_UqTP2_cgJvc7_7JTU0fjKBCVnTt-w@mail.gmail.com> <20191014.043209.919156653743886519.hrs@allbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13/10/2019 20:32, Hiroki Sato wrote:
> Ben Woods <woodsb02@gmail.com> wrote
>    in <CAOc73CBzvRD0Je5+XQJ9_UqTP2_cgJvc7_7JTU0fjKBCVnTt-w@mail.gmail.com>:
> 
> wo> On Fri, 11 Oct 2019 at 08:32, Ben Woods <woodsb02@gmail.com> wrote:
> wo> As promised, I have completed my initial work to import dhcpcd into FreeBSD
> wo> base, and it is ready for review, testing and comment at the link below.
> wo> https://reviews.freebsd.org/D22012
> wo>
> wo> As per the comment from brooks@, I have opted to have it installed in
> wo> parallel with dhclient (which remains the default).
> 
>   How do you want to proceed the discussion?  I sent my view and made
>   myself clear that importing dhcpcd into the base system as-is is not
>   a good idea.  What is your answer to my concerns?  I also agree with
>   Brooks about a need for sandboxing before the import if it will
>   happen.  Do you have any plan to add changes to the imported dhcpcd?

Sorry if it was not clear. The discussion involves what is the required 
acceptance for Priviledge Seperation because this is quite new to me.

My current idea is to open DHCP, IPv6RA and DHCP6 ports, chroot, drop 
privs and fork. This concept is pretty standard thus far. These are 
listening ports only and will dry-run any received message through 
dhcpcd's two commons paths:
   1) extract address and routing information without applying it
   2) environment option generation from the whole message

Once done, the message is passed verbatim back to dhcpcd for doing the 
same tasks but actually configuring the host.

I've started work on implementing this and hopefully it will add value 
and security. If anyone thinks this is wrong, or there is a better way 
or I've missed something blazingly obvious, now is the time to tell me!

The tricky part will be handling BPF (for BOOTP and ARP) because of the 
needs of how dhcpcd works. I think I'll need to spawn an unpriv process 
per BPF as needed and this part will probably be implemeted last.

Roy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f3c51ba5-ebad-4f2f-2ae5-ab08055f6b6b>