Blog Index

Sam Trenholme’s blog

MaraDNS snapshot

July 2, 2026

I have made a 2026-07-02 tag of MaraDNS today. I will go over the post 3.5.0037 changes.

MaraDNS 3.5.0037

MaraDNS 3.5.0037 was a security only update; it fixed an issue with DNS-over-TCP in Deadwood, where a trusted client authorized to perform TCP DNS queries could disable DNS-over-TCP with a denial of service attack. Note that DNS-over-TCP enabled is a configuration Deadwood does not enable by default, and no example dwood3rc files supplied with MaraDNS have DNS-over-TCP enabled.

This was the first update since MaraDNS 3.5.0036, a 2023 security bugfix, where a remote “packet of death” could disable the MaraDNS authoritative server.

Post 3.5.0037

The changes I have made post 3.5.0037 are changes I am making, not because MaraDNS’s code was broken, but because GCC (and to a lesser extent, LLVM) decided to “update” their compilers to throw errors with C code which could previously compile.

Most of the fixes are minor fixes, such as some minor changes to how signal handlers are written. Yes, it only took me an afternoon to update the code, but these are updates I would not have had to make if GCC no longer updated their code. A C compiler should not be a moving target.

Indeed, Joerg Schilling who is no longer with us made a lot of updates to the code which generates ISO images to burn in CD players. I maintain a fork of that code which mainly fixes gross bugs; and I had to do a whole bunch of hacking to get the code to compile again in 2026, again because of GCC’s changes to the compiler.

What I have done is comb through the code and removed all warnings in clang 20 and clang 21, and made sure all of the code can compile in GCC 15 and GCC 16—and without warnings in GCC 16 (at least in Cygwin) to boot. So, right now in 2026, MaraDNS compiles just fine in GCC, and compiles with no warnings, even when -Wall is set, in clang 20.

Compiling to the C99 standard

In addition, to minimize changes to compilers breaking code which compiles without warning here in 2026, I have gone to the effort to compile all of the code with -std=c99 to make sure the compiler conforms to the 1999 C standard (i.e. the version of C which existed when I started writing MaraDNS back in 2001).

Since some files use system calls which are not part of the C99 standard, the current workaround is to, for those files, compile it with the incantation -std=c99 -D_POSIX_C_SOURCE -D_DEFAULT_SOURCE . Today, I have gone through the MaraDNS and Deadwood code, and made sure that the only programs which get the -D_POSIX_C_SOURCE -D_DEFAULT_SOURCE incantation are programs which otherwise do not compile if -std=c99 is set.

Everything now compiles, in Cygwin, in Ubuntu 26.04, and in a recent release of Alpine Linux (I use Alpine because it uses a very different userspace than Ubuntu).

Looking ahead

The next project is to minimize the number of files in the coLunacyDNS sub-tree which are compiled with the -D_POSIX_C_SOURCE -D_DEFAULT_SOURCE incantation.

But that’s for another day.

Go to: Older - Newer - All entries - Index