VYPR
Low severityNVD Advisory· Published Jan 13, 2025· Updated Jan 14, 2025

Process crash during CRL-based revocation check on OS using separate mount point for temp Directory in notation-go

CVE-2024-51491

Description

notion-go is a collection of libraries for supporting sign and verify OCI artifacts. Based on Notary Project specifications. The issue was identified during Quarkslab's security audit on the Certificate Revocation List (CRL) based revocation check feature. After retrieving the CRL, notation-go attempts to update the CRL cache using the os.Rename method. However, this operation may fail due to operating system-specific limitations, particularly when the source and destination paths are on different mount points. This failure could lead to an unexpected program termination. In method crl.(*FileCache).Set, a temporary file is created in the OS dedicated area (like /tmp for, usually, Linux/Unix). The file is written and then it is tried to move it to the dedicated notation cache directory thanks os.Rename. As specified in Go documentation, OS specific restriction may apply. When used with Linux OS, it is relying on rename syscall from the libc and as per the documentation, moving a file to a different mountpoint raises an EXDEV error, interpreted as Cross device link not permitted error. Some Linux distribution, like RedHat use a dedicated filesystem (tmpfs), mounted on a specific mountpoint (usually /tmp) for temporary files. When using such OS, revocation check based on CRL will repeatedly crash notation. As a result the signature verification process is aborted as process crashes. This issue has been addressed in version 1.3.0-rc.2 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

CVE-2024-51491: notation-go fails to handle cross-device rename errors when caching CRLs, causing signature verification to abort on Linux systems with separate /tmp mount points.

Vulnerability

Overview

CVE-2024-51491 affects the notation-go library, which implements the Notary Project specification for signing and verifying OCI artifacts. During Certificate Revocation List (CRL) based revocation checks, the library retrieves a CRL and then caches it using os.Rename to move a temporary file from the operating system's temporary directory (typically /tmp) to the Notation cache directory. However, on Linux systems where /tmp is mounted on a separate filesystem (e.g., a tmpfs), the rename syscall fails with an EXDEV error ("Cross-device link"), as documented in the rename(2) manual page [1]. This error is not handled gracefully, leading to an unexpected program crash [2][4].

Exploitation

Prerequisites

No authentication or special privileges are required to trigger this vulnerability—it occurs during the normal signature verification process. The attack surface is limited to environments where the temporary directory resides on a different mount point than the Notation cache directory, which is a common configuration in Red Hat Enterprise Linux and other distributions that use a dedicated tmpfs for /tmp [2][4]. An attacker can cause denial of service by presenting a signed artifact that triggers a CRL-based revocation check, which then crashes the notation process.

Impact

Successful exploitation results in a denial of service: the signature verification process is aborted, and the notation tool crashes. This prevents users from verifying the authenticity and integrity of OCI artifacts, which can disrupt supply chain security workflows. The vulnerability does not allow arbitrary code execution or information disclosure [2][4].

Mitigation

The issue has been addressed in notation-go version 1.3.0-rc.2. The fix modifies the CRL caching logic to copy the temporary file to the final location instead of using os.Rename, and properly handles errors to prevent a crash [3][4]. Users are advised to upgrade to this version or later. No workarounds are available; affected systems must apply the patch to restore reliable signature verification [2][4].

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/notaryproject/notation-goGo
>= 1.3.0-rc.1, < 1.3.0-rc.21.3.0-rc.2

Affected products

42

Patches

1
3c3302258ad5

fix: OS error when setting CRL cache leads to denial of signature verification

https://github.com/notaryproject/notation-goJunjie GaoOct 23, 2024via ghsa
3 files changed · +17 10
  • internal/file/file.go+9 2 modified
    @@ -119,8 +119,15 @@ func TrimFileExtension(fileName string) string {
     
     // WriteFile writes content to a temporary file and moves it to path.
     // If path already exists and is a file, WriteFile overwrites it.
    -func WriteFile(path string, content []byte) (writeErr error) {
    -	tempFile, err := os.CreateTemp("", tempFileNamePrefix)
    +//
    +// Parameters:
    +//   - tempDir is the directory to create the temporary file. It should be
    +//     in the same mount point as path. If tempDir is empty, the default
    +//     directory for temporary files is used.
    +//   - path is the destination file path.
    +//   - content is the content to write.
    +func WriteFile(tempDir, path string, content []byte) (writeErr error) {
    +	tempFile, err := os.CreateTemp(tempDir, tempFileNamePrefix)
     	if err != nil {
     		return fmt.Errorf("failed to create temp file: %w", err)
     	}
    
  • internal/file/file_test.go+7 7 modified
    @@ -30,7 +30,7 @@ func TestCopyToDir(t *testing.T) {
     		if err := os.MkdirAll(filepath.Dir(filename), 0700); err != nil {
     			t.Fatal(err)
     		}
    -		if err := WriteFile(filename, data); err != nil {
    +		if err := WriteFile(tempDir, filename, data); err != nil {
     			t.Fatal(err)
     		}
     
    @@ -52,7 +52,7 @@ func TestCopyToDir(t *testing.T) {
     		if err := os.MkdirAll(filepath.Dir(filename), 0700); err != nil {
     			t.Fatal(err)
     		}
    -		if err := WriteFile(filename, data); err != nil {
    +		if err := WriteFile(tempDir, filename, data); err != nil {
     			t.Fatal(err)
     		}
     
    @@ -87,7 +87,7 @@ func TestCopyToDir(t *testing.T) {
     		if err := os.MkdirAll(filepath.Dir(filename), 0700); err != nil {
     			t.Fatal(err)
     		}
    -		if err := WriteFile(filename, data); err != nil {
    +		if err := WriteFile(tempDir, filename, data); err != nil {
     			t.Fatal(err)
     		}
     		// forbid reading
    @@ -113,7 +113,7 @@ func TestCopyToDir(t *testing.T) {
     		if err := os.MkdirAll(filepath.Dir(filename), 0700); err != nil {
     			t.Fatal(err)
     		}
    -		if err := WriteFile(filename, data); err != nil {
    +		if err := WriteFile(tempDir, filename, data); err != nil {
     			t.Fatal(err)
     		}
     		// forbid dest directory operation
    @@ -139,7 +139,7 @@ func TestCopyToDir(t *testing.T) {
     		if err := os.MkdirAll(filepath.Dir(filename), 0700); err != nil {
     			t.Fatal(err)
     		}
    -		if err := WriteFile(filename, data); err != nil {
    +		if err := WriteFile(tempDir, filename, data); err != nil {
     			t.Fatal(err)
     		}
     		// forbid writing to destTempDir
    @@ -159,7 +159,7 @@ func TestCopyToDir(t *testing.T) {
     		if err := os.MkdirAll(filepath.Dir(filename), 0700); err != nil {
     			t.Fatal(err)
     		}
    -		if err := WriteFile(filename, data); err != nil {
    +		if err := WriteFile(tempDir, filename, data); err != nil {
     			t.Fatal(err)
     		}
     
    @@ -192,7 +192,7 @@ func TestWriteFile(t *testing.T) {
     		if err != nil {
     			t.Fatal(err)
     		}
    -		err = WriteFile(filepath.Join(tempDir, "testFile"), content)
    +		err = WriteFile(tempDir, filepath.Join(tempDir, "testFile"), content)
     		if err == nil || !strings.Contains(err.Error(), "permission denied") {
     			t.Fatalf("expected permission denied error, but got %s", err)
     		}
    
  • verifier/crl/crl.go+1 1 modified
    @@ -144,7 +144,7 @@ func (c *FileCache) Set(ctx context.Context, url string, bundle *corecrl.Bundle)
     	if err != nil {
     		return fmt.Errorf("failed to store crl bundle in file cache: %w", err)
     	}
    -	if err := file.WriteFile(filepath.Join(c.root, c.fileName(url)), contentBytes); err != nil {
    +	if err := file.WriteFile(c.root, filepath.Join(c.root, c.fileName(url)), contentBytes); err != nil {
     		return fmt.Errorf("failed to store crl bundle in file cache: %w", err)
     	}
     	return nil
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

6

News mentions

0

No linked articles in our index yet.