GHSA-gmq2-39ff-f5qg: Github.com/cloudflare/tableflip A Failed Upgrade May Lead Vulnerability

LOW
Published
Advisory Summary

GHSA-gmq2-39ff-f5qg is a LOW a failed upgrade may lead vulnerability (General Security Weakness) affecting Github.com/cloudflare/tableflip libraries in the Go ecosystem. The issue involves a failed upgrade may lead to hung goroutines. Remediation is available by upgrading affected packages to version 1.2.2.

GHSA-gmq2-39ff-f5qg at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-gmq2-39ff-f5qg
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Github.com/cloudflare/tableflip
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-gmq2-39ff-f5qg

To remediate this vulnerability, upgrade all affected Github.com/cloudflare/tableflip dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/cloudflare/tableflip fixed: 1.2.2
Upgrade github.com/cloudflare/tableflip to 1.2.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/cloudflare/tableflip

How to Check if You Are Affected

To determine whether your application is affected by GHSA-gmq2-39ff-f5qg, inspect your project dependencies for Github.com/cloudflare/tableflip:

inspect dependencies for github.com/cloudflare/tableflip

Analyze the terminal output to locate any version of Github.com/cloudflare/tableflip in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Github.com/cloudflare/tableflip, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Processes using tableflip may encounter hung goroutines in the parent process, after a failed upgrade. The Go runtime has annoying behaviour around setting and clearing O_NONBLOCK: exec.Cmd.Start() ends up calling os.File.Fd() for any file in exec.Cmd.ExtraFiles. os.File.Fd() disables both the use of the runtime poller for the file and clears O_NONBLOCK from the underlying open file descriptor. This can lead to goroutines hanging in a parent process, after at least one failed upgrade. The bug manifests in goroutines which rely on either a deadline or interruption via Close() to be unblocked being stuck in read or accept like syscalls. As far as I can tell we've not experienced this problem in production, so it's most likely quite rare. ### Patches The problem has been fixed in v1.2.2. ### Workarounds None. ### References * https://github.com/cloudflare/tableflip/commit/cae714b289e199db5da5f08af861ea65be6232c0

GHSA-gmq2-39ff-f5qg Affected Github.com/cloudflare/tableflip Versions

1 component(s)
Fixed Versions:
1.2.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cloudflare/tableflip
Go
< 1.2.2
1.2.2

References

Frequently Asked Questions

What is GHSA-gmq2-39ff-f5qg?
GHSA-gmq2-39ff-f5qg is a security vulnerability in Github.com/cloudflare/tableflip involving A failed upgrade may lead to hung goroutines under General Security Weakness.
Which Github.com/cloudflare/tableflip versions are affected?
Affected versions include releases prior to 1.2.2 across affected packages: github.com/cloudflare/tableflip.
What version fixes GHSA-gmq2-39ff-f5qg?
Upgrading to 1.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cloudflare/tableflip affected?
Yes, github.com/cloudflare/tableflip is affected in releases prior to 1.2.2. Upgrade your dependency to 1.2.2 or later.
What CWE is associated with GHSA-gmq2-39ff-f5qg?
GHSA-gmq2-39ff-f5qg is classified under General Security Weakness.
How can I check Go dependencies for GHSA-gmq2-39ff-f5qg?
Run the dependency tree command: 'inspect dependencies for github.com/cloudflare/tableflip'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gmq2-39ff-f5qg",
  "modified" : "2021-05-21T14:40:36Z",
  "published" : "2021-05-21T16:25:48Z",
  "aliases" : [ ],
  "summary" : "A failed upgrade may lead to hung goroutines",
  "details" : "### Impact\nProcesses using tableflip may encounter hung goroutines in the parent process, after a failed upgrade.\n\nThe Go runtime has annoying behaviour around setting and clearing\nO_NONBLOCK: exec.Cmd.Start() ends up calling os.File.Fd() for any\nfile in exec.Cmd.ExtraFiles. os.File.Fd() disables both the use\nof the runtime poller for the file and clears O_NONBLOCK from\nthe underlying open file descriptor.\n\nThis can lead to goroutines hanging in a parent process, after at least\none failed upgrade. The bug manifests in goroutines which rely on\neither a deadline or interruption via Close() to be unblocked being stuck\nin read or accept like syscalls. As far as I can tell we've not experienced\nthis problem in production, so it's most likely quite rare.\n\n### Patches\nThe problem has been fixed in v1.2.2.\n\n### Workarounds\nNone.\n\n### References\n* https://github.com/cloudflare/tableflip/commit/cae714b289e199db5da5f08af861ea65be6232c0",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cloudflare/tableflip"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 1.2.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/tableflip/security/advisories/GHSA-gmq2-39ff-f5qg"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/tableflip/commit/cae714b289e199db5da5f08af861ea65be6232c0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-21T14:40:36Z",
    "nvd_published_at" : null
  }
}