Advisory

GO-2022-1008

Also known as: CVE-2022-2990, GHSA-fjm8-m7m6-2fjp

Summary

Unauthorized file access in github.com/containers/buildah

Details

SGID programs executed in a container can access files that have negative group permissions for the user's primary group.

Consider a file which is owned by user u1 and group g1, permits user and other read access, and does NOT permit group read access. This file is readable by u1 and all other users except for ones in group g1.

A program with the set-group-ID (SGID) bit set assumes the primary group of the program's group when it executes.

A user with the primary group g1 who executes an SGID program owned by group g2 should not be able to access the file described above. While the program executes with the primary group g2, the group g1 should remain in its supplementary groups, blocking access to the file.

Buildah does not correctly add g1 to the supplementary groups in this scenario, permitting unauthorized access.

Severity

Not rated by the source.

Dates

Published
2022-09-21 15:06 UTC
Modified
2026-02-04 03:25 UTC

Affected packages and fixes

github.com/containers/buildah

Go · All systems

Affected

  • introduced 0, fixed 1.27.1 (semver)

Fixed versions

1.27.1

Fix

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