mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:55:07 -05:00
On some systems (e.g. FreeBSD) the source Unix domain socket path provided by recvmsg() as msg_name is not always null-terminated even if more space than required for sockaddr_un is provided due to the padding in the sockaddr_all union, and the returned msg_namelen value does not indicate it is missing the termination. If a cmdmon client bound its socket to a maximum-length path (chronyc doesn't allow that), the path would be overread when printing a debug message and trying to send a response. Drop messages from paths not shorter than sun_path to avoid working with un-printf()able and/or unreachable addresses. The clients are expected to not use the maximum-length paths.
47 KiB
47 KiB