Skip to content

Notice: .NET 5 NuGet Restore Failures on Linux distributions using NSS or ca-certificates #56

@JonDouglas

Description

@JonDouglas

Context

Users of .NET 5.0+ will receive error messages when running dotnet restore on Linux distros that include nss or ca-certificates packages.

Example:

error NU3028: Package 'System.Memory 4.5.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain

error NU3037: Package 'System.Memory 4.5.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.

error NU3028: Package 'System.Memory 4.5.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain

The root cause is due to the certificate used for signed NuGet packages recently expiring and as a result the validation for packages uses a timestamp provider chain that has a root certificate that has been removed by Network Security Services (NSS) which is a popular alternative to OpenSSL.

For more information, please read the Distrust of Symantec TLS Certificates, and Symantec Issues.

Affected Environments

.NET 5.0+ SDK on Linux distros that use nss 3.63+.

At this time, we are not sure of every distro that may be affected. If you're aware of an affected distro, please let us know in a comment on NuGet/Home#10712

Below is a table that includes .NET support for Linux distros:

Linux

OS Version Affected Package Link
Alpine Linux N/A https://gitlab.alpinelinux.org/alpine/ca-certificates/-/issues/1
CentOS N/A
Debian N/A https://packages.debian.org/buster/ca-certificates
Fedora N/A https://bodhi.fedoraproject.org/updates/?packages=nss
Linux Mint 21+ Yes See Ubuntu
openSUSE N/A openSUSE/ca-certificates#10
Red Hat Enterprise Linux N/A
SUSE Enterprise Linux (SLES) N/A openSUSE/ca-certificates#10
Ubuntu 21.04+(Hirsute) Yes https://launchpad.net/ubuntu/hirsute/+package/ca-certificates

Additionally, here is a table of other Linux variants that may be affected but are not officially supported by .NET.

OS Version Affected
Arch Linux 20210328+ Yes (Issue)
Artix Linux 20201128+ Yes (Issue)

Other Linux distros

  • At the time of writing, we believe other distributions will not be affected until a distribution is updated to include nss 3.63+.

Solution

Due to existing known issues with the .NET 5 signing verification feature & fallback of timestamp verification, we have decided to revoke this feature for Unix-based systems within .NET 5+ SDK. Therefore your experience of using dotnet restore will remain largely the same as it was in .NET Core 3.1.

New .NET builds will be provided with NuGet package verification disabled on Linux and macOS. The following releases are ones you'll want to keep an eye on:

Please install these builds if you use .NET 5 or .NET 6 on Linux.

New container images will be published for Alpine, Debian, and Ubuntu on both of these dates for the respective releases.

Stay updated

We recently blogged about this incident on the NuGet blog.

  • We are continuing to investigate this issue and will let you know more as we find out.
  • We will also continue posting updates on NuGet Status and @NuGet on Twitter.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions