diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-04-30 16:45:35 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-04-30 21:07:18 +0000 |
| commit | b1ece85741db0db60ce68daca564f03dc711fe30 (patch) | |
| tree | 49bbe34c08ace03b072aea16697c691863f027b3 /sys/dev/netmap/netmap_freebsd.c | |
| parent | 6311947d544a7de795dacc608bc0658b0b582926 (diff) | |
dhclient: Improve server and filename validationstable/13
* 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)
Diffstat (limited to 'sys/dev/netmap/netmap_freebsd.c')
0 files changed, 0 insertions, 0 deletions
