Git development
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Patrick Steinhardt <ps@pks.im>
Cc: "Ron Nazarov" <ron@noisytoot.org>,
	git@vger.kernel.org,
	"Stanislav Malishevskiy" <stanislav.malishevskiy@gmail.com>,
	"Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Stanislav Malishevskiy" <s.malishevskiy@auriga.com>
Subject: Re: [PATCH] config: add http.sslVerifyHost option
Date: Tue, 11 Aug 2026 21:19:05 +0000	[thread overview]
Message-ID: <anuRyMJMyAS9OMNl@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <ansYP7cDvtNWueIz@pks.im>

[-- Attachment #1: Type: text/plain, Size: 3107 bytes --]

On 2026-08-11 at 12:40:31, Patrick Steinhardt wrote:
> On Fri, Aug 07, 2026 at 04:33:14PM +0100, Ron Nazarov wrote:
> > This allows for disabling host verification without completely
> > disabling TLS certificate verification.  This is useful when using TLS
> > in a decentralized way (similar to how one would use SSH), where the
> > remote endpoint has a self-signed certificate that does not
> > necessarily have a valid CN (or any CN at all), and you set
> > http.sslCAInfo to that specific certificate.  Without such an option,
> > it is impossible to use a certificate with a non-matching hostname
> > without completely disabling TLS verification, which is insecure.
> 
> Arguably both options are insecure, this new option just pretends to be
> secure. If we accept arbitrary certificates for an endpoint, then it
> becomes trivial for somebody to perform a man-in-the-middle attack
> against you by simply swapping out the certificate against a self-signed
> one. And man-in-the-middle attacks are basically what we want to protect
> against with TLS.

I agree.

> So sure, using no encryption at all might be even simpler for an
> eavesdropper to intercept. But in both cases they'd have to sit between
> you and the server, and consequently they are very likely to have the
> capability to MITM you.
> 
> There are of course going to be exception to this, like for example when
> you sit on an unsecured wifi network. Other users might be able to read
> your traffic there without also having the ability to modify it. But I'm
> still hesitant to add this new option here as it oversells the security
> benefit it offers over disabling TLS entirely.

No, on an unsecured Wi-Fi network one can use ARP spoofing to send all
the packets on the network to them before they relay them to others, so
they can all be modified.  I've done this in controlled environments and
while the network can appear slow in some cases if you're just using a
plain laptop, it works.

Some Wi-Fi networks have some sort of isolation feature to try to
prevent this but I've read papers that they're easy to bypass.

The assumption you absolutely must make is that anyone who can see your
packets can also modify them.

> Maybe I'm missing something obvious. But if so, I think both the commit
> message and the documentation would need to be amended to document that
> gap and state that yes, this is still insecure.

I just don't think we should accept this option because it leads to a
false sense of security and it's easy to misuse.  Moreover, getting a
reasonable working TLS configuration is extremely easy with ACME and/or
DANE these days, so there's really no reason to need to accommodate
broken self-signed certificates anymore.

I'll note that technically nobody actually uses CN anymore for
certificate verification (and I think Go's TLS library ignores it
entirely) and everyone uses subjectAltName, so it's possible to provide
a reasonably large number of different names for a single host.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 325 bytes --]

      reply	other threads:[~2026-08-11 21:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260807153315.9586-1-ron@noisytoot.org>
2026-08-11 12:40 ` [PATCH] config: add http.sslVerifyHost option Patrick Steinhardt
2026-08-11 21:19   ` brian m. carlson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anuRyMJMyAS9OMNl@fruit.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    --cc=ron@noisytoot.org \
    --cc=s.malishevskiy@auriga.com \
    --cc=stanislav.malishevskiy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox