Bug 32487

Summary: Secure Connection Failed
Product: Sisyphus Reporter: Andrew Kornilov <hiddenman>
Component: firefoxAssignee: Alexey Gladkov <legion>
Status: CLOSED WONTFIX QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: aen, cas, glebfm, lakostis, legion, mike, rauty, rider, sbolshakov
Version: unstable   
Hardware: all   
OS: Linux   
URL: https://bugzilla.redhat.com/show_bug.cgi?id=1377646

Description Andrew Kornilov 2016-09-09 16:26:31 MSK
Приветствую.

На Firefox48.0.1 появилась странная проблема. Её нет больше нигде на данной версии FF, ни в Debian, ни в Ubuntu, ни в Windows.

При попытке соединения с некоторыми сайтами с самоподписанным сертификатом выдает ошибку:

Secure Connection Failed

An error occurred during a connection to xxx.xxx.ru. A PKCS #11 module returned CKR_DEVICE_ERROR, indicating that a problem has occurred with the token or slot. Error code: SEC_ERROR_PKCS11_DEVICE_ERROR

    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.


У всех пользователей, кто использует P8 и FF48 из него, такая ошибка.  Гугл молчит.


Еще недавно на этом же FF было невозможно открыть сайты гугла, такая ошибка была у многих в сети, потом сама собой пропала каким-то образом.

Что это может быть, почему это проявляется только у нас?
Comment 1 Andrey Cherepanov 2016-09-09 17:57:23 MSK
На Sisyphus.
Comment 2 Andrey Cherepanov 2016-09-09 18:06:20 MSK
У меня не воспроизводится. Надо проверять, нет ли каких pkcs11-плагинов.
Comment 3 Andrew Kornilov 2016-09-10 01:10:02 MSK
Стоят pam_pkcs11-0.6.8-alt1.git20140828
libpkcs11-helper-1.12.0-alt2.git20140427

Вот тут у нас можно проверить, не открывается эта страница:
https://api.telecom13.ru/v2/user_auth
Comment 4 Anton Farygin 2016-09-10 10:55:01 MSK
https://api.telecom13.ru/v2/user_auth не открывается - Sisyphus, firefox-48.0.2-alt1 

Из pkcs в системе только libpkcs11-helper-1.12.0-alt2.git20140427

Сообщение выглядит так:
Secure Connection Failed

An error occurred during a connection to api.telecom13.ru. A PKCS #11 module returned CKR_DEVICE_ERROR, indicating that a problem has occurred with the token or slot. Error code: SEC_ERROR_PKCS11_DEVICE_ERROR

    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.
Comment 5 Alexey Gladkov 2016-09-11 19:13:13 MSK
Я всё ещё разбираюсь, но сломано не только у нас. Fedora также не хочет идти на этот сайт с SSL3.
Comment 6 Alexey Gladkov 2016-09-12 11:27:23 MSK
В Ubuntu действительно работает, но:
```
firefox 48.0+build2-0ubuntu0.16.04.1

$ dpkg -l | grep nss3
ii libnss3:amd64 2:3.23-0ubuntu0.16.04.1 amd64 Network Security Service libraries
ii libnss3-1d:amd64 2:3.23-0ubuntu0.16.04.1 amd64 Network Security Service libraries - transitional package
ii libnss3-nssdb 2:3.23-0ubuntu0.16.04.1 all Network Security Security libraries - shared databases
```

У них старый nss.
Comment 7 Andrew Kornilov 2016-09-19 23:43:05 MSK
Не удалось найти, в чем дело?
Comment 8 Alexey Gladkov 2016-09-21 12:20:46 MSK
Вышла новая версия firefox и теперь она тоже сломана.

http://releases.mozilla.org/pub/firefox/releases/49.0/linux-x86_64/ru/firefox-49.0.tar.bz2
Comment 9 Andrew Kornilov 2016-09-21 12:22:03 MSK
(In reply to comment #8)
> Вышла новая версия firefox и теперь она тоже сломана.
> 
> http://releases.mozilla.org/pub/firefox/releases/49.0/linux-x86_64/ru/firefox-49.0.tar.bz2

Сломана у нас с новым nss или у всех с любым nss?
Comment 10 Alexey Gladkov 2016-09-21 12:39:34 MSK
(In reply to comment #9)
> Сломана у нас с новым nss или у всех с любым nss?

Проблема в NSS. Это апстримная проблема. По результатам моего расследования складывается впечатление, что на каких-то сайтах (вероятно, только на сайтах с слабым SSL [0]) включается FIPS, хотя его нет на машине.

Всё, что использует NSS определённым образом будет сломано т.е. оно уже сломалось у нас, в Fedora и думаю скоро сломается в Debian/Ubuntu. В Fedora сейчас также сломан curl т.к. он тоже использует NSS.

[0] https://www.ssllabs.com/ssltest/analyze.html?d=api.telecom13.ru
Comment 11 Andrew Kornilov 2016-09-27 13:22:43 MSK
Приветствую.

Мы перенесли SSL на nginx и там оно заработало в FF почему-то.
Но проблема остается, теперь URL такой, там оставили старое: https://api.telecom13.ru:8443/v2/user_auth

Просьба в апстримном баге тоже комментарий добавить.
Comment 12 Alexey Gladkov 2018-03-19 14:11:01 MSK
https://bugzilla.redhat.com/show_bug.cgi?id=1377646#c19

I've checked the first 2 connections in the packet dump, in both cases the signature created by server is invalid - the hashes don't match the data exchanged.

So it's the server that is buggy, not the client.