#912277 apache2: SSLCertificateChainFile silently ignored, causing AH01903 startup failure

Package:
apache2
Source:
apache2
Description:
Apache HTTP Server
Submitter:
Thorsten Glaser
Date:
2021-12-14 09:03:17 UTC
Severity:
important
#912277#5
Date:
2018-10-29 19:31:54 UTC
From:
To:
After a recent upgrade, apache2 does not start any more:

tglase@tglase:~ $ cat /var/log/apache2/error.log
[Mon Oct 29 20:18:58.090841 2018] [ssl:emerg] [pid 17306] AH01903: Failed to configure CA certificate chain!
[Mon Oct 29 20:18:58.090919 2018] [ssl:emerg] [pid 17306] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
AH00016: Configuration Failed

The certificate itself and the chain are ok, though:

tglase@tglase:~ $ openssl verify -CApath /etc/ssl/certs -show_chain -purpose sslserver -verify_hostname tglase.lan.tarent.de -untrusted /etc/ssl/W_lan_tarent_de.ca /etc/ssl/W_lan_tarent_de.cer
/etc/ssl/W_lan_tarent_de.cer: OK
Chain:
depth=0: CN = *.lan.tarent.de (untrusted)
depth=1: C = US, O = DigiCert Inc, OU = www.digicert.com, CN = RapidSSL TLS RSA CA G1 (untrusted)
depth=2: C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root G2

Postfix, on the same system, using the same certificates…
smtpd_tls_cert_file = /etc/ssl/W_lan_tarent_de.cer
smtpd_tls_key_file = /etc/ssl/private/W_lan_tarent_de.key
smtpd_tls_CAfile = /etc/ssl/W_lan_tarent_de.ca
… runs fine, so this must be some regression in Apache2.

#912277#10
Date:
2018-11-03 12:24:05 UTC
From:
To:
Have you looked into  /var/log/apache2/error.log if there is more information?
If there is none, try adding loglevel ssl:debug and re-try.

#912277#15
Date:
2018-11-04 17:14:04 UTC
From:
To:
Hi Stefan,

the thing you quoted was exactly what was in /var/log/apache2/error.log
as the “cat” showed…

I just hit this on another machine, it’s the 2.4.35-1 → 2.4.37-1 upgrade
that caused the failure.

OK, thanks for the debugging help.

That gives:

[Sun Nov 04 17:05:02.839408 2018] [ssl:info] [pid 18196] AH01887: Init: Initializing (virtual) servers for SSL
[Sun Nov 04 17:05:02.839427 2018] [ssl:info] [pid 18196] AH01914: Configuring server ci-busyapps.lan.tarent.de:443 for SSL protocol
[Sun Nov 04 17:05:02.839433 2018] [ssl:debug] [pid 18196] ssl_engine_init.c(1748): AH10083: Init: (ci-busyapps.lan.tarent.de:443) mod_md support is unavailable.
[Sun Nov 04 17:05:02.839729 2018] [ssl:emerg] [pid 18196] AH01903: Failed to configure CA certificate chain!
[Sun Nov 04 17:05:02.839739 2018] [ssl:emerg] [pid 18196] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
AH00016: Configuration Failed

So perhaps the mod_ssl backport / new feature was bad?

On a hunch, I tried a2enmod md, but that does not change much:

[Sun Nov 04 17:05:47.417353 2018] [ssl:info] [pid 18229] AH01887: Init: Initializing (virtual) servers for SSL
[Sun Nov 04 17:05:47.417371 2018] [ssl:info] [pid 18229] AH01914: Configuring server ci-busyapps.lan.tarent.de:443 for SSL protocol
[Sun Nov 04 17:05:47.417377 2018] [ssl:debug] [pid 18229] ssl_engine_init.c(1748): AH10083: Init: (ci-busyapps.lan.tarent.de:443) mod_md support is available.
[Sun Nov 04 17:05:47.417663 2018] [ssl:emerg] [pid 18229] AH01903: Failed to configure CA certificate chain!
[Sun Nov 04 17:05:47.417673 2018] [ssl:emerg] [pid 18229] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
AH00016: Configuration Failed


More debugging data points: this did not occur immediately after
the package upgrade, only when I did an /etc/init.d/apache2 stop
followed by start.

Worse, this persists after downgrading apache2, apache2-bin,
apache2-data, apache2-utils to 2.4.35-1 (?!?!?!).

Dazed and confused,
//mirabilos

#912277#20
Date:
2018-11-04 17:24:52 UTC
From:
To:
Dixi quod…

Given that I originally reported this against 2.4.35-1 and that…

… this is obviously nonsense.

2.4.33-3+b1 is the oldest version I can downgrade to, and it
also exhibits the problem. WTF.

We did switch certificates recently, but OpenSSL accepts them…

Still puzzled,
//mirabilos

#912277#25
Date:
2018-11-04 17:36:19 UTC
From:
To:
retitle 912277 apache2: SSLCertificateChainFile silently ignored, causing AH01903 startup failure
thanks

This is a real WTF. I found https://serverfault.com/a/892300/189656
and thought “hey, Apache 2 still documents SSLCertificateChainFile,
plus it’s the proper way to specify the chain given it’s normally
separate from the certificates, and there’s no warning message about
that directive, but let’s give it a shot”.

So I did:

# cat /etc/ssl/W_lan_tarent_de.cer /etc/ssl/W_lan_tarent_de.ca >/etc/ssl/combined-cer-chain.pem

Then I edited /etc/apache2/sites-enabled/default-ssl.conf, commenting
out SSLCertificateFile and SSLCertificateChainFile, and adding

	SSLCertificateFile /etc/ssl/combined-cer-chain.pem

tglase@tglase:~ $ sudo cleanenv / /etc/init.d/apache2 stop
Stopping Apache httpd web server: apache2.
Server was not running ... (warning).
tglase@tglase:~ $ sudo cleanenv / /etc/init.d/apache2 start
Starting Apache httpd web server: apache2 ..

.oO(wait, what?)

tglase@tglase:~ $ curl --head https://$(hostname -f)/
HTTP/1.1 200 OK
Date: Sun, 04 Nov 2018 17:34:29 GMT
Server: Apache/2.4.35 (Debian)
Content-Type: text/html;charset=UTF-8

.oO(what now?)

So it turns out that, ever since some upgrade, the directive
SSLCertificateChainFile is *silently* ignored, but this only
becomes apparent when you stop+start instead of restart (so
they are *still* not equivalent ☹).

I don’t think this acceptable. Ideally, the option would be
still supported; it does no harm and has worked for decades.

If that’s not desired, it MUST yield a warning.

bye,
//mirabilos

#912277#32
Date:
2018-11-04 18:11:50 UTC
From:
To:
SSLCertificateChainFile still does something, it's not a no-op in the source.
Maybe you are hitting https://bz.apache.org/bugzilla/show_bug.cgi?id=62880 .
That would  cause non-deterministic behavior (depending on what went on before
the SSLCertificateChainFile is encountered).  If you have time, you could try
the patch attached to that bug. Right now, I don't have time to prepare test
packages.

Cheers,
Stefan

#912277#37
Date:
2020-05-10 08:36:10 UTC
From:
To:
Good day,

My associate from China wants to discuss a business investment deal with
you. I awaiting your response to enable us discuss about this business
investment

Nael M. Al Homoud
Executive Director & High Investment Committee Member@
The Arab Investment Co
www.taic.com [1]



Links:
------
[1] http://www.taic.com

#912277#42
Date:
2021-09-24 07:35:21 UTC
From:
To:
Dzień dobry,

kontaktuję się z Państwem, ponieważ dostrzegam możliwość redukcji opłat za prąd.

Odpowiednio dobrana instalacja fotowoltaiczna to rozwiązanie, które pozwala wygenerować spore oszczędności w skali roku.

Chciałbym porozmawiać z Państwem o tego typu rozwiązaniu, a także przedstawić wstępne kalkulacje.

Czy są Państwo zainteresowani?

Pozdrawiam,
Dorian Kwiatkowski

#912277#47
Date:
2021-10-13 07:45:55 UTC
From:
To:
Dzień dobry,

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google.

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę?


Pozdrawiam serdecznie,
Patryk Górecki

#912277#52
Date:
2021-10-20 07:30:24 UTC
From:
To:
Dzień dobry,

jakiś czas temu zgłosiła się do nas firma, której strona internetowa nie pozycjonowała się wysoko w wyszukiwarce Google.

Na podstawie wykonanego przez nas audytu SEO zoptymalizowaliśmy treści na stronie pod kątem wcześniej opracowanych słów kluczowych. Nasz wewnętrzny system codziennie analizuje prawidłowe działanie witryny.  Dzięki indywidualnej strategii, firma zdobywa coraz więcej Klientów.

Czy chcieliby Państwo zwiększyć liczbę osób odwiedzających stronę internetową firmy? Mógłbym przedstawić ofertę?


Pozdrawiam serdecznie,
Patryk Górecki

#912277#57
Date:
2021-11-16 08:35:26 UTC
From:
To:
Dzień dobry!

Czy mógłbym przedstawić rozwiązanie, które umożliwia monitoring każdego auta w czasie rzeczywistym w tym jego pozycję, zużycie paliwa i przebieg?

Dodatkowo nasze narzędzie minimalizuje koszty utrzymania samochodów, skraca czas przejazdów, a także tworzenie planu tras czy dostaw.

Z naszej wiedzy i doświadczenia korzysta już ponad 49 tys. Klientów. Monitorujemy 809 000 pojazdów na całym świecie, co jest naszą najlepszą wizytówką.

Bardzo proszę o e-maila zwrotnego, jeśli moglibyśmy wspólnie omówić potencjał wykorzystania takiego rozwiązania w Państwa firmie.


Z poważaniem,
Dawid Rowicki

#912277#62
Date:
2021-12-14 08:35:42 UTC
From:
To:
Dzień dobry,

kontaktuje się z Państwem, ponieważ jako osoba zajmująca się usprawnieniem procesów, chciałbym zaprezentować nowoczesne rozwiązanie dla Państwa firmy.

System został stworzony z myślą o przedsiębiorstwach z sektora MŚP, aby zapewnić bezpieczeństwo danych, niezawodność i optymalizację procesów. Dzięki bogatym funkcjonalnościom usprawnia i przyspiesza obsługę zleceń.

Jeśli chcieliby Państwo zwiększyć tempo rozwoju swojej działalności i poszerzyć rynek zbytu chętnie opowiem więcej. Kiedy mogę się skontaktować?


Pozdrawiam,
Arkadiusz Stryj

#912277#67
Date:
2021-12-14 08:50:24 UTC
From:
To:
Dzień dobry,

zapoznałem się z Państwa ofertą i z przyjemnością przyznaję, że przyciąga uwagę i zachęca do dalszych rozmów.

Pomyślałem, że może mógłbym mieć swój wkład w Państwa rozwój i pomóc dotrzeć z tą ofertą do większego grona odbiorców. Pozycjonuję strony www, dzięki czemu generują świetny ruch w sieci.

Możemy porozmawiać w najbliższym czasie?


Pozdrawiam
Adam Furgalski