Bug 17093 - Missing </VirtualHost> in included file causes segfault
Summary: Missing </VirtualHost> in included file causes segfault
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.0-HEAD
Hardware: Other All
: P3 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
: 23247 (view as bug list)
Depends on:
Reported: 2003-02-15 02:35 UTC by Chris Pepper
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Chris Pepper 2003-02-15 02:35:53 UTC
I have an included vhost.conf file, and when I left off a </VirtualHost> entry near the end, both apachectl and httpd segfaulted, even on "apachectl configtest". This is httpd 2.0.44 (with mod_php) on FreeBSD 4.7-STABLE. Adding the missing </VirtualHost> line cleared the problem. httpd should provide an error message in this situation.

www# apachectl configtest
fatal process exception: page fault, fault VA = 0x18
Segmentation fault (core dumped)

dmesg shows: "pid 227 (httpd), uid 0: exited on signal 11 (core dumped)".

Here's the relevant bit of vhost.conf (Included from httpd.conf).


    ServerAdmin webmaster@reppep.com
#   DocumentRoot /home/httpd/html/
    DocumentRoot /home/amy/www/
    ServerName www.reppep.com:80
    ServerAlias reppep.com www
    CustomLog "|/usr/local/sbin/cronolog /var/log/httpd/reppep-%Y-%m-access_log" combined
    UserDir disabled root
    Redirect permanent /mail https://www.reppep.com/mail/


    ServerAdmin rachel@reppep.com
    DocumentRoot /home/rachel/public_html/
    ServerName www.xanny.net:80
    ServerAlias xanny.net
    CustomLog "|/usr/local/sbin/cronolog /var/log/httpd/xanny-%Y-%m-access_log" combined

    ServerAdmin bjorn@reppep.com
    DocumentRoot /home/bjorn/public_html/
    ServerName www.xoaudio.com:80
    ServerAlias xoaudio.com www.xoxoaudio.com xoxoaudio.com
    CustomLog "|/usr/local/sbin/cronolog /var/log/httpd/xoaudio-%Y-%m-access_log" combined
Comment 1 André Malo 2003-02-15 02:47:48 UTC
ouch. reproduced.
It happens only if it appears in an external file.

will look at it ...
Comment 2 André Malo 2003-02-15 13:03:15 UTC
Well, this was a typical NULL pointer kaboom :)
Fixed in 2.1 and proposed for backport, so it will hopefully go into 2.0.45.

Thanks for you report and thanks for using Apache!
Comment 3 André Malo 2003-02-27 04:11:28 UTC
FYI: The fix will be in the next release (2.0.45).
Comment 4 André Malo 2003-09-18 14:24:18 UTC
*** Bug 23247 has been marked as a duplicate of this bug. ***