Commit Graph
81856 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 505a5d2bcd Merge remote-tracking branch 'systemd-security/coredump-d' 2025-05-29 17:22:19 +02:00
Luca Boccassi f13bc8533c login: receive synthetic events for devices with 'uaccess' tag (#37654)
Fixes #37579.
2025-05-29 15:11:14 +01:00
Luca Boccassi 5cfc9c34f4 sysupdate: change status once operation has completed
Otherwise after the service exits it will still show
"Installing 'foobar'" as the status, which is confusing
2025-05-29 15:44:31 +02:00
Allison Karlitskaya 1994426f90 NEWS: fix description of CopyFiles==::fsverity=copy
This doesn't enable fs-verity on every file, but preserves the fs-verity
status that was present to start with.
2025-05-29 18:54:05 +09:00
Shubhendra Kushwaha fbad1beae4 docs: add man pages for sd_device_enumerator_add_match_* (#37589)
Add man pages for:
- `sd_device_enumerator_add_all_parents`
- `sd_device_enumerator_add_match_parent`
- `sd_device_enumerator_add_match_property`
- `sd_device_enumerator_add_match_property_required`
- `sd_device_enumerator_add_match_subsystem`
- `sd_device_enumerator_add_match_sysattr`
- `sd_device_enumerator_add_match_sysname`
- `sd_device_enumerator_add_match_tag`
- `sd_device_enumerator_add_nomatch_sysname`
- `sd_device_enumerator_allow_uninitialized`.

Related to #20929
2025-05-29 18:40:18 +09:00
Yu Watanabe 50e518a96a login: add several debugging logs about synthetic events 2025-05-29 11:41:25 +09:00
Yu Watanabe 392b9ab647 login: add device monitor instance to receive events for devices with uaccess tag
With c960ca2be1, logind triggers uevents
for devices with uaccess tag, and waits for the events being processed
by udevd.
However, logind received not all triggered events, and might lose some
events. That causes session and user state file not updated, and many
desktop environment application handled the session and user were inactive.

This introduces one more device monitor instance which monitor events
for devices with 'uaccess' tag. Hence, all triggered events will be
recieved by logind, and session and user state file will be updated.

Follow-up for c960ca2be1.
Fixes #37579.
2025-05-29 11:41:25 +09:00
Mike Yuan 4313aeedf5 ssh-generator: two cleanups (#37649) 2025-05-29 02:26:44 +02:00
Luca Boccassi 60491ceb12 test: fix TEST-84-STORAGETM with nvme-cli < 2.7
The -vv parameter was added in version 2.7, check before using it

Follow-up for ebc0514a65
2025-05-29 01:15:56 +01:00
Zbigniew Jędrzejewski-Szmek 9ce8e3e449 Define helper to call PR_SET_DUMPABLE 2025-05-29 00:19:24 +02:00
Zbigniew Jędrzejewski-Szmek 76e0ab49c4 coredump: introduce an enum to wrap dumpable constants
Two constants are described in the man page, but are not defined by a header.
The third constant is described in the kernel docs. Use explicit values to
show that those are values are defined externally.
2025-05-29 00:12:10 +02:00
Zbigniew Jędrzejewski-Szmek e6a8687b93 coredump: when %F/pidfd is used, again allow forwarding to containers 2025-05-29 00:10:55 +02:00
Luca Boccassi 868d95577e coredump: add support for new %F PIDFD specifier
A new core_pattern specifier was added, %F, to provide a PIDFD
to the usermode helper process referring to the crashed process.
This removes all possible race conditions, ensuring only the
crashed process gets inspected by systemd-coredump.
2025-05-29 00:10:55 +02:00
Zbigniew Jędrzejewski-Szmek 13902e0253 coredump: get rid of a bogus assertion
The check looks plausible, but when I started checking whether it needs
to be lowered for the recent changes, I realized that it doesn't make
much sense.

context_parse_iovw() is called from a few places, e.g.:
- process_socket(), where the other side controls the contents of the
  message. We already do other checks on the correctness of the message
  and this assert is not needed.
- gather_pid_metadata_from_argv(), which is called after
  inserting MESSAGE_ID= and PRIORITY= into the array, so there is no
  direct relation between _META_ARGV_MAX and the number of args in the
  iovw.
- gather_pid_metadata_from_procfs(), where we insert a bazillion fields,
  but without any relation to _META_ARGV_MAX.

Since we already separately check if the required stuff was set, drop this
misleading check.
2025-05-29 00:10:55 +02:00
Zbigniew Jędrzejewski-Szmek 8fc7b2a211 coredump: also stop forwarding non-dumpable processes
See the comment in the patch for details.

Suggested-by: Qualys Security Advisory <qsa@qualys.com>
2025-05-29 00:10:55 +02:00
Zbigniew Jędrzejewski-Szmek 0c49e0049b coredump: use %d in kernel core pattern
The kernel provides %d which is documented as
"dump mode—same as value returned by prctl(2) PR_GET_DUMPABLE".

We already query /proc/pid/auxv for this information, but unfortunately this
check is subject to a race, because the crashed process may be replaced by an
attacker before we read this data, for example replacing a SUID process that
was killed by a signal with another process that is not SUID, tricking us into
making the coredump of the original process readable by the attacker.

With this patch, we effectively add one more check to the list of conditions
that need be satisfied if we are to make the coredump accessible to the user.

Reportedy-by: Qualys Security Advisory <qsa@qualys.com>

In principle, %d might return a value other than 0, 1, or 2 in the future.
Thus, we accept those, but emit a notice.
2025-05-29 00:10:08 +02:00
Lennart Poettering a5b713630f update NEWS 2025-05-28 23:01:21 +02:00
Mike Yuan ce449b226b meson: improve -ffinite-math-only option detection and silence warning when build with -Ofast (#37638) 2025-05-28 22:42:39 +02:00
Mike Yuan e72bd8dbc8 ssh-generator: add missing newline before [Service] and trailing NL to generated service 2025-05-28 22:30:46 +02:00
Mike Yuan 0aa4c3f0f9 ssh-generator: fix typo 2025-05-28 22:30:39 +02:00
Yu Watanabe f1b7b34cc7 NEWS: fix typo 2025-05-29 04:03:00 +09:00
Luca Boccassi 24ee70d4f5 NEWS: fix typos and formatting 2025-05-28 19:49:56 +01:00
Jan Čermák c9f931b737 journal-gatewayd: add /boots endpoint (#37574)
Add endpoint for listing boots. Output format mimics `journalctl
--list-boots -o json`, so it's a plain array containing index, boot ID
and timestamps of the first and last entry. Initial implementation
returns boots ordered starting with the current one and doesn't allow
any filtering (i.e. equivalent of --lines argument).

Fixes: #37573
2025-05-29 03:33:03 +09:00
Luca Boccassi 7a232071d0 Man page fixes (#37645) 2025-05-28 19:15:46 +01:00
Mike Yuan 46bcfe651f NEWS: fix typo, reorganize a few entries 2025-05-28 19:25:39 +02:00
Lennart Poettering 5b94cdf888 update TODO 2025-05-28 18:29:47 +02:00
Lennart Poettering e08ee8fdd3 update NEWS in preparation for v258 2025-05-28 18:29:47 +02:00
Tim Vangehugten 082f2556a6 po: Translated using Weblate (Dutch)
Currently translated at 92.2% (237 of 257 strings)

Co-authored-by: Tim Vangehugten <timvangehugten@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/nl/
Translation: systemd/main
2025-05-28 16:33:03 +01:00
Zbigniew Jędrzejewski-Szmek b082968d19 man: better tags, more links, minor grammar and formatting improvements
Closes https://github.com/systemd/systemd/issues/35751.
2025-05-28 15:35:53 +02:00
Zbigniew Jędrzejewski-Szmek acf3bdf813 man/systemd.network: reword description of MulticastIGMPVersion= 2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek f56d9b82b1 man/systemd.timer: change to positive wording 2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek de8d2894b8 man: reword descriptions of numerical fields
A "string" is a concept in C. In a text-based API, this is implicit, especially
if we say that something was "formatted". So change occurences of "decimal
string" to just "decimal". Similarly, "numerics" is unclear, say "digits".

Also, a "timestamp is in a clock" just sounds wrong. Reword those sentences.
2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek 948369983c man/systemd-resolved: update description of routing 2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek 8bfdba3cb1 man/systemd-analyze: rewrite "Exit status" section 2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek 3a23e96b67 man/pam_systemd: use <constant> consistently
For some reason, <constant> and <literal> were used interchangeably.
2025-05-28 15:33:39 +02:00
Zbigniew Jędrzejewski-Szmek 001ae86a73 man: introduce openssl as man page provider and use it for ukify.1 2025-05-28 15:33:39 +02:00
Luca Boccassi 5a01c7c5f4 network: fix handling of ENODATA when reading IFLA_MASTER attribute (#37633)
Fixes #37629.
2025-05-28 12:20:00 +01:00
Yu Watanabe d117687ab3 sd-bus: rename internal structs and enums
This renames e.g. struct bus_body_part -> BusMessageBodyPart to
follow our usual coding style. Also, several struct and enum
declarations are moved to relevant headers.
Also, this introduces bus-forward.h.
2025-05-28 09:52:28 +02:00
Eisuke Kawashima 39c3638445 zsh-completion: improve systemd-run
- add missed options
- improve completion for property
2025-05-28 09:50:53 +02:00
Yu Watanabe 4e36b79a84 cgroup-util: drop CGROUP_MASK_EXTEND_JOINED; move CGROUP_CPU_SHARES/BLKIO* to nspawn-oci (#37639) 2025-05-28 09:50:05 +09:00
Yu Watanabe 816a852324 core/exec-invoke: don't set $TMPDIR if sandboxing is disabled (#37637)
Follow-ups for #37271.
2025-05-28 09:46:06 +09:00
Mike Yuan cd3435fc0b cgroup-util: drop CGROUP_MASK_EXTEND_JOINED
Also kill the "compat pair invalidation" logic in unit_invalidate_cgroup()
2025-05-28 00:53:24 +02:00
Mike Yuan 9e73d37512 cgroup-util: move CGROUP_CPU_SHARES/BLKIO* to nspawn-oci
These are only used for translation from OCI metadata
to cgroup v2 values.
2025-05-28 00:21:37 +02:00
Mike Yuan d87f943596 bus-print-properties: drop *CPUShares formatter 2025-05-28 00:19:26 +02:00
Mike Yuan c4f79e098b test-execute: add test case for PrivateTmp=disconnected + DefaultDependencies=no + sandboxing disabled via '+' prefix 2025-05-27 23:18:00 +02:00
Yu Watanabe 3e018371d0 meson: also disable -Wmaybe-uninitialized when -Ofast is specified
At least with GCC-14, -Ofast produces many false-positive warnings.
```
$ gcc --version
gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)
```
2025-05-28 05:44:11 +09:00
Yu Watanabe 679b3c71eb meson: check -ffinite-math-only in more detail
Even if -fno-finite-math-only is specified, -ffinite-math-only,
-ffast-math, or -Ofast may be also specified after that. In that case,
-fno-finite-math-only has no effect, and test-json will fail.

Replaces #37603.
2025-05-28 05:39:43 +09:00
Mike Yuan 8b0a0298b7 core/exec-invoke: don't set $TMPDIR if sandboxing is disabled
Follow-up for 6156bec7a4
2025-05-27 22:35:03 +02:00
Nick Rosbrook c6b4f1c8f8 timedate: print better errors when systemd-timesyncd.service unavailable
If the error is a common bus error indicating the service is not
available, print a more user-friendly message indicating so.
2025-05-28 04:40:08 +09:00
Nick Rosbrook 906145d53f shared: add optional error parameter in bus_print_all_properties()
While here, remove the unused found_properties parameter.

This is preparation for another commit.
2025-05-28 04:40:08 +09:00