Skip to content

curl: disallow NTLM via SPNEGO#193

Merged
dscho merged 3 commits intomainfrom
disallow-ntlm-via-spnego-in-curl
Apr 13, 2026
Merged

curl: disallow NTLM via SPNEGO#193
dscho merged 3 commits intomainfrom
disallow-ntlm-via-spnego-in-curl

Conversation

@dscho
Copy link
Copy Markdown
Member

@dscho dscho commented Apr 13, 2026

Git for Windows recently offered a new security bug release, which essentially disables NTLM by default. This is considered an important measure to heighten the security stance of Git for Windows. However, there is another path which allows NTLM that was not yet covered in Git for Windows: the SPNEGO mechanism that allows downgrading Kerberos to NTLM.

This PR disables NTLM via SPNEGO altogether, in line with what the primary cURL maintainer wants, too.

dscho added 3 commits April 13, 2026 13:50
The patches in this directory are exported via `git format-patch`
from Git commits. Sadly, those Git commits' OIDs are written part of
the `.patch` file contents. Even more sadly, the exact OIDs depend on
the committer as well as the author information. And while the author
information is encoded in the.patch files, the committer information
is obviously not included. That makes those commit OIDs very unstable,
which means that once another person exports them, they differ.

To help with this, I re-imported those patches into a fresh Git
repository in `src/playground/`, after using the `import-tars.perl`
script from Git's `contrib/fast-import/` directory:

  /path/to/import-tars.perl ../curl-8.19.0.tar.bz2

I then ensured that the commit OIDs are stable by forcing the committer
information to match the author information:

  git fast-export --no-data HEAD |
  awk '/^author /{a=$0} /^committer /{$0="committer " substr(a,8)} 1' |
  git fast-import --force --quiet

This way, the next time somebody else needs to extend or modify the
patch set, they can end up with identical commit OIDs.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When users choose Kerberos as authentication method, little do they
know that there's a provision to fall back to the very weak NTLM
authentication instead of using the otherwise quite strong Kerberos
authentication methods. The mechanism to choose e.g. NTLM is called
"SPNEGO".

By somewhat lucky happenstance, a recent security fix that wanted
to disable NTLM in Git for Windows by default was _not_ affected
by this, due to a quite long-standing bug in Git: Kerberos
authentication is simply never attempted by default. Users need
to configure `http.emptyAuth=true` to enable it, even though the
`http.emptyAuth=auto` default promises to behave in the same way.

In preparation for fixing that `http.emptyAuth` bug _without_ weakening
the security bug fix that disables NTLM by default, these two patches
disable NTLM via SPNEGO altogether.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho requested review from mjcheetham and rimrul April 13, 2026 14:07
@dscho dscho self-assigned this Apr 13, 2026
@dscho
Copy link
Copy Markdown
Member Author

dscho commented Apr 13, 2026

/deploy mingw-w64-curl

The i686/x86_64 and the arm64 workflow runs were started.

@dscho
Copy link
Copy Markdown
Member Author

dscho commented Apr 13, 2026

/add relnote bug The recent security bug fix that disables NTLM by default missed the NTLM fallback in the Kerberos protocol. This fallback is now disabled, following the cURL project's guidance.

The workflow run was started

github-actions bot pushed a commit to git-for-windows/build-extra that referenced this pull request Apr 13, 2026
The recent security bug fix that disables NTLM by default missed the
NTLM fallback in the Kerberos protocol. This fallback [is now
disabled](git-for-windows/MINGW-packages#193),
following the cURL project's guidance.

Signed-off-by: gitforwindowshelper[bot] <gitforwindowshelper-bot@users.noreply.github.com>
@dscho dscho merged commit 680d581 into main Apr 13, 2026
5 checks passed
@dscho dscho deleted the disallow-ntlm-via-spnego-in-curl branch April 13, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants