Advisory

GO-2023-1840

Also known as: BIT-golang-2023-29403, CVE-2023-29403

Summary

Unsafe behavior in setuid/setgid binaries in runtime

Details

On Unix platforms, the Go runtime does not behave differently when a binary is run with the setuid/setgid bits. This can be dangerous in certain cases, such as when dumping memory state, or assuming the status of standard i/o file descriptors.

If a setuid/setgid binary is executed with standard I/O file descriptors closed, opening any files can result in unexpected content being read or written with elevated privileges. Similarly, if a setuid/setgid program is terminated, either via panic or signal, it may leak the contents of its registers.

Severity

Not rated by the source.

Dates

Published
2023-06-08 20:16 UTC
Modified
2026-02-04 03:48 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.19.10, introduced 1.20.0-0, fixed 1.20.5 (semver)

Fixed versions

1.19.10, 1.20.5

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences