Продолжение истории с компрометацией ключей eMudhra (писали 27 и 28 октября). Apple опубликовала документ поддержки, из которого следует неприятная деталь для разработчиков на Mac. Тема была одной из самых обсуждаемых на Hacker News 28 октября.
Что сделала Apple
- 19 октября — заблокировала 12 сертификатов шести TLS-CA (по два на каждый: из цепочки emSign Root TLS CA - G3 и кросс-подписанный Sectigo).
- 23 октября — заблокировала корневой emSign ECC Root CA - G3.
Блокировки приходят через автоматические обновления конфигурации и действуют в Safari, Mail и приложениях на системных фреймворках.
В чём проблема
curl, git, python3, ruby, perl и openssl из macOS и Xcode Command Line Tools проверяют сертификаты по файлу /etc/ssl/cert.pem. Блокировку и проверку отзыва Apple они не применяют, поэтому поддельный сертификат для любого сайта, выпущенный утёкшими ключами, будет для них валиден. Это касается git clone по HTTPS, скриптов на curl и установщиков пакетов. Приложения со своим списком корней от блокировки Apple тоже не защищены — это зона их разработчиков.
Что делать
Apple обещает исправить Command Line Tools в будущем обновлении. До этого администраторы могут вручную убрать emSign ECC Root CA - G3 (и по желанию AAA Certificate Services) из /etc/ssl/cert.pem. Команды стоит брать дословно со страницы Apple: сделать резервную копию, удалить корень, проверить через openssl. Учтите, что часть легитимных сайтов может перестать проверяться, а обновление macOS может вернуть файл в исходное состояние.
This is a follow-up to the eMudhra key compromise (covered on October 27 and 28). Apple has published a support document that reveals an unpleasant detail for developers on Mac. The topic was among the most discussed on Hacker News on October 28.
What Apple did
- October 19: blocked 12 certificates for six TLS CAs (two each: one chaining to emSign Root TLS CA - G3 and one cross-signed by Sectigo).
- October 23: blocked the emSign ECC Root CA - G3 root.
The blocks arrive via automatic configuration updates and apply to Safari, Mail and apps using system frameworks.
The problem
curl, git, python3, ruby, perl and openssl shipped with macOS and the Xcode Command Line Tools validate certificates against /etc/ssl/cert.pem. They don’t apply Apple’s block or revocation checks, so a forged certificate for any site issued with the leaked keys would pass. That covers git clone over HTTPS, curl-based scripts and package installers. Apps with their own root lists aren’t covered by Apple’s block either; that’s up to their developers.
What to do
Apple promises to fix the Command Line Tools in a future update. Until then, admins can manually remove emSign ECC Root CA - G3 (and optionally AAA Certificate Services) from /etc/ssl/cert.pem. Copy the commands verbatim from Apple’s page: back up the file, remove the root, verify with openssl. Note that some legitimate sites may fail to verify, and a macOS update may restore the original file.