# Let’s Encrypt is using ntpd-rs

**URL:** <https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444>\
**Category:** Uncategorized\
**Created:** [June 28, 2024, 7:42pm UTC](https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444 "2024-06-28T19:42:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![NTPman](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ntpman/32/450_2.png) [@NTPman](https://community.ntppool.org/u/NTPman)\
**Post date:** [June 28, 2024, 7:42pm UTC](https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444/1 "2024-06-28T19:42:27Z")

</div>

Let’s Encrypt has high security requirement, so they deployed memory safe `NTP` implementation, ntpd-rs:

> **[More Memory Safety for Let’s Encrypt: Deploying ntpd-rs - Let's Encrypt](https://letsencrypt.org/2024/06/24/ntpd-rs-deployment.html)**
>
> When we look at the general security posture of Let’s Encrypt, one of the things that worries us most is how much of the operating system and network infrastructure is written in unsafe languages like C and C++. The CA software itself is...

Interesting discussion: [More Memory Safety for Let's Encrypt: Deploying ntpd-rs | Hacker News](https://news.ycombinator.com/item?id=40778594)

---

<div class="post-metadata">

**Author:** ![mlichvar](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mlichvar](https://community.ntppool.org/u/mlichvar)\
**Post date:** [June 29, 2024, 7:44am UTC](https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444/2 "2024-06-29T07:44:02Z")

</div>

Please note that ntpd-rs already had two high-impact security issues in the server functionality. It could be crashed by attackers.

If you want to run it on a pool server, consider setting up a monitoring script ready to switch to something else if it starts crashing. Setting the systemd service to restart automatically on a crash doesn’t help much as it takes some time for the server to provide time to clients again and the attackers could be crashing it faster than that.

---

<div class="post-metadata">

**Author:** ![NTPman](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ntpman/32/450_2.png) [@NTPman](https://community.ntppool.org/u/NTPman)\
**Post date:** [July 3, 2024, 12:01pm UTC](https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444/3 "2024-07-03T12:01:03Z")

</div>

> [@mlichvar](#):
>
> ntpd-rs already had two high-impact security issues

What do you think, are those bugs a kind of child-sickness, and their number will tend to go to zero asymptotically? Or, are those bugs rather structural, any new one may appear any time later?

---

<div class="post-metadata">

**Author:** ![davehart](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/davehart/32/1411_2.png) [@davehart](https://community.ntppool.org/u/davehart)\
**Post date:** [July 3, 2024, 1:41pm UTC](https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444/4 "2024-07-03T13:41:15Z")

</div>

In the case of ntpd, urgent fixes have almost all been due to logic errors, not the memory safety issues Rust avoids by language design. So an alternative implementation that is basically safe from buffer overruns, double-frees, etc is fine as far as it goes, but given ntpd-rs is a new codebase with little exposure in the wild compared to Chrony or ntpd, I expect these types of issues to continue to be a problem for years to come.

---

<div class="post-metadata">

**Author:** ![mlichvar](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mlichvar](https://community.ntppool.org/u/mlichvar)\
**Post date:** [July 4, 2024, 11:02am UTC](https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444/5 "2024-07-04T11:02:17Z")

</div>

Yes, NTP as a networking protocol (the timing modes, not mode 6/7) is very simple and memory-safety issues in its implementations seem to be rare. The complexity is in the processing of NTP measurements, etc.

I think they will eventually sort the security issues out, but it will take some effort. As I see it, Rust is like C++, great for fast development, but not so great for maintaining long-term projects with minimum resources. The code is harder to read and reason about. As with any other language, it still needs good testing and fuzzing coverage. For an NTP client/server, Rust just turns memory-safety issues into denial-of-service issues.

---

<div class="post-metadata">

**Author:** ![xss\_snake](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/xss_snake/32/1423_2.png) [@xss\_snake](https://community.ntppool.org/u/xss_snake)\
**Post date:** [July 25, 2024, 6:39am UTC](https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444/6 "2024-07-25T06:39:38Z")

</div>

@ [mlichvar](https://community.ntppool.org/u/mlichvar)  
do you have twitter account?  
I want to follow you…

---

<div class="post-metadata">

**Author:** ![mlichvar](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mlichvar](https://community.ntppool.org/u/mlichvar)\
**Post date:** [July 25, 2024, 1:56pm UTC](https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444/7 "2024-07-25T13:56:43Z")

</div>

No, I don’t have a twitter account.

---

<div class="post-metadata">

**Author:** ![xss\_snake](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/xss_snake/32/1423_2.png) [@xss\_snake](https://community.ntppool.org/u/xss_snake)\
**Post date:** [July 26, 2024, 4:45pm UTC](https://community.ntppool.org/t/let-s-encrypt-is-using-ntpd-rs/3444/8 "2024-07-26T16:45:21Z")

</div>

is chrony your repo?
