mod_md: Segmentation fault after modifying ManagedDomain

After removing the first hostname from the ManagedDomain directive, Apache fails to start resulting in a SEGFAULT.

# grep ManagedDomain /usr/local/etc/apache24/httpd.conf
ManagedDomain site1.example.org site2.sample.org site3.example.net
# a2md -d /usr/local/md list
md: site1.example.org [site1.example.org site2.sample.org site3.example.net]

Modified, remove site1

# grep ManagedDomain /usr/local/etc/apache24/httpd.conf
ManagedDomain site2.sample.org site3.example.net
# a2md -d /usr/local/md list
md: site1.example.org [site1.example.org site2.sample.org site3.example.net]

Starting -e DEBUG -x results in

[Sat Dec 02 09:44:26.576161 2017] [so:debug] [pid 61051:tid 34397577216] mod_so.c(266): AH01575: loaded module md_module from /usr/local/libexec/apache24/mod_md.so
[Sat Dec 02 09:44:26.581332 2017] [ssl:info] [pid 61051:tid 34397577216] AH01883: Init: Initialized OpenSSL library
Segmentation fault (core dumped)

Adding site1.example.org back to the ManagedDomain, apache starts without problems again. After deleting the old and adding the new hostnames, the server starts OK again.

#a2md -d /usr/local/md store remove site1.example.org
#a2md -d /usr/local/md store add site2.sample.org site3.example.net
# a2md -d /usr/local/md list
md: site2.example.org [site2.sample.org site3.example.net]

Removal of the (first) hostname being the name of the ManagedDomain seems to trigger this behavior. “Adds a new managed domain. Must not overlap with existing domains.” seems like the trigger for the failure as there is overlap between the ‘old’ and the ‘new’ name

FreeBSD 11.1-p1 amd64 Apache 2.4.29 mod_md 1.0.6

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Great to hear that you enjoy it! 😄