diff --git a/srcpkgs/dhcpcd/patches/61b64b96eb199ba95b19e92fb011e0373202b49f.patch b/srcpkgs/dhcpcd/patches/61b64b96eb199ba95b19e92fb011e0373202b49f.patch deleted file mode 100644 index c8c35d6364ab3e..00000000000000 --- a/srcpkgs/dhcpcd/patches/61b64b96eb199ba95b19e92fb011e0373202b49f.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 61b64b96eb199ba95b19e92fb011e0373202b49f Mon Sep 17 00:00:00 2001 -From: Roy Marples -Date: Thu, 21 May 2026 08:43:58 +0100 -Subject: [PATCH] DHCP6: Delete the eloop event before closing an ia listener - socket - -This only happens when dhcpcd is running on a specific interface -and can trigger erroneous logs deleting the socket from -kqueue/epoll. -With the prior eloop it could also trigger ia events from a -non related fd if re-used. - -Hopefully fixes #596. ---- - src/ipv6.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/ipv6.c b/src/ipv6.c -index af5fd277..263fb6a0 100644 ---- a/src/ipv6.c -+++ b/src/ipv6.c -@@ -1023,8 +1023,8 @@ ipv6_freeaddr(struct ipv6_addr *ia) - #endif - - if (ia->dhcp6_fd != -1) { -- close(ia->dhcp6_fd); - eloop_event_delete(eloop, ia->dhcp6_fd); -+ close(ia->dhcp6_fd); - } - - eloop_q_timeout_delete(eloop, ELOOP_QUEUE_ALL, NULL, ia); diff --git a/srcpkgs/dhcpcd/patches/CVE-2026-56113.patch b/srcpkgs/dhcpcd/patches/CVE-2026-56113.patch deleted file mode 100644 index c73702e3d638db..00000000000000 --- a/srcpkgs/dhcpcd/patches/CVE-2026-56113.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 5733d3c59a5651f64357ac11c98b4f39895c8d25 Mon Sep 17 00:00:00 2001 -From: Roy Marples -Date: Tue, 23 Jun 2026 02:17:10 +0100 -Subject: [PATCH] DHCPv6: When deprecating addresses, restart on prefix - deletions - -As that might invalidate the next address to iterate on. - -Reported-by: CuB3y0nd ---- - src/dhcp6.c | 21 ++++++++++++++++++--- - 1 file changed, 18 insertions(+), 3 deletions(-) - -diff --git a/src/dhcp6.c b/src/dhcp6.c -index 460040bd..02464eb3 100644 ---- a/src/dhcp6.c -+++ b/src/dhcp6.c -@@ -2561,12 +2561,13 @@ dhcp6_findia(struct interface *ifp, struct dhcp6_message *m, size_t l, - } - - #ifndef SMALL --static void -+static bool - dhcp6_deprecatedele(struct ipv6_addr *ia) - { - struct ipv6_addr *da, *dan, *dda; - struct timespec now; - struct dhcp6_state *state; -+ bool freed = false; - - timespecclear(&now); - TAILQ_FOREACH_SAFE(da, &ia->pd_pfxs, pd_next, dan) { -@@ -2595,11 +2596,14 @@ dhcp6_deprecatedele(struct ipv6_addr *ia) - if (IN6_ARE_ADDR_EQUAL(&dda->addr, &da->addr)) - break; - } -- if (dda != NULL) { -+ if (dda != ia && dda != NULL) { - TAILQ_REMOVE(&state->addrs, dda, next); - ipv6_freeaddr(dda); -+ freed = true; - } - } -+ -+ return freed; - } - #endif - -@@ -2607,7 +2611,11 @@ static void - dhcp6_deprecateaddrs(struct ipv6_addrhead *addrs) - { - struct ipv6_addr *ia, *ian; -+#ifndef SMALL -+ bool again; -+#endif - -+again: - TAILQ_FOREACH_SAFE(ia, addrs, next, ian) { - if (ia->flags & IPV6_AF_EXTENDED) - ; -@@ -2629,7 +2637,9 @@ dhcp6_deprecateaddrs(struct ipv6_addrhead *addrs) - /* If we delegated from this prefix, deprecate or remove - * the delegations. */ - if (ia->flags & IPV6_AF_PFXDELEGATION) -- dhcp6_deprecatedele(ia); -+ again = dhcp6_deprecatedele(ia); -+ else -+ again = false; - #endif - - if (ia->flags & IPV6_AF_REQUEST) { -@@ -2642,6 +2652,11 @@ dhcp6_deprecateaddrs(struct ipv6_addrhead *addrs) - if (!(ia->flags & IPV6_AF_EXTENDED)) - ipv6_deleteaddr(ia); - ipv6_freeaddr(ia); -+#ifndef SMALL -+ /* Deletion may invalidate the next pointer so restart */ -+ if (again) -+ goto again; -+#endif - } - } - diff --git a/srcpkgs/dhcpcd/patches/CVE-2026-56114.patch b/srcpkgs/dhcpcd/patches/CVE-2026-56114.patch deleted file mode 100644 index 3a277c2846aa63..00000000000000 --- a/srcpkgs/dhcpcd/patches/CVE-2026-56114.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2f00c7bfc408b6582d331932dfa47829c4819029 Mon Sep 17 00:00:00 2001 -From: Roy Marples -Date: Tue, 23 Jun 2026 02:06:55 +0100 -Subject: [PATCH] DHCPv6: Prefix exclude option can be 17 octets (#671) - -Well that's a simple off by one error - -Reported-by: CuB3y0nd ---- - src/dhcp6.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/dhcp6.c b/src/dhcp6.c -index 4a15319c..460040bd 100644 ---- a/src/dhcp6.c -+++ b/src/dhcp6.c -@@ -1060,7 +1060,7 @@ dhcp6_makemessage(struct interface *ifp) - - /* RFC6603 Section 4.2 */ - if (ap->prefix_exclude_len) { -- uint8_t exb[16], *ep, u8; -+ uint8_t exb[17], *ep, u8; - const uint8_t *pp; - - n = (size_t)((ap->prefix_exclude_len - diff --git a/srcpkgs/dhcpcd/patches/CVE-2026-56116.patch b/srcpkgs/dhcpcd/patches/CVE-2026-56116.patch deleted file mode 100644 index a97ee51d79751d..00000000000000 --- a/srcpkgs/dhcpcd/patches/CVE-2026-56116.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 708b4a56bae080a5b18c2e0c4c6fbe103131a2b0 Mon Sep 17 00:00:00 2001 -From: Roy Marples -Date: Tue, 23 Jun 2026 00:34:58 +0100 -Subject: [PATCH] IPv6ND: Free routeinfo when it expires (#670) - -Reported-by: CuB3y0nd ---- - src/ipv6nd.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/ipv6nd.c b/src/ipv6nd.c -index f2c8c207..2d45b8e9 100644 ---- a/src/ipv6nd.c -+++ b/src/ipv6nd.c -@@ -1814,6 +1814,7 @@ ipv6nd_expirera(void *arg) - logwarnx("%s: expired route %s", - rap->iface->name, rinfo->sprefix); - TAILQ_REMOVE(&rap->rinfos, rinfo, next); -+ free(rinfo); - } - } - diff --git a/srcpkgs/dhcpcd/patches/CVE-2026-56117.patch b/srcpkgs/dhcpcd/patches/CVE-2026-56117.patch deleted file mode 100644 index afa791b4762d53..00000000000000 --- a/srcpkgs/dhcpcd/patches/CVE-2026-56117.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 78ea09ed1633a583dbcde6e7bab9df4639ec8a34 Mon Sep 17 00:00:00 2001 -From: Roy Marples -Date: Mon, 22 Jun 2026 23:41:53 +0100 -Subject: [PATCH] control: Avoid hangup in the recvdata path - -Instead return an error and bubble it up where it can be -hangup / freed more cleanly. - -Reported-by: CuB3y0nd ---- - src/control.c | 47 ++++++++++++++++++++++++------------------- - src/control.h | 2 +- - src/privsep-control.c | 7 ++++++- - 3 files changed, 33 insertions(+), 23 deletions(-) - -diff --git a/src/control.c b/src/control.c -index 24d7480c..ad006c20 100644 ---- a/src/control.c -+++ b/src/control.c -@@ -113,10 +113,8 @@ control_handle_read(struct fd_list *fd) - bytes = read(fd->fd, buffer, sizeof(buffer) - 1); - if (bytes == -1) - logerr(__func__); -- if (bytes == -1 || bytes == 0) { -- control_hangup(fd); -- return -1; -- } -+ if (bytes == -1 || bytes == 0) -+ return (int)bytes; - - #ifdef PRIVSEP - if (IN_PRIVSEP(fd->ctx)) { -@@ -132,15 +130,13 @@ control_handle_read(struct fd_list *fd) - if (err == 1 && - ps_ctl_sendargs(fd, buffer, (size_t)bytes) == -1) { - logerr(__func__); -- control_free(fd); - return -1; - } -- return 0; -+ return 1; - } - #endif - -- control_recvdata(fd, buffer, (size_t)bytes); -- return 0; -+ return control_recvdata(fd, buffer, (size_t)bytes); - } - - static int -@@ -203,23 +199,31 @@ static void - control_handle_data(void *arg, unsigned short events) - { - struct fd_list *fd = arg; -+ int err; - - if (!(events & (ELE_READ | ELE_WRITE | ELE_HANGUP))) - logerrx("%s: unexpected event 0x%04x", __func__, events); - - if (events & ELE_WRITE && !(events & ELE_HANGUP)) { -- if (control_handle_write(fd) == -1) -- return; -+ err = control_handle_write(fd); -+ if (err == -1) -+ goto hangup; - } - if (events & ELE_READ) { -- if (control_handle_read(fd) == -1) -- return; -+ err = control_handle_read(fd); -+ if (err == -1 || err == 0) -+ goto hangup; - } - if (events & ELE_HANGUP) -- control_hangup(fd); -+ goto hangup; -+ -+ return; -+ -+hangup: -+ control_hangup(fd); - } - --void -+int - control_recvdata(struct fd_list *fd, char *data, size_t len) - { - char *p = data, *e; -@@ -241,12 +245,13 @@ control_recvdata(struct fd_list *fd, char *data, size_t len) - if (e == NULL) { - errno = EINVAL; - logerrx("%s: no terminator", __func__); -- return; -+ return -1; - } -- if ((size_t)argc >= sizeof(argvp) / sizeof(argvp[0])) { -+ if ((size_t)argc + 1 >= -+ sizeof(argvp) / sizeof(argvp[0])) { - errno = ENOBUFS; - logerrx("%s: no arg buffer", __func__); -- return; -+ return -1; - } - *ap++ = p; - argc++; -@@ -266,12 +271,12 @@ control_recvdata(struct fd_list *fd, char *data, size_t len) - *ap = NULL; - if (dhcpcd_handleargs(fd->ctx, fd, argc, argvp) == -1) { - logerr(__func__); -- if (errno != EINTR && errno != EAGAIN) { -- control_free(fd); -- return; -- } -+ if (errno != EINTR && errno != EAGAIN) -+ return -1; - } - } -+ -+ return 1; - } - - struct fd_list * -diff --git a/src/control.h b/src/control.h -index dd696d20..9e966f77 100644 ---- a/src/control.h -+++ b/src/control.h -@@ -77,5 +77,5 @@ struct fd_list *control_new(struct dhcpcd_ctx *, int, unsigned int); - void control_free(struct fd_list *); - void control_delete(struct fd_list *); - int control_queue(struct fd_list *, void *, size_t); --void control_recvdata(struct fd_list *fd, char *, size_t); -+int control_recvdata(struct fd_list *fd, char *, size_t); - #endif -diff --git a/src/privsep-control.c b/src/privsep-control.c -index 10768a32..3737d07d 100644 ---- a/src/privsep-control.c -+++ b/src/privsep-control.c -@@ -109,6 +109,7 @@ ps_ctl_dispatch(void *arg, struct ps_msghdr *psm, struct msghdr *msg) - struct iovec *iov = msg->msg_iov; - struct fd_list *fd; - unsigned int fd_flags = FD_SENDLEN; -+ int err; - - switch (psm->ps_flags) { - case PS_CTL_PRIV: -@@ -132,7 +133,11 @@ ps_ctl_dispatch(void *arg, struct ps_msghdr *psm, struct msghdr *msg) - if (fd == NULL) - return -1; - ctx->ps_control_client = fd; -- control_recvdata(fd, iov->iov_base, iov->iov_len); -+ err = control_recvdata(fd, iov->iov_base, iov->iov_len); -+ if (err == -1 || err == 0) { -+ control_free(fd); -+ ctx->ps_control_client = NULL; -+ } - break; - case PS_CTL_EOF: - ctx->ps_control_client = NULL; diff --git a/srcpkgs/dhcpcd/template b/srcpkgs/dhcpcd/template index c316de48626fc5..997c878b9de247 100644 --- a/srcpkgs/dhcpcd/template +++ b/srcpkgs/dhcpcd/template @@ -1,13 +1,13 @@ # Template file for 'dhcpcd' pkgname=dhcpcd -version=10.3.2 +version=10.5.2 revision=1 build_style=configure make_check_target=test configure_args=" --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --rundir=/run/dhcpcd $(vopt_if privsep --privsepuser=_dhcpcd) $(vopt_enable privsep)" -hostmakedepends="ntp pkg-config" +hostmakedepends="pkgconf" makedepends="eudev-libudev-devel" short_desc="RFC2131 compliant DHCP client" maintainer="Orphaned " @@ -15,12 +15,13 @@ license="BSD-2-Clause" homepage="https://roy.marples.name/projects/dhcpcd" changelog="https://github.com/NetworkConfiguration/dhcpcd/releases" distfiles="https://github.com/NetworkConfiguration/dhcpcd/archive/refs/tags/v${version}.tar.gz" -checksum=fa9aa4867e2cd5d1551bf93e34fb8ed6891702448df8a71afffab067ceb66a4f +checksum=6040a01c69a17dc166d350f6dacf8444ab1e1945481bc84ff50d7ca74364b78d lib32disabled=yes conf_files=/etc/dhcpcd.conf system_accounts="_dhcpcd" _dhcpcd_homedir="/var/db/dhcpcd" +make_dirs="/var/db/dhcpcd 0770 root _dhcpcd" build_options="privsep" desc_option_privsep="Enable privilege separation mode for the daemon"