After updating to address FreeBSD-SA-26:15.dhclient, my dhclient fails to obtain a lease: Starting dhclient. DHCPREQUEST on em0 to 255.255.255.255 port 67 DHCPACK from x.x.x.x dhcpoffer: filename contains invalid characters. packet_to_lease failed. This is because I am operating in a corporate environment where the bootp filename argument is: \boot\x86\wdsnbp.com However, the fix in e7b4fb41 that addresses FreeBSD-SA-26:15.dhclient/CVE-2026-42511 looks for forward slash ('\') and bails out if it sees it. I tried to work around this by adding to /etc/dhclient.conf: ignore bootfile-name; However this processing seems to happen before this can even take place.
I think that dhclient should at least clear the "illegal" filename and continue to try to use the lease without bailing out.
https://reviews.freebsd.org/D56740
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=873a195ba63575e46686cfd6ea9670a0ca340fa0 commit 873a195ba63575e46686cfd6ea9670a0ca340fa0 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-30 16:45:35 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-04-30 16:45:35 +0000 dhclient: Improve server and filename validation * Don't iterate over each string three times; once is enough. * Reject control characters (anything below space) in addition to the double quote and backslash. * If an unsafe character is encountered, discard the string instead of rejecting the entire lease. * If backslashes are encountered in the file name option, convert them to forward slashes instead of rejecting the option. * Tweak the warning messages a bit. Looking through the rest of the code, it seems to me that notes generally end with a period while warnings generally don't. Fixes: 8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options") PR: 294886 MFC after: 1 week Reviewed by: brooks, markj Differential Revision: https://reviews.freebsd.org/D56740 sbin/dhclient/dhclient.c | 75 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 21 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=252f603d1704044defb7695e707bc87c7f75483a commit 252f603d1704044defb7695e707bc87c7f75483a Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-30 16:45:35 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-04-30 21:06:54 +0000 dhclient: Improve server and filename validation * Don't iterate over each string three times; once is enough. * Reject control characters (anything below space) in addition to the double quote and backslash. * If an unsafe character is encountered, discard the string instead of rejecting the entire lease. * If backslashes are encountered in the file name option, convert them to forward slashes instead of rejecting the option. * Tweak the warning messages a bit. Looking through the rest of the code, it seems to me that notes generally end with a period while warnings generally don't. Fixes: 8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options") PR: 294886 MFC after: 1 week Reviewed by: brooks, markj Differential Revision: https://reviews.freebsd.org/D56740 (cherry picked from commit 873a195ba63575e46686cfd6ea9670a0ca340fa0) sbin/dhclient/dhclient.c | 75 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 21 deletions(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2f9478ad42c442c49a7eff60227148bf2b90b48c commit 2f9478ad42c442c49a7eff60227148bf2b90b48c Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-30 16:45:35 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-04-30 21:07:05 +0000 dhclient: Improve server and filename validation * Don't iterate over each string three times; once is enough. * Reject control characters (anything below space) in addition to the double quote and backslash. * If an unsafe character is encountered, discard the string instead of rejecting the entire lease. * If backslashes are encountered in the file name option, convert them to forward slashes instead of rejecting the option. * Tweak the warning messages a bit. Looking through the rest of the code, it seems to me that notes generally end with a period while warnings generally don't. Fixes: 8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options") PR: 294886 MFC after: 1 week Reviewed by: brooks, markj Differential Revision: https://reviews.freebsd.org/D56740 (cherry picked from commit 873a195ba63575e46686cfd6ea9670a0ca340fa0) sbin/dhclient/dhclient.c | 75 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 21 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b1ece85741db0db60ce68daca564f03dc711fe30 commit b1ece85741db0db60ce68daca564f03dc711fe30 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-30 16:45:35 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-04-30 21:07:18 +0000 dhclient: Improve server and filename validation * Don't iterate over each string three times; once is enough. * Reject control characters (anything below space) in addition to the double quote and backslash. * If an unsafe character is encountered, discard the string instead of rejecting the entire lease. * If backslashes are encountered in the file name option, convert them to forward slashes instead of rejecting the option. * Tweak the warning messages a bit. Looking through the rest of the code, it seems to me that notes generally end with a period while warnings generally don't. Fixes: 8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options") PR: 294886 MFC after: 1 week Reviewed by: brooks, markj Differential Revision: https://reviews.freebsd.org/D56740 (cherry picked from commit 873a195ba63575e46686cfd6ea9670a0ca340fa0) sbin/dhclient/dhclient.c | 75 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 21 deletions(-)
Over to Mark who is handling the EN.
A commit in branch releng/13.5 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b362b6b6c8f28c1ff545bf7c6cdd09388879d1d8 commit b362b6b6c8f28c1ff545bf7c6cdd09388879d1d8 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-30 16:45:35 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-04-30 21:20:57 +0000 dhclient: Improve server and filename validation * Don't iterate over each string three times; once is enough. * Reject control characters (anything below space) in addition to the double quote and backslash. * If an unsafe character is encountered, discard the string instead of rejecting the entire lease. * If backslashes are encountered in the file name option, convert them to forward slashes instead of rejecting the option. * Tweak the warning messages a bit. Looking through the rest of the code, it seems to me that notes generally end with a period while warnings generally don't. Approved by: so Security: FreeBSD-EN-26:11.dhclient Fixes: 8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options") PR: 294886 MFC after: 1 week Reviewed by: brooks, markj Differential Revision: https://reviews.freebsd.org/D56740 (cherry picked from commit 873a195ba63575e46686cfd6ea9670a0ca340fa0) (cherry picked from commit b1ece85741db0db60ce68daca564f03dc711fe30) sbin/dhclient/dhclient.c | 75 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 21 deletions(-)
A commit in branch releng/14.3 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5bad905eb37f69a8ac90f5e10c07527aded70b5b commit 5bad905eb37f69a8ac90f5e10c07527aded70b5b Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-30 16:45:35 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-04-30 21:21:27 +0000 dhclient: Improve server and filename validation * Don't iterate over each string three times; once is enough. * Reject control characters (anything below space) in addition to the double quote and backslash. * If an unsafe character is encountered, discard the string instead of rejecting the entire lease. * If backslashes are encountered in the file name option, convert them to forward slashes instead of rejecting the option. * Tweak the warning messages a bit. Looking through the rest of the code, it seems to me that notes generally end with a period while warnings generally don't. Approved by: so Security: FreeBSD-EN-26:11.dhclient Fixes: 8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options") PR: 294886 MFC after: 1 week Reviewed by: brooks, markj Differential Revision: https://reviews.freebsd.org/D56740 (cherry picked from commit 873a195ba63575e46686cfd6ea9670a0ca340fa0) (cherry picked from commit 2f9478ad42c442c49a7eff60227148bf2b90b48c) sbin/dhclient/dhclient.c | 75 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 21 deletions(-)
A commit in branch releng/14.4 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=dfcb69cdb07edcee90af4ce4fa11207655c5424e commit dfcb69cdb07edcee90af4ce4fa11207655c5424e Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-30 16:45:35 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-04-30 21:21:45 +0000 dhclient: Improve server and filename validation * Don't iterate over each string three times; once is enough. * Reject control characters (anything below space) in addition to the double quote and backslash. * If an unsafe character is encountered, discard the string instead of rejecting the entire lease. * If backslashes are encountered in the file name option, convert them to forward slashes instead of rejecting the option. * Tweak the warning messages a bit. Looking through the rest of the code, it seems to me that notes generally end with a period while warnings generally don't. Approved by: so Security: FreeBSD-EN-26:11.dhclient Fixes: 8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options") PR: 294886 MFC after: 1 week Reviewed by: brooks, markj Differential Revision: https://reviews.freebsd.org/D56740 (cherry picked from commit 873a195ba63575e46686cfd6ea9670a0ca340fa0) (cherry picked from commit 2f9478ad42c442c49a7eff60227148bf2b90b48c) sbin/dhclient/dhclient.c | 75 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 21 deletions(-)
A commit in branch releng/15.0 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=dc8762cfb6e2794ec10873263fa606ff969b1905 commit dc8762cfb6e2794ec10873263fa606ff969b1905 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-04-30 16:45:35 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-04-30 21:09:38 +0000 dhclient: Improve server and filename validation * Don't iterate over each string three times; once is enough. * Reject control characters (anything below space) in addition to the double quote and backslash. * If an unsafe character is encountered, discard the string instead of rejecting the entire lease. * If backslashes are encountered in the file name option, convert them to forward slashes instead of rejecting the option. * Tweak the warning messages a bit. Looking through the rest of the code, it seems to me that notes generally end with a period while warnings generally don't. Approved by: so Security: FreeBSD-EN-26:11.dhclient Fixes: 8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options") PR: 294886 MFC after: 1 week Reviewed by: brooks, markj Differential Revision: https://reviews.freebsd.org/D56740 (cherry picked from commit 873a195ba63575e46686cfd6ea9670a0ca340fa0) (cherry picked from commit 252f603d1704044defb7695e707bc87c7f75483a) sbin/dhclient/dhclient.c | 75 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 21 deletions(-)
This should be fixed by FreeBSD-EN-26:11.dhclient.
I updated and confirmed that the fix works for me. Thanks all for working on this. Now I can fill out "caused an errata notice" on my FreeBSD bingo card :)
(In reply to Kevin Zheng from comment #13) Technically, secteam caused the EN. :( Thank you for the report.