GO-2022-0289

Source
https://pkg.go.dev/vuln/GO-2022-0289
Import Source
https://vuln.go.dev/ID/GO-2022-0289.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2022-0289
Aliases
Published
2022-05-18T18:23:23Z
Modified
2024-05-20T16:03:47Z
Summary
Misdirected I/O in syscall
Details

When a Go program running on a Unix system is out of file descriptors and calls syscall.ForkExec (including indirectly by using the os/exec package), syscall.ForkExec can close file descriptor 0 as it fails. If this happens (or can be provoked) repeatedly, it can result in misdirected I/O such as writing network traffic intended for one connection to a different connection, or content intended for one file to a different one.

For users who cannot immediately update to the new release, the bug can be mitigated by raising the per-process file descriptor limit.

References
Credits
    • Tomasz Maczukin
    • Kamil Trzciński of GitLab

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.16.12
Introduced
1.17.0-0
Fixed
1.17.5

Ecosystem specific

{
    "imports": [
        {
            "path": "syscall",
            "symbols": [
                "ForkExec"
            ]
        }
    ]
}