On 2021-11-19, Fabio Martins <m...@phosphorus.com.br> wrote:
> Sorry if it is a bit off-topic.
>
> After reading an article about rogue CA's:
>
> https://www.theregister.com/2021/11/19/web_trust_certificates/
>
> I wonder if there is any advantage of using certificate pinning in the 
> process of pkg_add / sysupgrade / pkg_* while updating OpenBSD packages.

There doesn't seem a real advantage here.

In terms of checking that files are from a known source, pkg_add checks
signatures with signify (so updates over plain http are OK really).
Also the checks are done with a tight pledge(7) restriction (and
decompressors aren't called until signatures have been checked, they
are also restricted).

In terms of confidentiality, you can figure out a lot from what's
available in the clear even with HTTPS. The IP addresses obviously.
SNI hostnames.  Request/response lengths are visible, and with a
known set of files that anyone can easily fetch like packages
(and known interdepencies) this makes it possible to figure out
what's installed to some level of accuracy (IIRC espie@ did some
research into this).

The article you show talks about maliciously implanted root certs,
typically installed on "managed" systems (corporate environment etc),
or by malware. If something is changing that (/etc/ssl/cert.pem)
without your knowledge you have bigger problems. Changes to that
do show up in daily security mails though if somebody can change
the file they can surely change the script too.

If you really want to, you can do cert pinning. Put the desired ca
certificate into a separate file, see ftp's -T cafile option, and pass
the parameter from pkg_add via the FETCH_CMD variable. But I think it's
not really worthwhile here.

-- 
Please keep replies on the mailing list.

Reply via email to