Skip to content

Fixes #39990 - Backport invocation authorization to 16.6-stable - #1085

Open
Odilhao wants to merge 6 commits into
theforeman:16.6-stablefrom
Odilhao:backport/cve-2026-92904-16.6-stable
Open

Odilhao wants to merge 6 commits into
theforeman:16.6-stablefrom
Odilhao:backport/cve-2026-92904-16.6-stable

Conversation

@Odilhao

@Odilhao Odilhao commented Nov 12, 2026

Copy link
Copy Markdown
Member

Purpose

Backport of #1080 to 16.6-stable for CVE-2026-92904.

Public issue: https://projects.theforeman.org/issues/39990

Carry the original template-invocation authorization series and the author's lint follow-up as three separate commits. Preserve object-level authorization when looking up template/job invocations instead of relying only on possession of a general permission.

Compatibility and scope

Mainline review is still open. All -x trailers reference its actual public commits. No release-specific application adaptation was needed. This backport stays within the supplied mainline series: it does not modify the separate API v2 output/raw_output actions or claim additional coverage for them. Review of that scope remains open; no broader security fix is implied by passing suites.

Testing

Full configured Ruby lint, the plugin Ruby/browser suite, webpack compilation, fresh-database seeds, JavaScript lint and JavaScript tests passed locally for this candidate. The affected template-invocation controller tests passed again in the isolated signed-source smoke run. The publication changes metadata only; every commit tree matches the validated stable candidate. These are local results, not a claim about this PR's GitHub Actions.

Review denied access to invocations outside the caller's authorized scope and retained access to permitted invocations. Reconcile any mainline review changes before merging this backport.

Apply view_job_invocations permission filters when resolving a template
invocation and constrain the lookup to a host targeted by the job.
Prevent the template-invocation endpoint from returning another user's
job details outside the caller's authorized scope.

Fixes #39990 - Fix template invocation authorization

92904

Fixes 2a8a05f

(cherry picked from commit ab82695)
Apply view_job_invocations permission filters when resolving a template
invocation and constrain the lookup to a host targeted by the job.
Prevent the template-invocation endpoint from returning another user's
job details outside the caller's authorized scope.

Refs #39990 - Use database lookup for template invocation

Fixes 2a8a05f

(cherry picked from commit 80b7fdc)
Apply view_job_invocations permission filters when resolving a template
invocation and constrain the lookup to a host targeted by the job.
Prevent the template-invocation endpoint from returning another user's
job details outside the caller's authorized scope.

bundle exec rubocop --auto-correct

(cherry picked from commit b8c4093)
adamruzicka and others added 3 commits November 12, 2026 20:39
Co-authored-by: adamruzicka <7326770+adamruzicka@users.noreply.github.com>

(cherry picked from commit 5248834)
Co-authored-by: adamruzicka <7326770+adamruzicka@users.noreply.github.com>

(cherry picked from commit faa4d40)
@Odilhao

Odilhao commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

CI-only follow-up (no Redmine issue)

The two separate CI commits backport changes already merged on REX master: 5248834f and faa4d402. They switch the reusable Ruby workflow to v1, using its Ubuntu 24.04 default while retaining this branch's Foreman version. This avoids the observed PostgreSQL schema-load incompatibility on the old workflow's Ubuntu 26.04 runner; psql was installed, but PostgreSQL 13 rejected SET transaction_timeout in the generated schema.

These commits change CI configuration only, not application behavior or runtime dependencies. They retain their original upstream subjects, authorship and public cherry-pick provenance. They have no associated Redmine issue; the security issue must not be used as an unrelated CI reference. Consequently, the Redmine formatting check may fail on these two CI commits. Please assess that separately from application/test CI.

Foreman has merged comparable no-issue CI changes with that check failing: #10771, #10881, and the same reusable-workflow upgrade in #11141. This is maintainer-reviewed precedent, not an automated check bypass or a claim that Redmine passes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants