AliasMatch directive does not accept long URI
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Trusty |
Won't Fix
|
Medium
|
Wesley Wiedenmeier |
Bug Description
[Impact]
When accessed long URI location that configured by AliasMatch directive,
Apache failed to allocate memory and process aborted.
It's same that https:/
This fixed in upstream, http://
Can you please backports apache 2.4.10 from vivid or just fix in trusty ?
Thanks.
[Test Case]
Config:
ubuntu@
<VirtualHost *:80>
AliasMatch ^/alias-test/ /var/www/
</VirtualHost>
With old apache:
ubuntu@
<!doctype html>
<html>
<body>
<h1>TEST</h1>
</body>
</html>
ubuntu@
ooooooooooooooo
curl: (52) Empty reply from server
ubuntu@
With new apache:
ubuntu@
<!doctype html>
<html>
<body>
<h1>TEST</h1>
</body>
</html>
ubuntu@
ooooooooooooooo
<!doctype html>
<html>
<body>
<h1>TEST</h1>
</body>
</html>
[Regression Potential]
There should be no regression potential for this patch, as it just removes an incorrect strlen check.
description: | updated |
Changed in apache2 (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: bitesize |
Changed in apache2 (Ubuntu): | |
assignee: | nobody → Wesley Wiedenmeier (wesley-wiedenmeier) |
Changed in apache2 (Ubuntu): | |
status: | Triaged → Fix Released |
description: | updated |
Changed in apache2 (Ubuntu Trusty): | |
importance: | Undecided → Medium |
Here is a debdiff to pull in the patch from upstream. I am testing it right now and should be able to confirm that it resolves the issue shortly.
Since there was no testcase in the description, here is the testcase from the bugzilla.redhat.com bug:
Steps to Reproduce: hello</ html>" > /var/www/ html/index. html html/index. html" > /etc/httpd/ conf.modules. d/02-alias- test.conf
# prepare test file.
echo "<html>
# add config to apache
echo "AliasMatch ^/alias-test/ /var/www/
# (re)start httpd
systemctl restart httpd.service
Actual results: 127.0.0. 1/alias- test/short_ uri 127.0.0. 1/alias- test/short_ uri
# When I request short URI, the response is good as follow:
[takayuki@localhost ~]$ wget -t1 -O - -S -v http://
--2014-07-16 14:04:38-- http://
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Wed, 16 Jul 2014 05:04:38 GMT
Server: Apache/2.4.9 (Fedora)
Last-Modified: Wed, 16 Jul 2014 04:49:10 GMT
ETag: "13-4fe483eb8a9d6"
Accept-Ranges: bytes
Content-Length: 19
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Length: 19 [text/html]
Saving to: 'STDOUT'
0% [ ] 0 --.-K/s <html>hello</html> ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ===>] 19 --.-K/s in 0s
100%[==
2014-07-16 14:04:38 (2.03 MB/s) - written to stdout [19/19]
# When I request log URI, the connection is closed and Apache logged error as follow: 127.0.0. 1/alias- test/very_ loooooooooooooo ooooooooong_ uri 127.0.0. 1/alias- test/very_ loooooooooooooo ooooooooong_ uri
[takayuki@localhost ~]$ wget -t1 -O - -S -v http://
--2014-07-16 14:07:40-- http://
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... No data received.
Giving up.
[root@localhost takayuki]# tail /var/log/ httpd/error_ log
[crit] Memory allocation failed, aborting process.
[Wed Jul 16 14:03:17.231921 2014] [core:notice] [pid 21808] AH00052: child pid 21809 exit signal Aborted (6)
[crit] Memory allocation failed, aborting process.
[Wed Jul 16 14:03:23.239149 2014] [core:notice] [pid 21808] AH00052: child pid 21812 exit signal Aborted (6)
[crit] Memory allocation failed, aborting process.
[Wed Jul 16 14:07:40.487959 2014] [core:notice] [pid 21808] AH00052: child pid 21945 exit signal Aborted (6)