Skip to content

Merge v3007.18 security release into 3007.x - #71006

Open
dwoz wants to merge 20 commits into
3007.xfrom
3007.18-patch
Open

dwoz wants to merge 20 commits into
3007.xfrom
3007.18-patch

Conversation

@dwoz

@dwoz dwoz commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Merges the v3007.18 CVE/security release content into the 3007.x mainline.

Note: 3007.17 was the Capstone release — the planned end of the 3007 STS line. 3007.18 is a one-time security courtesy so 3007 users can receive these fixes. No further 3007 releases are planned; users should move to 3006 LTS or 3008 LTS.

CVEs addressed (22 total)

CVE-2026-41865, CVE-2026-41866, CVE-2026-41867, CVE-2026-41868,
CVE-2026-47796, CVE-2026-47797, CVE-2026-47798, CVE-2026-47799,
CVE-2026-47804, CVE-2026-47805, CVE-2026-47806, CVE-2026-47808,
CVE-2026-47810, CVE-2026-47811, CVE-2026-47815, CVE-2026-47817,
CVE-2026-47820, CVE-2026-47824, CVE-2026-47854, CVE-2026-47855,
CVE-2026-59325, CVE-2026-59384

Test plan

  • Full release pipeline passed on saltstack/salt @ v3007.18
  • All 22 CVE regression tests passed on the patch branch
  • Signed artifacts published to packages.broadcom.com and PyPI

dwoz and others added 11 commits November 24, 2026 04:43
* Reject unauthenticated control-plane events on TCP IPC (CVE-2026-47855)

On Windows the minion uses TCP loopback (127.0.0.1:4511) for its local
event pull socket, which any local process can connect to.  An
unprivileged user could inject manage_schedule events to add and execute
scheduled jobs running as the minion service account (typically
LocalSystem), achieving local privilege escalation.

Generate a random per-startup write token when ipc_mode is "tcp" and
store it in opts.  SaltEvent.fire_event() automatically embeds the token
in event data so all internally-fired events carry it.  handle_event()
rejects manage_schedule, manage_beacons, and module_refresh events that
arrive without the correct token, preventing external injection while
leaving legitimate internal event dispatch unaffected.

* Add changelog for CVE-2026-47855 (#69524)

* Fix test bugs and share ipc_write_token with salt-call on Windows

Three test bugs introduced with the CVE fix:
- Remove patch of non-existent Minion._connect_master
- Replace SaltEvent.pack() (never implemented) with salt.payload.dumps()
  in both _make_package helper and test_protected_event_rejected_without_token

Production fix for Windows: salt-call runs as a separate process and never
has ipc_write_token in its opts, so its manage_beacons/manage_schedule events
were dropped by the token check, causing beacons.reset and schedule.job_status
to hang until timeout. Fix: write the token to sock_dir/ipc_write_token (mode
0600) at minion startup; event.py lazily reads it from disk when ipc_mode is
tcp and the token is absent from opts.

Also fix a pre-existing latent crash in beacons.reset: the timeout branch
checked `if ret is not None` (always True) then accessed event_ret["comment"]
(crashes when event_ret is None after timeout). Fix: check event_ret instead.

* Fix test assertion for CVE-2026-47855 token rejection

gen.Return is caught internally by Tornado and never propagates to
callers, so the except-based "dropped" check never fired. Switch to
asserting manage_schedule was not called, matching the pattern used
in the acceptance test.

* Fix CVE-2026-47855: don't regenerate IPC token in worker processes

On Windows (spawn), the minion daemon passes its opts (including
ipc_write_token) to each worker process via Minion._invoke_execution.
The worker then calls cls(opts, load_grains=False) in Minion._target,
which triggered Minion.__init__ and unconditionally regenerated a fresh
token — overwriting both opts["ipc_write_token"] and the shared
ipc_write_token file.

After the first job ran:
  - The file held the worker's new token
  - The daemon still had its original token in self.opts
  - Subsequent events from salt-call (reading the file) or from later
    workers all carried the wrong token and were dropped by handle_event

Fix: guard the generation with `not self.opts.get("ipc_write_token")`.
The daemon starts with no token in opts → generates and writes one.
Workers arrive with the daemon's token already in opts → skip the block.

* Close IPC token startup race, harden Windows ACLs, widen tag coverage

Three gaps remained in the CVE-2026-47855 fix:

- MinionManager.tune_in() calls _bind() (which opens the IPC
  event-listening socket via AsyncEventPublisher) before
  _spawn_minions() (which is where the token was generated, inside
  Minion.__init__). The socket was reachable before any token existed
  to check incoming events against. Factor token generation into a
  shared _ensure_ipc_write_token() helper and call it from
  MinionManager.__init__, before _bind() ever runs; each per-master
  Minion spawned later inherits the token via its deep-copied opts.
  Minion.__init__ keeps the same call as a fallback for standalone use
  without a MinionManager wrapper.

- The token file was written with set_umask(0o177), which is a no-op
  on Windows (the exact platform this CVE targets, since it's TCP IPC
  used there in place of Unix sockets). Add ACL hardening via
  salt.utils.win_dacl, mirroring the existing pattern used for the
  master's pki_dir in win_verify_env: restrict to System,
  Administrators, and Owner with inheritance disabled.

- Only 3 tags were gated (manage_schedule, manage_beacons,
  module_refresh). environ_setenv, _minion_mine, fire_master,
  __master_req_channel_payload, and salt/auth/creds are at least as
  sensitive (environment variable injection, forwarding arbitrary data
  to the master, mutating the auth credentials map) and were left
  completely ungated. Add them to the protected tag list; fire_event
  already attaches the token to every outgoing event, so legitimate
  callers are unaffected.

* Fix unauthorized access to salt-api event stream (GHSL-2026-018)

The /events endpoint and related websocket streams only verified that
a token existed and had not expired. They did not check external auth
permissions, so a low-privileged user (e.g. one granted only test.*)
could subscribe to the full master event bus and observe sensitive data
from jobs and returns they were not authorized to run.
Require an explicit @events permission in external_auth before allowing
access to the event stream. This follows the same pattern as @wheel,
@runner, and @jobs. The check is applied to rest_cherrypy and
rest_tornado /events endpoints and their websocket equivalents.
BREAKING CHANGE: Users who need the salt-api event stream must add
@events to their external_auth ACL. Granting .* or test.* alone no
longer permits access to /events, /ws, /all_events, or
/formatted_events. Example:
    external_auth:
      pam:
        monitor:
          - '@events'
          - test.*

Shorter variant if you prefer a tighter subject/body:

Fix event stream eauth bypass in salt-api (GHSL-2026-018)
Check @events in external_auth before serving the master event bus on
/events and websocket streaming endpoints. Previously, any valid eauth
token could read all events regardless of ACL.
BREAKING CHANGE: Add @events to external_auth for users who should
access the event stream. Function/minion ACLs such as .* or test.*
do not imply event stream access.

* Add changelog for CVE-2026-41865 (#69505)

* Fix test_events.py: patch check_events_access instead of removed resolver

* Add events_insecure_auth opt-out for the @events ACL requirement (CVE-2026-41865)

Requiring '@events' in a token's auth_list to access the salt-api event
stream is a breaking change: any existing external_auth account without
it loses access on upgrade, with no prior way to configure it since the
permission didn't exist before. Add events_insecure_auth (default False)
so admins can temporarily restore the old any-valid-token behavior while
they update ACLs, documented as insecure and not for long-term use.

* Fix world-readable token_dir leaking eauth bearer tokens

The eauth token directory was created with mode 0755 (world-listable)
because verify_env applied no special permission enforcement to it,
unlike pki_dir which is correctly locked to 0700.  Because each token
file is named after its bearer-token value, any local user on the
master could enumerate valid eauth tokens by listing the directory.

Fix: add a token_dir parameter to verify_env and enforce 0o700
permissions analogously to the existing pki_dir block.  Update
Master.prepare() in daemons.py to pass token_dir when calling
verify_env.

Reported by Barney Sowood (CVSS 8.8)

* Add changelog for CVE-2026-47798 (#69511)

* Create token_dir under a tight umask to avoid a transient 0755 window

verify_env() previously created every directory in its dirs list,
including token_dir, under the generic umask 0o022, yielding mode
0o755. A later, separate check would then chmod token_dir to 0o700 if
it wasn't already, but that left a brief window at master startup
where a freshly-created token_dir was world-listable before being
locked down.

Since token filenames are themselves the bearer tokens, create
token_dir directly under umask 0o077 so it's born at 0o700, closing
that window. Other directories keep the existing 0o022 umask.

* Add integration tests for __context__ pickle vulnerability

Tests demonstrate that malicious objects injected into __context__ can
execute arbitrary code when pickled during parallel state execution.

This tests the vulnerability at salt/state.py:803 where pickle.dumps(val)
is called on __context__ values without sanitization.

Four passing test methods demonstrate:
1. __reduce__ execution during unpickling (pickle.loads)
2. __getstate__ execution during pickling (pickle.dumps) - immediate!
3. SSTI technique to create evil classes via Jinja2
4. Full attack chain: SSTI → inject __context__ → pickle → execute

The tests use both __reduce__ and __getstate__ protocols to show
different attack vectors. __getstate__ is more dangerous as it executes
immediately during pickle.dumps() without requiring unpickling.

Fifth test is skipped due to Jinja2 parser limitations with lambda
functions in dictionary literals, but the vulnerability is fully proven
by the other four tests and standalone demonstration files.

All tests pass with --core-tests flag enabled.

(cherry picked from commit c35b1849dbe237829a462b51d66a8c20ce88ec2a)

* Fix pickle vulnerability in __context__ handling

Add validation to prevent arbitrary code execution when pickling
__context__ values during parallel state execution. The vulnerability
allowed malicious objects with __reduce__ or __getstate__ methods to
execute code when pickled at salt/state.py:2305.

The fix implements a whitelist-based _is_safe_to_pickle() method that:
- Allows only safe builtin types (str, int, list, dict, etc.)
- Recursively validates container contents
- Blocks objects with dangerous dunder methods
- Allows methods from trusted modules (builtins, salt.*)

Includes comprehensive regression test that verifies the fix prevents
exploitation while allowing safe types to pass through.

(cherry picked from commit b32f5847aaf8cd05de496329d437761c08b6c277)

* Assign CVE-2026-59384 to __context__ pickle fix (#70333)

Add the changelog entry pointing to tracker issue #70333
and reference the assigned identifier CVE-2026-59384 in the guard
comment at the pickle.dumps call site in call_parallel.

* Prevent path traversal in auth.del_token via token name validation (CVE-2026-47824)

del_token() constructed the token file path with os.path.join(token_dir,
token) where token came directly from user input.  A value such as
'../../etc/passwd' would escape the token directory and allow an
authenticated runner caller to delete arbitrary files.

Validate the token parameter against a strict hex-only pattern before
constructing the path.  Salt eauth tokens are hex strings; any other
value is rejected with SaltInvocationError.

* Add changelog for CVE-2026-47824 (#69522)

* Fix pylint warnings in test_auth.py: remove unused import, use fopen

* Fix ssh.set_auth_key symlink-following LPE (CVE-2026-47854)

set_auth_key opened and chowned authorized_keys without checking whether
the path is a symlink.  A local user who owns their home directory could
pre-stage ~/.ssh/authorized_keys as a dangling symlink pointing at an
arbitrary path.  When root ran set_auth_key for that user the minion
would create the target through the link and then transfer ownership to
the unprivileged user via os.chown, yielding a deterministic local
privilege escalation.

Refuse to proceed when the resolved authorized_keys path is a symlink.
This is the minimal fix: os.path.islink check before the write/chown
branch, returning "fail" immediately.  The companion chown/chmod on the
directory creation path (dpath) does not set new_file=True and therefore
does not hit the ownership-transfer primitive described in the report.

* Add changelog for CVE-2026-47854 (#69523)

* Close TOCTOU race and symlinked-parent-dir gap in ssh.set_auth_key

The existing symlink fix (os.path.islink(fconfig)) is a check-then-act
pattern: the check and the subsequent fopen()/chown()/chmod() are
separate syscalls, so a local attacker with write access to their own
home directory could race by swapping the file for a symlink in
between. Separately, dpath (the parent directory, typically ~/.ssh)
was only checked via os.path.isdir(), which follows symlinks - a
symlinked ~/.ssh let the code skip directory creation but still
create, chown, and chmod a new file inside the attacker-chosen target
directory.

Check dpath for a symlink alongside fconfig, and open fconfig with
O_NOFOLLOW (a no-op on Windows) so the open itself fails closed if the
path was swapped for a symlink after the check. Use fchown/fchmod on
the resulting fd instead of path-based chown/chmod to close the second
race window between file creation and permission-setting.

* Restrict wheel.key.gen_keys keydir to master pki_dir (CVE-2026-47808)

An authenticated wheel user could supply an arbitrary keydir and cause
RSA key material to be written outside the master's pki directory.
Validate keydir against pki_dir with clean_path() and raise
SaltInvocationError when it falls outside that boundary.

* Add changelog for CVE-2026-47808 (#69516)

* Cover gen_signature and keyname in wheel.key path containment

gen_keys() now validates keydir against pki_dir, but two related gaps
remained: gen_signature()'s signature_path had no equivalent check
despite writing files the same way, and gen_keys() never validated
keyname itself, which crypt.gen_keys joins directly onto keydir
(base = os.path.join(keydir, keyname)) - a keyname containing a path
separator could still escape into an unintended subdirectory of an
otherwise valid keydir.

Add the same clean_path containment check to gen_signature, and reject
any keyname containing a path separator in gen_keys.

* Apply black formatting to test_key.py

* Fix zip-slip path traversal in archive.unzip() symlink extraction

Validate that symlink paths from ZIP entries resolve within the extraction
directory before calling os.symlink(). A malicious archive could use
path components like `../` in entry names to create symlinks outside the
destination, enabling arbitrary file read or write via symlink dereference
(CWE-22/CWE-59).

Fixes CVE-2026-41866

* Fix ci errors

* Fix get_source_sum swallowing cp.cache_file exceptions as format errors

The except (AttributeError, TypeError) guard was written to protect the
urlparse() call but its scope also covered cp.cache_file(). On certain
DNS/SSL stack combinations, cp.cache_file raises TypeError when a
non-resolving host is accessed; that exception was incorrectly caught and
re-raised as "format is invalid" instead of propagating as a real network
error.

Narrow the except scope to urlparse() only so that cp.cache_file
exceptions propagate through get_managed to the file.managed state, where
they are surfaced consistently as "Unable to manage file: ...".
Add unit tests for get_source_sum covering inline hashes, remote URLs
(success, not-found, TypeError propagation), unsupported protocols,
absolute local paths, and the urlparse guard.
Fixes test_issue_60203 flaky failure on Rocky 9, Debian 12, Windows Server.

* Add changelog for CVE-2026-41866 (#69506)

* Apply missing file.py fix: narrow except scope to urlparse() only

* Validate zip symlink target, not just destination, in archive.unzip

The existing zip-slip fix only confined where a symlink entry could be
created (the destination path derived from the zip entry name). It did
not validate the symlink's target (the entry's payload, read via
zfile.read()), so a zip could still place a symlink at a safe path
inside the extraction directory whose target pointed anywhere on the
filesystem (e.g. an absolute path like /etc/shadow, or a relative
../../ escape), exploitable when a later Salt file operation follows
that symlink.

Reject absolute symlink targets outright, and for relative targets,
resolve them against the symlink's own directory and confirm the
result stays within the extraction directory, mirroring the existing
destination confinement check.

* Apply black formatting to archive.py

* Make ProxyCommand filter case-insensitive in salt-ssh (CVE-2026-47811)

sanitize_kwargs() filtered 'ProxyCommand' using str.find() with exact
capitalisation.  A value such as 'proxycommand' or 'PROXYCOMMAND'
would bypass the filter entirely, allowing an attacker to inject an
arbitrary SSH ProxyCommand.  Use 'in val.lower()' for a
case-insensitive match.

* Add changelog for CVE-2026-47811 (#69518)

* Replace ssh_options/ssh_remote_port_forwards denylist with allowlist (CVE-2026-47811)

The existing sanitize_kwargs() filter only blocked a single OpenSSH option
name (ProxyCommand). LocalCommand, Match exec, IdentityFile, and ProxyJump
were all still exploitable through ssh_options, since a denylist for one
dangerous name is inherently incomplete. ssh_options now must match a
fixed allowlist of known-safe OpenSSH option names, and
ssh_remote_port_forwards is rejected outright since no safe subset of
port-forward specs exists (any spec can tunnel into internal
infrastructure). This only affects the netapi/eauth SSHClient path, not
the locally-trusted salt-ssh CLI.

* Close CVE-2026-47811 follow-up: reject whitespace/control chars in ssh_options items

_is_safe_ssh_option() inspected only the key portion of each
Key=Value item via item.split("=", 1)[0].strip().lower(). Downstream
in salt.client.ssh.shell.Shell._ssh_opts, each accepted item is
emitted as "-o {item}" and re-tokenized via shlex.split, so an item
like "stricthostkeychecking=no -o LocalCommand=/tmp/evil" passed the
allowlist on its stricthostkeychecking key and then expanded into a
second attacker-controlled -o directive.

Reject any item containing whitespace or control characters (< 0x20).
A legitimate OpenSSH Key=Value token contains no whitespace, so this
is a safe, minimal-scope tightening.

Add TestSanitizeKwargsSshOptionSmuggling covering the three
whitespace variants (space, newline, tab).

* Fix command injection in network.get_route, get_bufsize, mod_bufsize

get_route interpolated the caller-supplied ip parameter directly into
an f-string passed to cmd.run with python_shell=True, allowing
arbitrary shell command injection (e.g. '8.8.8.8; id').

get_bufsize/_mod_bufsize_linux did the same with the iface parameter.

Fix: validate ip with ipaddress.ip_address() before use; validate iface
against a strict allowlist regex that permits only characters legal in
Linux interface names ([A-Za-z0-9._:@-]{1,64}).

Reported by Lex Laravel (CVSS 7.2)

* Apply Black formatting and fix broad-exception-caught in network tests

* Add changelog for CVE-2026-47796 (#69509)

* Fix IndexError in _get_bufsize_linux when ethtool returns empty output

* Close CVE-2026-47796 follow-up: pass argv list to cmd.run, avoiding shell interpretation of IPv6 scope-id

``ipaddress.ip_address()`` accepts IPv6 addresses with attacker-controlled
scope-ids (e.g. ``fe80::1%eth0;id``); only a literal ``%`` inside the
scope-id is rejected. The original CVE-2026-47796 fix in ``network.get_route``
relied on ``ipaddress.ip_address()`` validation and then interpolated the
unvalidated ``ip`` string into ``cmd = f"ip route get {ip}"`` executed with
``python_shell=True`` -- shell metacharacters after ``%`` reached the shell
verbatim, allowing arbitrary command execution.

Switch to argv-list invocation with ``python_shell=False`` for the Linux,
SunOS, OpenBSD and AIX branches of ``network.get_route``. This closes the
bypass at the exec boundary regardless of what ``ip`` contains, matching
the pattern already used by ``get_bufsize``/``mod_bufsize``.

Add four regression tests asserting the exec-boundary shape: ``cmd.run``
receives an argv list containing the raw ``ip`` value as a single element
and ``python_shell=False``.

* Prevent directory traversal in salt.utils.path.join (CVE-2026-47799)

Strip leading '..' components from non-root parts passed to join(),
mirroring the existing lstrip(os.sep) treatment that already prevents
absolute-path overrides.  Without this a caller that joined an
attacker-controlled relative path such as '../../etc/shadow' against a
cache root would silently escape that root.

* Add changelog for CVE-2026-47799 (#69512)

* Fix which() regression from CVE-2026-47799 path.join hardening

The CVE-2026-47799 fix stripped leading '..' components from all parts
passed to salt.utils.path.join().  The resolve() helper inside which()
used that same join() to follow relative symlink targets — but symlink
targets legitimately contain '..' (e.g. npm tools symlinked as
/usr/local/bin/bower -> ../lib/node_modules/bower/bin/bower).  Stripping
those '..' produced a non-existent path, making which() return None for
any such executable.

Downstream effects: bower state module failed to load ("Specified state
'bower.bootstrap' was not found"), and _runlevel() in systemd_service
called cmd.run(None), crashing with IndexError in subprocess.Popen.

Fix: switch the one internal call in resolve() from salt.utils.path.join
to os.path.normpath(os.path.join(...)).  Symlink targets are trusted
filesystem data, not user-supplied input, so the traversal guard is
inappropriate there.  The security boundary in join() itself is unchanged.

* Close symlink-escape gap in fileclient._cache_loc

salt.utils.path.join()'s traversal hardening strips literal '..'
sequences from path parts, but it's a purely lexical check with no
filesystem access. If a symlink already exists inside the cache root
pointing outside of it, join() produces a clean-looking path with no
'..' characters at all, so the guard never engages, and _cache_loc
would write attacker-controlled content (served by a compromised or
malicious master) wherever that symlink points.

Apply the same clean_path() containment check _extrn_path already uses
for this exact purpose in this file, raising CommandExecutionError if
the resolved destination escapes the cache root.

* Fix minionfs path traversal via double-slash and absolute path injection

os.path.join discards the cachedir prefix entirely when the second
component begins with os.sep, so a path like
  salt://minionfs/minion1//etc/shadow
produces pushed_file=/etc/shadow after the first split, and
os.path.join(root, '/etc/shadow') == '/etc/shadow'.

Fix: reject any absolute pushed_file component immediately after the
split, add clean_path boundary check against the minion cache root, and
apply valid_id to the minion component so names containing '/' are
refused.  Also add '//' to the global fileserver path sanity check.

Reported by Stephan Schmidtmer (CVSS 6.5)

* Add changelog for CVE-2026-41868 (#69508)

* Normalize repeated path separators instead of rejecting them (CVE-2026-41868)

The generic fileserver dispatcher rejected any salt:// path containing
"//" outright, for every backend, not just minionfs -- an undocumented
breaking change for any templated path that accidentally produces a
double separator (e.g. a trailing slash in a Jinja variable). hgfs,
svnfs, s3fs, and azurefs have no containment check of their own and
rely entirely on this dispatcher, so simply removing the check would
weaken their protection against this bug class. Collapsing repeated
separators before the isabs/../ checks closes the same vulnerability
for every backend without rejecting anything that previously worked.

* Fix Windows re.sub crash and missing test opt in path separator fix

re.sub always parses its replacement string as a template before
scanning for matches, and on Windows os.sep is a lone trailing
backslash, so every call raised "bad escape (end of pattern)"
regardless of whether the pattern matched. Use a lambda replacement
to skip template parsing.

Also add the missing fileserver_followsymlinks opt to the new
double-slash test, which real configs always set (default True) but
was left out of the test's opts dict, causing a KeyError in
roots.find_file.

* Add size limit to msgpack deserialization to prevent DoS (CVE-2026-47820)

A pre-authenticated attacker could send an arbitrarily large msgpack
payload over the TCP transport, causing the master to allocate memory
without bound until OOM.

Changes:
- salt/payload.py: add _DEFAULT_MAX_PAYLOAD_SIZE (100 MiB) constant and
  a max_size parameter to loads(); messages larger than the limit raise
  SaltDeserializationError before any msgpack parsing occurs.
- salt/transport/tcp.py: pass max_buffer_size=_DEFAULT_MAX_PAYLOAD_SIZE
  to every salt.utils.msgpack.Unpacker() constructor so the streaming
  parser also enforces the ceiling.

* Add changelog for CVE-2026-47820 (#69521)

* Apply Black formatting to Unpacker calls in transport/tcp.py

* Bound decoded msgpack collection sizes, not just wire bytes (CVE-2026-47820)

The existing max_size/max_buffer_size checks bound the raw byte length
of a message, but not the memory used by the decoded Python structure.
A message near the 100 MiB wire-size limit that consists mostly of
framing (e.g. an array of millions of tiny elements) can still decode
into a Python object graph many times larger due to per-object
interpreter overhead. Explicit max_str_len, max_bin_len, max_array_len,
and max_map_len limits are now applied on every msgpack decode path
(payload.loads() and the TCP transport's streaming Unpacker), closing
that gap independent of the byte-size cap. The chosen limits (50 MiB
per string/binary value, 1,000,000 elements per array/map) are well
above legitimate Salt payload shapes; file transfers are already
chunked to file_buffer_size (1 MiB by default), so this does not
affect normal file transfers.

* Fix GPG signature bypass for pkg.installed sources on RPM systems (CVE-2026-59325)

pkg.installed / pkg.install with the sources parameter never actually
verified GPG signatures on RPM-based systems, regardless of
skip_verify. yum/dnf/dnf5's --nogpgcheck/gpgcheck handling only
governs repository-based installs; installing a package by literal
file path (the sources case) isn't covered by that setting at all and
was never independently checked. zypperpkg.install() had the
identical gap: skip_verify only ever toggled --no-gpg-checks, with no
separate handling for sources vs. repo targets.

Add lowpkg.verify_signature() in rpm_lowpkg.py, which requires an
actual, trusted GPG signature via `rpm -K -v`. This is stricter than
the existing lowpkg.checksum, which reports success for a completely
unsigned package as long as its digests are internally consistent --
that tells you nothing about the package's provenance.

yumpkg.install() and zypperpkg.install() now call
lowpkg.verify_signature() on every sources package when skip_verify
is False, and exclude/fail any package that is unsigned or signed by
an untrusted key, instead of installing it unchecked.

Fixes #69905

* Fix command injection in rpm_lowpkg.diff via shlex.quote

diff() built the rpm2cpio pipeline command via .format(package_path, path)
and passed it to cmd.shell (python_shell=True) without sanitising either
argument.  Shell metacharacters in package_path or path executed
arbitrary commands as the minion process user.

Fix: wrap both parameters with shlex.quote() before interpolation.

Reported by Kai Zen (CVSS 7.2)

* Apply Black formatting to rpm_lowpkg test assertion

* Add changelog for CVE-2026-47797 (#69510)

* Fix test_diff_payloads_are_shell_quoted: use positive shlex assertion

* Apply pre-commit black formatting to test_rpm_lowpkg assertions

* Validate queue functions before dispatch in process_runner (CVE-2026-47817)

process_runner() dequeued and dispatched execution-module functions with
no validation.  Any authenticated user who could call insert_runner()
could queue arbitrary function calls to be executed at a later time by
process_runner(), bypassing access controls (confused deputy).

Fix:
- Reject job entries whose fun name does not match the dotted
  identifier pattern (module.function).
- When queue_runner_allowlist is configured in master opts, skip any
  job whose fun is not in that list.

* Add changelog for CVE-2026-47817 (#69520)

* Remove unused pytest import in test_queue.py

* Make queue_runner_allowlist fail-closed to close confused-deputy hole (CVE-2026-47817)

process_runner() previously only enforced queue_runner_allowlist when it
was non-empty, so with the option unset (the default) any syntactically
valid queued function name was dispatched. A low-privileged caller with
only queue.insert_runner ACL access could queue state.orchestrate (or
any other runner) and have a privileged process_runner invocation
execute it with the master's full privileges. The allowlist is now
required: an unset or empty list rejects every queued job instead of
allowing everything through.

* Prevent path traversal in cache runner bank and cachedir params (CVE-2026-47805)

Add _validate_cache_args() called at the top of store(), list_(),
fetch(), and flush().  It rejects bank values whose normpath starts
with '..' and restricts caller-supplied cachedir to be within (or
equal to) the master's configured cachedir, preventing an
authenticated runner caller from redirecting cache operations to
arbitrary filesystem locations.

* Add changelog for CVE-2026-47805 (#69514)

* Apply Black formatting to cache runner error messages

* Block eauth access to tokens/minions cache banks

_validate_cache_args only rejected '..' traversal in bank and a
cachedir resolving outside the configured cache root. Neither check
restricts which bank names are reachable, and bank='tokens' with the
default cachedir needs no traversal at all: it IS the eauth token
store's parent directory. Worse, real token files have no '.p' suffix,
so cache.list_ bank=tokens directly dumps every live session's bearer
token as-is, and cache.store can write a forged token dict into the
same bank.

Block the tokens bank outright - there is no legitimate reason to
reach it via this runner, and a dedicated management path already
exists (runner.auth.list_tokens/del_token).

Also block the minions/minions_pre/minions_rejected/minions_denied
banks by default, since they hold grains, pillar (often containing
secrets), and mine data for every minion, and the master never reaches
them this way itself. Unlike tokens, some operators plausibly use
cache.fetch/cache.flush directly against minion data today, so this is
a breaking change: add cache_runner_allow_minions_bank (default False)
to restore the previous behavior explicitly.

* Opt in to cache_runner_allow_minions_bank in vault pillar-caching integration tests

TestVaultPillarPolicyTemplatesWithCache legitimately inspects the
minion data cache via cache.fetch minions/<id> data to verify pillar
caching behavior. The minions bank is now blocked by default
(CVE-2026-47805), so the test master needs to opt in explicitly.

* Close CVE-2026-47805 follow-up: validate key, expand bank blocks, normalize case

The initial CVE-2026-47805 fix left three residual gaps in the cache runner:

* Gap A - unvalidated ``key``. ``cache.flush``/``store``/``fetch`` accept a
  ``key`` argument that becomes part of the on-disk filename in every cache
  driver (``<cachedir>/<bank>/<key>.p``). ``salt.utils.path.join`` collapses
  ``..`` segments in ``key`` even when ``bank`` is safe, so
  ``cache.flush('validbank', key='../../etc/passwd')`` still escapes
  ``cachedir`` (bounded to a ``.p``-suffixed target).

* Gap B - sibling top-level banks were not blocked. ``mine``, ``grains``,
  ``pillar`` live at cache root and hold the same data the ``minions`` block
  was meant to protect; ``keys``, ``master_keys``, ``denied_keys`` hold
  credential material comparable to ``tokens``.

* Gap C - the ``minions`` / ``tokens`` check was case-sensitive
  (``norm_bank == 'minions'``), so on case-insensitive filesystems
  (Windows/NTFS, APFS, HFS+) requesting ``MINIONS`` or ``Tokens`` resolves
  to the same directory but bypassed the denylist entirely.

Fix in ``_validate_cache_args``:

* Extend the signature to ``(bank, cachedir, key=None)`` and validate ``key``
  when supplied: reject non-strings, NUL bytes, backslashes, absolute paths,
  and any ``..`` path segment. Forward slashes are still permitted because
  legitimate callers (the pillar cache uses ``<minion_id>:<pillarenv>``
  keys where ``pillarenv`` may contain ``/``) rely on them.

* Split reserved banks into two frozensets. Always block
  ``tokens``/``keys``/``master_keys``/``denied_keys`` (credential material,
  no override). Gate ``minions``/``minions_pre``/``minions_rejected``/
  ``minions_denied``/``mine``/``grains``/``pillar`` behind the existing
  ``cache_runner_allow_minions_bank`` opt-in (host-metadata banks).

* Case-normalize ``bank`` before comparing: fold backslashes to forward
  slashes, strip surrounding separators, lowercase, then match on the top
  path component so ``MINIONS``, ``/minions/``, ``minions\\somehost`` all
  hit the denylist.

Update ``store``/``fetch``/``flush`` to pass ``key`` through to the
validator, and add coverage for each gap plus tightening tests for
absolute-path/backslash/NUL keys and a legitimate ``/``-key.

* Enforce arg-level ACL for peer_run runner calls (CVE-2026-47804)

Replace the ad-hoc regex loop in minion_runner() with a call to
ckminions.runner_check(), which applies spec_check() and therefore
honours argument-level constraints already supported by the eauth
ACL system.  Operators can now restrict both the function name and
its positional/keyword arguments in peer_run configuration.

* Add changelog for CVE-2026-47804 (#69513)

* Apply Black formatting to masterapi and peer_run tests

* Require full minion-ID match in peer/mine_get/peer_run ACLs

The peer, mine_get, and peer_run master-side ACLs all matched minion
IDs against configured patterns with re.match, which only anchors at
the start of the string. A pattern meant to authorize a single minion
(e.g. "myminion") would also match any minion ID sharing that prefix
(e.g. "myminion-evil"), granting it the same permissions.

For peer_run in particular, this compounds with the fix already
applied here to pass args through to runner_check: a minion whose ID
happens to share a prefix with an authorized one could reach runner
functions never intended for it. Use re.fullmatch at all three sites
so the full minion ID must match the configured pattern.

* Close CVE-2026-47804 follow-up: accept plain function names in peer_run config

The initial CVE-2026-47804 fix routed peer_run auth through
CkMinions.runner_check -> spec_check(..., form="runner"), but
spec_check only accepts string ACL entries prefixed with @ (e.g.
@runner) or dicts whose sole key starts with @. The documented and
shipping peer_run config format uses plain function-name patterns:

    peer_run:
      minion-id:
        - match.compound_matches
        - manage.up

Every peer_run deployment using the documented config was denied
after the fix.

Normalize plain-string and plain-dict peer_run entries into the
@runner-namespaced form before calling runner_check so the documented
config keeps working while the argument-level ACL enforcement remains
in place. Add a regression test asserting a plain-function-name
peer_run entry authorizes the runner call end-to-end (real spec_check,
no mocking).

* Pass positional args to runner_check and wheel_check (CVE-2026-47806)

runner() and wheel() in MWorkerQueue called runner_check/wheel_check
with only clear_load.get("kwarg", {}) as the args parameter.
spec_check uses args.get("arg") to validate positional arguments, so
they were never included in the ACL check.  Pass a proper dict with
both "arg" and "kwarg" keys so that positional argument constraints
in the eauth ACL are enforced.

* Add changelog for CVE-2026-47806 (#69515)

* Apply Black formatting to local_funcs tests

* Fix incomplete CVE-2026-47806 patch: pass full arg/kwarg dict to runner_check and wheel_check

runner() was still passing load["kwarg"] directly instead of the
{"arg": ..., "kwarg": ...} dict that spec_check() expects, leaving
positional args unvalidated. Apply the same fix to wheel() which had
the identical bug. Also correct the fake_check_authentication mock
signature in test_wheel_check_receives_positional_args to accept the
show_username kwarg that wheel() passes to check_authentication.

* Fix test_wheel_check_receives_positional_args: patch WheelClient instead of missing wheel_ attr

* Document that the runner/wheel arg-ACL fix closes an existing bypass (CVE-2026-47806)

Clarify this only changes behavior for external_auth entries that
already use args:/kwargs: restrictions on a runner or wheel function,
and add guidance to review those restrictions and existing automation's
positional arguments before upgrading.

* Fix clean_path symlink bypass and virtualenv safe_py_code injection

clean_path called os.path.normpath before _realpath, allowing a symlink
gadget (e.g. jail/sub/dot -> .) to survive string-folding and then
fool the jail boundary check.  Fix: when realpath=True, call _realpath
on the original path directly; when realpath=False, reject any path
that is not already normalised.

get_distribution_path relied on safe_py_code (a trivially-bypassed
keyword blocklist) to prevent code injection via the distribution
parameter.  Replace with an allowlist that accepts only PEP 508
distribution name characters (alphanumeric, -, _, .).

Reported by Alex Dehnert (CVSS 6.8 / 8.8)

* Add changelog for CVE-2026-41867 (#69507)

* Close remaining injection gap in virtualenv.get_resource_path/content

get_distribution_path was fixed to use an allowlist instead of the
bypassable safe_py_code blocklist, but get_resource_path and
get_resource_content still relied on safe_py_code for their package
and resource arguments, which are interpolated the same way into code
executed inside the target virtualenv via cmd.exec_code_all.

Replace both call sites with a new allowlist check: package must be a
dotted Python identifier, and resource must be a relative path with no
parent directory traversal. Remove the now-unused _verify_safe_py_code
helper and the salt.utils.verify import it required.

Also ports the previously-deleted get_distribution_path regression
tests (lost when tests/unit/modules/test_virtualenv_mod.py was removed
upstream in favor of the pytest-style test file) into
tests/pytests/unit/modules/test_virtualenv_mod.py, alongside new tests
for the get_resource_path/get_resource_content fix.

* Apply black formatting to virtualenv_mod test assertions

* Fix CORS origin reflection and OPTIONS session bypass (CVE-2026-47810)

Two issues in cors_tool():
1. Access-Control-Allow-Origin reflected any Origin header verbatim
   while also sending Access-Control-Allow-Credentials: true, enabling
   CSRF from any origin.  Now only origins listed in the cors_origin
   api option are reflected; all other origins receive the wildcard
   value without the Credentials header.
2. OPTIONS preflight set cherrypy.session["token"] = True to skip
   salt_auth_tool, granting an authenticated session without any
   credential check.  That line has been removed.

* Add changelog for CVE-2026-47810 (#69517)

* Apply Black formatting and remove unused imports in test_cors.py

* Fix functional CORS test: configure cors_origin allowlist in app fixture

test_option_request enabled the CORS tool but never populated the
cors_origin allowlist, so https://domain.com was treated as an unknown
origin and received '*' instead of being reflected. Wire in the expected
origin via apiopts in the fixture to match the new CVE-2026-47810 behaviour.

* Add explicit cors_origin: '*' support and document CORS behavior (CVE-2026-47810)

cors_origin: '*' happened to work correctly today only by accident of
falling through to the same branch used for unlisted origins. Handle
it explicitly so it doesn't depend on that fallback's behavior, matching
the convention already documented for rest_tornado. Also add a CORS
section to the module docstring: rest_cherrypy had no documentation for
cors_origin at all, and clients using the X-Auth-Token header (already
recommended here) need to know they're unaffected by this option since
they never send credentials cross-origin.

* Warn/reject SSDP master discovery without fingerprint (CVE-2026-47815)

SSDP master discovery used TOFU with no mandatory identity check.  An
attacker on the same broadcast domain could respond to SSDP probes and
redirect the minion to a rogue master before any key fingerprint check
occurred in crypt.py.

_discover_masters() now:
- Emits a CRITICAL log warning whenever a master is accepted via SSDP
  without master_finger configured, instructing the operator to set it.
- Refuses to connect and returns early when
  require_master_fingerprint: True is set in the minion config and no
  master_finger is configured.

* Add changelog for CVE-2026-47815 (#69519)

* Fail closed when SSDP discovery is enabled without master_finger

The previous fix only logged a CRITICAL warning when master_finger was
missing and otherwise proceeded to trust the discovered master anyway.
The only path that actually refused was gated behind
require_master_fingerprint, an undocumented, schema-less flag that
defaulted to False - so the default (vulnerable) configuration was
unchanged.

Move the enforcement to config-load time: _update_discovery_config now
raises SaltConfigurationError when discovery is enabled and
master_finger is unset, before any SSDP network activity begins,
unless the new discovery_insecure_auth option (following the existing
git_pillar_insecure_auth/gitfs_insecure_auth/winrepo_insecure_auth
naming convention) is explicitly set to True. _discover_masters()
keeps an equivalent check as defense-in-depth.

This is a breaking change for anyone running discovery without
master_finger today; discovery_insecure_auth provides an explicit,
documented way to temporarily restore the previous behavior while
migrating. Documents discovery and discovery_insecure_auth, neither of
which had reference documentation before this change.

* Fix black formatting and pylint membership-test warning

black: collapse the elif condition in _update_discovery_config onto
one line (fits within the line length limit).

pylint: opts["discovery"] is assigned True in the test literal, so
pylint infers it might still be bool and flags 'not in' on it as
unsupported-membership-test. Narrow the type with an explicit
isinstance check before the membership test.

* Suppress pylint false-positive on isinstance-narrowed dict

pylint's astroid inference doesn't propagate the isinstance() check on
the preceding line to the 'in' operator here, still flagging discovery
as possibly bool (from the test's own literal opts assignment) despite
the runtime-verified isinstance assertion immediately above.

---------

Co-authored-by: Twangboy <shane.d.lee@gmail.com>
CVE-2026-47820 follow-up: PR #779 backport to 3007.x missed the 7
client-side Unpacker() call sites that exist on 3007 but not 3006.
A malicious or compromised master could send oversized msgpack to
clients and bypass the 100 MiB cap. Harden all remaining sites in
salt/transport/tcp.py with _DEFAULT_MAX_PAYLOAD_SIZE +
_DEFAULT_MSGPACK_UNPACK_LIMITS:

- MessageClient.__init__ (line 238)
- MessageClient reconnect recreations (lines 311, 325)
- TCPClientKeepAlive.__init__ (line 1752, preserves raw=False)
- _stream_return initial + exception-handler reconnects (lines 1981, 2023, 2050)

CVE-2026-47855 test fix: the backported TestIPCWriteToken tests used
salt.ext.tornado which was removed from 3007.x. Replace all 17
references with plain tornado (already imported). Runtime code
(salt/minion.py, salt/utils/event.py) was unaffected -- this is a
test-only fix.
The windows-11-vs2026-arm64 runner image 20261112.217.1+ fails
Expand-Archive with 'Cannot find an overload for "ExtractToDirectory"
and the argument count: 3'. Use ZipFile.ExtractToDirectory(path, dest)
directly, which exists in both Windows PowerShell 5.1 and PowerShell 7.

Backported from origin/3008.x bbfd315 (#70898).
Changelog fragment omitted because release-prep already consolidated.
im-open/workflow-conclusion needs actions:read to list the workflow's
jobs via the API. Without it the action fails with 'Resource not
accessible by integration', falls back to its skipped fallback, and
this job spuriously fails when any needed job was legitimately skipped
(e.g. publish-pypi on salt-priv under the repo-name gate).
GHA_SSH_KEY secret has no matching deploy key on salt-priv, causing
'Permission denied (publickey)' on the clone step. The workflow has
'permissions: contents: write' and 3008.x has no branch protection,
so the default GITHUB_TOKEN handles clone and tag push via HTTPS.
When promoting a pre-staged release from salt-priv to saltstack/salt,
the branch may already be at the Release commit and the signed tag may
already be pushed. Without this change, release.yml fails at 'git am'
(patch already applied) and 'git tag -as' (tag already exists).

Detect both states and no-op instead of failing:

- git apply --check --reverse detects an already-applied patch.
- git rev-parse --verify --quiet detects an existing tag.

git push is already idempotent (no-op if the ref is up to date) so no
change is needed to the Push step. First-time flow on an un-released
branch is unaffected.
The prior idempotency fix only checked for the tag in the local git
state. actions/checkout performs a shallow clone that doesn't fetch
tags, so the local ref is absent even when origin already has the tag
(as happens when promoting a signed tag from salt-priv to saltstack/salt).
The workflow then created a fresh local tag at HEAD (which is above the
Release commit after the idempotency commit was added) and failed on
'git push origin <tag>' with 'rejected: already exists'.

Check 'git ls-remote --tags origin' first. If the tag is on origin,
skip both creation and push. If it's only local, still push. If
neither, create + push as before.

Branch push at the end is unchanged — 'git push' remains idempotent on
an up-to-date branch.
…inions

The CVE batch commit 60398ff added
test_eval_master_random_master_warning_suppressed_for_multimaster but
did not carry the matching one-line guard in salt/minion.py. Without
the guard the warning fires for every deltaproxy sub-proxy minion,
which is bound to a single master by design but inherits the
operator's random_master setting from the parent config.

Both the guard and the test were originally landed on 3007.x by
034c0ed (#69572) in 2026-06. The guard was then swept out by
03014ce (revert of PR #69622 mis-merge) in 2026-08, which was
the correct revert but took the guard with it as collateral damage.
origin/3006.x and origin/3008.x both carry the guard; origin/3007.x
is the only line missing it.

Restoring the guard here lets the test pass again.
dwoz added 2 commits December 5, 2026 01:53
mercurial 7.2.2 and 7.2.3 are both yanked from PyPI; the pip-compile
pre-commit hooks fail to install from these locks. uv pip compile
selects 7.2.6 (current stable) for every (py3.9..3.14 x linux/darwin/
freebsd) CI lock. Only the mercurial pin changes across all 18 files;
all other packages remain at their prior pins.

Regenerated with pre-commit run --all-files pip-compile.
…ject_ssh_options

The CVE-2026-47811 ssh_options allowlist in this release filters out
both malicious items ("|id>{path} #" has whitespace; "lol" has
no "="), leaving ssh_options empty. salt-ssh then invokes ssh
with no "-o" flags and connects to 127.0.0.1:22, where (on CI
runners with a system sshd) it meets a real host-key prompt. With
the fixed KEY_VALID_RE regex, salt-ssh answers "no" and returns
"The host key needs to be accepted..." as stdout, which the old
asserts reject.

The core property (CVE-2020-16846: the injected "|id>{path}"
fragment must not execute) is still verified by "path.exists()
is False". The stdout/stderr content was an implementation detail
of the old ssh_options denylist and no longer meaningful.
dwoz and others added 5 commits December 5, 2026 15:20
Port of 3008.x commit e2694a7.

tests/pytests/functional/cli/test_salt.py::_install_salt_extension is an
autouse fixture that runs

    salt-pip install salt-analytics-framework==0.1.0

Under pip 26's resolver, that walks the full transitive dep set and
rebuilds salt from an sdist pulled from PyPI, uninstalling the on-disk
onedir salt in the process. Salt's RECORD lists ../../../salt-pip (and
every other salt-* entry-point script) as an owned file, so the uninstall
deletes <onedir>/salt-pip itself. Every subsequent test that invokes
CODE_DIR / "artifacts" / "salt" / "salt-pip" then fails .exists(), and
every test that imports salt via the loader hits "renderer jinja|yaml
is unavailable" because the on-disk salt is gone.

Pass --no-deps to the salt-pip install call. test_versions_report only
asserts salt-analytics-framework shows up in Salt Extensions; its
dependencies aren't checked. Also fix the hardcoded extras-3.10 cleanup
path by computing it dynamically from sys.version_info, and add the
explicit import salt.utils.platform the fixture was relying on being
pulled in transitively.
…tests

Two sets of pre-existing CI failures remain after the earlier fixtures /
toolchain / scp fixes. Neither reflects a bug this PR introduces, both
block the required "Set the CI Pipeline Exit Status" gate.

tests/pytests/integration/ssh/test_log.py::test_log_password and
tests/pytests/integration/ssh/test_py_versions.py::test_py36_target
target ghcr.io/saltstack/salt-ci-containers/ssh-minion:latest, which
ships Python 3.7.15 (image last published 2024-06-30; the registry
exposes only the "latest" tag). Salt's thin now bundles tornado 6.x,
whose gen.py uses PEP 585 subscripted generics (Future[List]) at
import time -- requiring the target python to be >=3.9. The thin
therefore cannot initialize on the test container:

    File ".../py3/tornado/gen.py", line 444, in <module>
        ) -> Future[List]: ...
    TypeError: 'type' object is not subscriptable

Salt 3008.x's pyproject.toml already declares
requires-python = ">=3.8", so the <3.8 target support these tests
exercise is officially unsupported. These tests have been failing on
every 3008.x nightly for 20+ days across every Linux runner, with
Fedora 43 / Debian 13 only "passing" because they hit a
kex_exchange_identification early-close that the tests'
pytest.skip branch happens to catch. Mark both with
@pytest.mark.xfail(strict=False, ...) -- not a skip -- so the suite
still runs them and we see the xpass if a newer ssh-minion image is
ever published with python >=3.9.

tests/pytests/functional/modules/test_mac_brew_pkg.py had a 120s
per-test timeout. brew update on a cold macOS runner regularly needs
more than that, and when pytest-timeout kills a mid-flight brew
subprocess the global locks/update flock stays held by the detached
child, which then poisons every subsequent test with
"lockf: 200: already locked". Bump the timeout to 300s (matching
other salt network-dependent fixtures), and add an autouse fixture
that waits briefly for brew update processes to drain, then
forcibly reaps any orphans so each test starts with a clean lock.
PR #69950 (libyaml fix) shipped in v3006.28, v3007.15, and v3008.3 - all
versions the 3007.x downgrade matrix now targets. The libyaml_expected
fixture assumed the previous release predated the fix, causing both tests
to fire their "libyaml must be absent" assertion on every downgrade run.

Collapse the fixture: libyaml must be present on both current and previous
onedir now. Drop the else-branches that asserted absence, and remove the
now-unused libyaml_expected fixture and kwarg.

Port of 3008.x commit 8fc9157 (merged as #70383).
``test_state_running`` previously fired two parallel salt-ssh calls and
hoped the foreground ``state.running`` poll would land inside the
(variable-length) salt-ssh setup + sleep window of the background
``state.sls`` call. On slow runners the setup ate so much of the budget
that the foreground gave up before catching ``state.pkg``.

Replace the blind polling with explicit causal synchronization:

* Build a self-contained SLS via ``pytest.helpers.temp_file`` whose
  first state writes a marker file and whose second state runs
  ``test.sleep 60``.
* Block the foreground on the marker file before polling
  ``state.running``. Once the marker exists salt-ssh has reached the
  sleep step and ``state.pkg`` is guaranteed to be in the remote
  ``proc/`` cache, so the first poll almost always finds it.
* Preserve the existing ``Failed to return clean data`` recovery path
  by skipping if the background thread exited without writing the
  marker.

Also bump ``test_state_show_top`` retry budget from 6x3s=18s to
20x3s=60s. On Photon OS 5 ARM64 with FIPS the master takes longer
than 18s to discover ``master_tops_test`` from extension_modules,
producing the same intermittent assertion failure.
Fedora 43 / Rocky 9 / Ubuntu 26.04 scenarios jobs on this release
branch die with SIGTERM (exit 143) during the fixture restart cycle
between ``test_basic_command_return`` and ``test_stopped_first_master``
(or later, at ``test_minion_swarm.py::test_ping``). The pattern is
always: 2-3 minutes of silent fixture setup (salt_mm_master_1 is
function-scope, so each test restarts both masters and both minions),
then the next test's name is printed, and the whole chunk is killed
within 20-60 ms. All other platforms pass this chunk; macOS Intel
and these three Linux distros are the only ones where the memory
burst of 4 parallel daemon restarts on a 7 GB ubuntu-24.04 hosted
runner can trip the OOM killer under load.

PR #70197 (006b03a) pinned pyzmq 25.1.2 to cut the long-tail leak
and dropped the skip-under-memory-pressure fixture added by
c62be76. The pyzmq pin remains in effect (pyzmq==25.1.2 in every
ci py3.X linux.lock), but the burst peak during fixture restart is
still enough to trigger OOM on our release branch where the CVE patch
set has added memory footprint to the control plane. Reinstating the
skip gate with the threshold tightened from 80% to 65% keeps these
three tests honest on fast runners while letting them opt out
gracefully on the three distros that keep tripping.

Scope is limited to the three high-cost tests
(``test_stopped_first_master``, ``test_stopped_second_master``,
``test_minion_reconnection_attempts``) and to the multimaster
scenarios package; no production code change.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.09846% with 143 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.16%. Comparing base (6d6c1a9) to head (0c56a60).
⚠️ Report is 10 commits behind head on 3007.x.

Files with missing lines Patch % Lines
...s/integration/test_context_pickle_vulnerability.py 83.63% 7 Missing and 12 partials ⚠️
tests/pytests/integration/ssh/test_state.py 60.47% 9 Missing and 8 partials ⚠️
tests/pytests/unit/test_minion.py 92.48% 15 Missing and 2 partials ⚠️
salt/daemons/masterapi.py 58.63% 7 Missing and 5 partials ⚠️
tests/pytests/unit/modules/test_network.py 85.92% 10 Missing ⚠️
salt/modules/rpm_lowpkg.py 58.83% 4 Missing and 3 partials ⚠️
tests/pytests/unit/netapi/cherrypy/test_cors.py 88.89% 2 Missing and 5 partials ⚠️
salt/modules/network.py 76.48% 3 Missing and 1 partial ⚠️
salt/netapi/__init__.py 82.61% 2 Missing and 2 partials ⚠️
salt/netapi/rest_tornado/saltnado.py 33.34% 1 Missing and 3 partials ⚠️
... and 22 more
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           3007.x   #71006      +/-   ##
==========================================
+ Coverage   64.42%   65.16%   +0.74%     
==========================================
  Files        3505     3511       +6     
  Lines      485564   487471    +1907     
  Branches    99755   100136     +381     
==========================================
+ Hits       312783   317612    +4829     
+ Misses     156097   153173    -2924     
- Partials    16684    16686       +2     
Flag Coverage Δ
salt 49.73% <85.97%> (+0.26%) ⬆️
tests 87.52% <94.77%> (+1.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
salt/cli/daemons.py 58.55% <ø> (-2.56%) ⬇️
salt/client/ssh/client.py 84.26% <100.00%> (+6.00%) ⬆️
salt/client/ssh/shell.py 61.12% <100.00%> (ø)
salt/config/__init__.py 70.94% <100.00%> (-3.09%) ⬇️
salt/fileclient.py 71.60% <100.00%> (-1.45%) ⬇️
salt/fileserver/__init__.py 57.26% <100.00%> (-1.61%) ⬇️
salt/fileserver/minionfs.py 40.87% <100.00%> (+8.64%) ⬆️
salt/master.py 52.47% <ø> (-6.84%) ⬇️
salt/minion.py 62.86% <100.00%> (-1.12%) ⬇️
salt/modules/virtualenv_mod.py 77.33% <100.00%> (+4.55%) ⬆️
... and 65 more

... and 326 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch was previously deployed

1 inactive deployment
ci — 0c56a607 Deployed Dec 6, 2026 by dwoz via Build Onedir Packages / Windows (x86) #29877
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants