CVE-2024-38528
HIGH7.5EPSS 0.22%Unlimited number of NTS-KE connections can crash ntpd-rs server
描述
### Summary Missing limit for accepted NTS-KE connections allows an unauthenticated remote attacker to crash ntpd-rs when an NTS-KE server is configured. Non NTS-KE server configurations, such as the default ntpd-rs configuration, are unaffected. ### Details Operating systems have a limit for the number of open file descriptors (which includes sockets) in a single process, e.g. 1024 on Linux by default. When ntpd-rs is configured as an NTS server, it accepts TCP connections for the NTS-KE service. If the process has reached the descriptor limit and tries to accept a new TCP connection, the accept() system call will return with the EMFILE error and cause ntpd-rs to abort. A remote attacker can open a large number of parallel TCP connections to the server to trigger this crash. The connections need to be opened quickly enough to avoid the `key-exchange-timeout-ms` timeout (by default 1000 milliseconds). ### Impact Only NTS-KE server configuration are affected. Those without an NTS-KE server configuration such as NTS client only or NTP only configuration are unaffected. For affected configurations the ntpd-rs daemon can made completely unavailable by crashing the service. If ntpd-rs is automatically restarted, an attacker can repeat the attack to prevent ntpd-rs from doing anything useful. ### Workarounds - Disable NTS-KE server functionality - Increase system resource limits (`RLIMIT_NOFILE`) to make the attack more difficult - Lower the `key-exchange-timeout-ms` configuration setting to make the attack more difficult
受影響套件(2)
- crates.io/ntpd>= 0.3.1, < 1.1.3
- Debian/rust-ntpdfrom 0, < 1.1.3-1
CVSS 分數
| 來源 | 版本 | 嚴重程度 | 向量 |
|---|---|---|---|
| osv | CVSS 4.0 | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| osv | CVSS 3.1 | HIGH7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
參考連結(5)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2024-38528
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2024-38528
- PATCHhttps://github.com/pendulum-project/ntpd-rs
- WEBhttps://github.com/pendulum-project/ntpd-rs/commit/6049687006ea5b26eeac927964b5fcc80d7bde50
- WEBhttps://github.com/pendulum-project/ntpd-rs/security/advisories/GHSA-2xpx-vcmq-5f72