# GHSA-5fm9-h728-fwpj: trust-dns vulnerable to Remote Attackers causing Denial-of-Service (packet loops) with crafted DNS packets

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2023-06-01T12:00:00.000Z
- Modified: 2023-11-08T04:15:42.121Z
- Also known as: RUSTSEC-2023-0041

## Description

trust-dns and trust-dns-server are vulnerable to remotely triggered denial-of-service attacks, consuming both network and CPU resources.
DNS messages with the QR=1 bit set are responded to with a `FormErr` response.
This allows creating a traffic loop, in which these `FormErr` responses are sent nonstop between vulnerable servers.

There are two scenarios how this can be exploited: 1) Create a loop between two instances of trust-dns, consuming network resources, or 2) consuming the CPU of a single instance.

With two instances *A* and *B* an attacker sends a DNS query with a spoofed source IP address to *A*.
*A* replies with a `FormErr` to *B*.
Now both servers with ping-pong the message back and forth until by chance the packet is dropped in the network.
Multiple spoofed packets can be sent by the attacker, increasing resource consumption.

A single server can get locked up replying to itself.
Same setup as above, but now *A* sends the reply to itself.
The packet is sent out as fast as the CPU and network stack manage.
This locks up a CPU core.
Multiple packets from the attacker consume multiple CPU cores.

(As written by GitHub Advisory Database.)

## Affected

- trust-dns-server (crates.io): before 0.22.1; from 0.23.0-alpha.2 before 0.23.0-alpha.3; from 0.0.0-0 before 0.22.1; from 0.23.0-0 before 0.23.0-alpha.3

## References

- <https://github.com/bluejekyll/trust-dns/pull/1952> (web)
- <https://github.com/bluejekyll/trust-dns> (package)
- <https://rustsec.org/advisories/RUSTSEC-2023-0041.html> (advisory, web)
- <https://crates.io/crates/trust-dns-server> (package)

## Sources

- GitHub Advisory Database: [GHSA-5fm9-h728-fwpj](https://github.com/advisories/GHSA-5fm9-h728-fwpj), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2023-0041](https://rustsec.org/advisories/RUSTSEC-2023-0041.html), CC0-1.0, modified 2023-11-08

---

Page: https://cve.day/GHSA-5fm9-h728-fwpj · Whole record: https://cve.day/GHSA-5fm9-h728-fwpj.json · Rebuilt by cve.day 2026-11-25T22:56:43.149Z
