Skip to content

fix: PostgreSQL 18.6 with su-exec to clear Marketplace CVEs - #2

Merged
Kim-YeongHyeon merged 1 commit into
release/v18.6from
fix/su-exec-18.6
Oct 13, 2026
Merged

Kim-YeongHyeon merged 1 commit into
release/v18.6from
fix/su-exec-18.6

Conversation

@Kim-YeongHyeon

Copy link
Copy Markdown

문제

GCP Marketplace(envector-sm)가 게시된 postgres 이미지에서 취약점을 통보했습니다(CVE-2026-10536, 11564, 11856, 18924, 19931 등). 이 이미지는 이 fork의 release/v18.4로 빌드한 PostgreSQL 18.4입니다. 2026-10-13의 grype DB로 AR postgres:1.5.0을 다시 스캔하니 HIGH/CRITICAL이 78건이었습니다.

패키지 버전 고쳐진 버전
libcurl (메일의 CVE 5건 포함) 8.19.0-r0 8.22.0-r0
libcrypto3, libssl3 3.5.7-r0 3.5.8-r0
postgresql 18.4 18.5
c-ares, zlib, libuuid — 각 alpine 패키지

원인

  • alpine 패키지 지적은 2026-07-08 빌드 이후에 수정 버전이 나온 것입니다.
  • PostgreSQL 자체 지적은 18.5에서 고쳐졌습니다. 그래서 alpine 패키지만 갱신해서는 사라지지 않습니다.

채택한 해결 방안

  • release/v18.6은 upstream docker-library/postgres의 "Update 18 to 18.6" 커밋(e00e1bd3)입니다.
  • 이 PR은 그 위에 18.3, 18.4와 같은 gosu → su-exec 패치(fix: replace gosu with su-exec (CVE-2025-68121) #1)를 그대로 cherry-pick합니다.

release/v18.4와 비교하면 18/alpine3.23/Dockerfile은 PostgreSQL 18.6과 그 sha256, upstream이 바꾼 LLVM 19 → 21만 다릅니다.

선택 이유

  • 18.6을 고른 이유: upstream docker-library의 PostgreSQL 18 최신 버전입니다. 18.4 → 18.6은 같은 메이저 버전 안에서 올리는 것이라, 기존 데이터 디렉터리를 그대로 씁니다.
  • 같은 방식을 따른 이유: 지금까지의 release 브랜치와 같은 방식(upstream 커밋 + su-exec 패치)을 따랐습니다.

검증 방법

  • 실행한 것: 패치가 충돌 없이 적용되었습니다. 18/alpine3.23/Dockerfile에 gosu 다운로드가 없고 su-exec를 쓰는 것을 확인했습니다.
  • 진행 중: amd64와 arm64 이미지 빌드와 grype 스캔. 결과는 이 PR에 적겠습니다.

관련 문서

* fix: replace gosu with su-exec to eliminate Go stdlib CVE

gosu 1.19 is built with Go 1.24.6 which contains CVE-2025-68121
(fixed in 1.24.13). No newer gosu release available.

su-exec is a minimal C alternative available in Alpine packages,
providing the same CLI interface. Symlink gosu -> su-exec maintains
compatibility with docker-entrypoint.sh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: disable upstream CI, add SBOM workflow

- Disable ci.yml and verify-templating.yml (upstream CI, not needed)
- Add sbom.yml: build image, generate CycloneDX SBOM (Syft),
  scan vulnerabilities (Grype), upload artifact

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Kim-YeongHyeon Kim-YeongHyeon self-assigned this Oct 13, 2026
@Kim-YeongHyeon
Kim-YeongHyeon marked this pull request as ready for review October 13, 2026 09:03
@Kim-YeongHyeon
Kim-YeongHyeon merged commit ca41220 into release/v18.6 Oct 13, 2026
@Kim-YeongHyeon
Kim-YeongHyeon deleted the fix/su-exec-18.6 branch October 13, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants