Commit Graph
87123 Commits
Author SHA1 Message Date
Luca Boccassi cbea0e34c4 portable: avoid passing through ID/version fields to LogExtraFields= when they contain control characters
Found by Claude Code Review.

Follow-up for e8114a4f86
2026-03-12 21:53:28 +00:00
Lennart Poettering 3df88e836c man: document explicitly that ProtectHome= has no effect on non-standard homedir locations
Fixes: #41045
2026-03-12 17:57:21 +00:00
Luca Boccassi c1d4d5fd9a meson: bump version to v260~rc3 2026-03-12 16:58:12 +00:00
Luca Boccassi 2ed82970d0 NEWS: finalize place and date 2026-03-12 16:55:49 +00:00
Luca Boccassi cfe93e6341 NEWS: update contributors list 2026-03-12 16:55:41 +00:00
Luca Boccassi 92f62fa5de pcrlock: don't accept PCRs > 23 from firmware event log (#41072) 2026-03-12 16:50:54 +00:00
Dan McGregor 9ce905e35f meson: use libfido2_cflags dependency
Add the libfido2 dependency to cryptenroll and cryptsetup's
meson files. If libfido2's not installed in the default path
the build wasn't finding its headers correctly.
2026-03-12 16:02:28 +00:00
Luca Boccassi fd013bd9a9 Translations update from Fedora Weblate (#41073)
Translations update from [Fedora
Weblate](https://translate.fedoraproject.org) for
[systemd/main](https://translate.fedoraproject.org/projects/systemd/main/).



Current translation status:

![Weblate translation
status](https://translate.fedoraproject.org/widget/systemd/main/horizontal-auto.svg)
2026-03-12 14:28:05 +00:00
Sergey A. d6aa1fecc1 po: Translated using Weblate (Russian)
Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Sergey A. <Ser82-png@yandex.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/
Translation: systemd/main
2026-03-12 13:58:31 +00:00
Yaron Shahrabani 19606b5ce5 po: Translated using Weblate (Hebrew)
Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/he/
Translation: systemd/main
2026-03-12 13:58:31 +00:00
Lennart Poettering bb19b61049 measure: figure success of measurement correctly
Found by Claude Code Review.
2026-03-12 14:43:48 +01:00
Lennart Poettering c248d6a409 pcrlock: don't accept PCRs > 23 from firmware event log
Let's harden ourselves against shitty firmware which might report an
invalid PCR.

(This is not really a security issue, more a robustness issue, after all
firmware generally comes with highest privileges and trust, even though
it might just be shit)

Fixes an issue found with Claude code review
2026-03-12 14:43:47 +01:00
Ivan Kruglov 6eab41c813 test: use --nogpgcheck instead of --no-gpgchecks in TEST-88-UPGRADE
--no-gpgchecks was introduced in 9204838724 but is only available in
dnf5. Use --nogpgcheck instead, which is supported by both dnf4 and
dnf5 (where it is an alias for --no-gpgchecks).

Fixes test failure on distros still using dnf4 (e.g. CentOS/RHEL 9).

Co-developed-by: Claude <claude@anthropic.com>
2026-03-12 13:40:05 +00:00
Zbigniew Jędrzejewski-Szmek 10a1043216 cleanups for machined/nspawn (#41060) 2026-03-12 09:39:30 +01:00
Rito Rhymes e5a6cc3a6f docs: contain image sizing and prevent overflow on mobile
`max-width: 100%` keeps images from expanding beyond
their container and creating horizontal overflow scroll
on small screens.

`height: auto` ensures the image scales proportionally
when width is adjusted.
2026-03-12 09:38:03 +01:00
Rito Rhymes f18df62e71 docs: wrap bare enum constants in inline code in JOURNAL_FILE_FORMAT 2026-03-12 09:37:24 +01:00
Zbigniew Jędrzejewski-Szmek 796a1d7616 Fix text overflow for long URLs and inline code blocks (#41064)
## Summary
Long string URLs and inline code blocks can exceed page width and cause
horizontal scroll overflow that breaks page layouts on smaller screens.
This fix ensures those long strings can wrap down as needed to preserve
the layout. The only code blocks that are affected are those that are
inline span within text paragraphs and are effectively stylized text; it
does not affect `<pre>` code blocks where fidelity is prioritized and
contained horizontal scroll is preferred.


## Before and After Screenshots

### `/TPM2_PCR_MEASUREMENTS/` code overflow

**BEFORE**
<img width="400" height="770" alt="TPM2-before"
src="https://github.com/user-attachments/assets/87da9d7a-d757-4fe0-9496-5c17ce31a14e"
/>

<br /><br />

**AFTER**
<img width="400" height="770" alt="TPM2-after"
src="https://github.com/user-attachments/assets/e48ba635-6c73-46a7-a29a-673a253fa76b"
/>

### `/PRESET/` URL overflow

**BEFORE**
<img width="400" height="776" alt="PRESET-before"
src="https://github.com/user-attachments/assets/da4a6346-c53b-4ce0-9ec8-8e58b634174e"
/>

<br /><br />

**AFTER**
<img width="400" height="776" alt="PRESET-after"
src="https://github.com/user-attachments/assets/be5fa824-4891-46ac-9f6e-08490cda8bd9"
/>
2026-03-12 09:36:32 +01:00
Rito Rhymes f9d4dce604 docs: allow long inline code to wrap to prevent overflow on mobile 2026-03-12 00:22:19 -04:00
Rito Rhymes 4443626b16 docs: allow long links to wrap to prevent overflow on mobile 2026-03-12 00:22:19 -04:00
Luca Boccassi 7b85f5498a nspawn: normalize pivot_root paths
Originally reported on yeswehack.com as:
YWH-PGM9780-116

Follow-up for b53ede699c
2026-03-12 00:24:01 +00:00
Luca Boccassi 61bceb1bff nspawn: apply BindUser/Ephemeral from settings file only if trusted
Originally reported on yeswehack.com as:
YWH-PGM9780-116

Follow-up for 2f89304490
Follow-up for a2f577fca0
2026-03-12 00:24:01 +00:00
Luca Boccassi 6df5f80bd3 machined: reject invalid class types when registering machines
Follow-up for fbe550738d
2026-03-12 00:24:01 +00:00
Mikhail Novosyolov 43cca8348a hwdb/keyboard: fix Positron vendor location
Move lines without changing them.
Fixes: 9aad3336f ("hwdb/keyboard: Map FN key on Positron Proxima 15")
(https://github.com/systemd/systemd/pull/40929)
2026-03-12 05:14:15 +09:00
Luca Boccassi 415663a13a core: limit number of LogExtraFields (#41044)
We have two places where those fields can be set: config and the dbus
interface. Let's clamp down on the number in both places. But in
principle, we could also be upgrading (through
serialization/deserialization) from an older systemd which didn't
enforce this limit, so also check on deserialization. A user could have
a unit with lots and lots of ExtraFields, but not enough to cause the
issue in #40916. To handle this gracefully, ignore the extra fields,
like we do in the parser. Where the field is used, assert that we are
within the expected bounds.

Fixes #40916.

Reproducer:
```console
$ python3 -c 'from pydbus import SystemBus; from gi.repository import GLib; SystemBus().get("org.freedesktop.systemd1", "/org/freedesktop/systemd1").StartTransientUnit("crash.service", "fail", [("ExecStart", GLib.Variant("a(sasb)", [("/bin/true", ["/bin/true"], False)])), ("LogExtraFields", GLib.Variant("aay", [b"F%d=x" % i for i in range(140000)]))], [])' Traceback (most recent call last):
  File "<string>", line 1, in <module>
    from pydbus import SystemBus; from gi.repository import GLib; SystemBus().get("org.freedesktop.systemd1", "/org/freedesktop/systemd1").StartTransientUnit("crash.service", "fail", [("ExecStart", GLib.Variant("a(sasb)", [("/bin/true", ["/bin/true"], False)])), ("LogExtraFields", GLib.Variant("aay", [b"F%d=x" % i for i in range(140000)]))], [])
                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/pydbus/proxy_method.py", line 102, in __call__
    raise error
  File "/usr/lib/python3.14/site-packages/pydbus/proxy_method.py", line 97, in __call__
    result = instance._bus.con.call_sync(*call_args)
gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Too many extra log fields. (16)
```
2026-03-11 19:40:43 +00:00
Lennart Poettering 4b551035b4 measure-tool: always sign with SHA256
We should not use the bank algorithm for the signing, as we only support
validating via SHA256. Fix that.

Fixes: #40245
2026-03-11 18:40:57 +00:00
Luca Boccassi af62b9c5b0 include diskseq in dissection verity DM devices (#41050) 2026-03-11 17:28:20 +00:00
Lennart Poettering 1b364f8b53 sd-ndisc: fix address family check
Issue reported by zhengg-research
2026-03-11 18:25:28 +01:00
Zbigniew Jędrzejewski-Szmek 18031b17f8 TEST-07-PID1: add small test for LogExtraFields 2026-03-11 18:09:27 +01:00
Zbigniew Jędrzejewski-Szmek 3105286f25 core/unit: shorten code
I wanted to use _cleanup_(unlink_tempfilep), but the type doesn't
match (char ** vs. char (*)[]), so the goto remains.
2026-03-11 18:09:27 +01:00
Zbigniew Jędrzejewski-Szmek 456a277d3f core: limit number of LogExtraFields
We have two places where those fields can be set: config and the dbus
interface. Let's clamp down on the number in both places. But in principle, we
could also be upgrading (through serialization/deserialization) from an older
systemd which didn't enforce this limit, so also check on deserialization. A
user could have a unit with lots and lots of ExtraFields, but not enough to
cause the issue in #40916. To handle this gracefully, ignore the extra fields,
like we do in the parser. Where the field is used, assert that we are within
the expected bounds.

Fixes #40916.

Reproducer:
$ python3 -c 'from pydbus import SystemBus; from gi.repository import GLib; SystemBus().get("org.freedesktop.systemd1", "/org/freedesktop/systemd1").StartTransientUnit("crash.service", "fail", [("ExecStart", GLib.Variant("a(sasb)", [("/bin/true", ["/bin/true"], False)])), ("LogExtraFields", GLib.Variant("aay", [b"F%d=x" % i for i in range(140000)]))], [])'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    from pydbus import SystemBus; from gi.repository import GLib; SystemBus().get("org.freedesktop.systemd1", "/org/freedesktop/systemd1").StartTransientUnit("crash.service", "fail", [("ExecStart", GLib.Variant("a(sasb)", [("/bin/true", ["/bin/true"], False)])), ("LogExtraFields", GLib.Variant("aay", [b"F%d=x" % i for i in range(140000)]))], [])
                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/pydbus/proxy_method.py", line 102, in __call__
    raise error
  File "/usr/lib/python3.14/site-packages/pydbus/proxy_method.py", line 97, in __call__
    result = instance._bus.con.call_sync(*call_args)
gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Too many extra log fields. (16)
2026-03-11 18:09:27 +01:00
Luca Boccassi 0c67b8adcb core: fix reloading multiple confexts at the same time
[] has higher precedence than pointer dereference, hence hilarity
ensues as soon as there are multuple images

Originally reported on yeswehack.com as:
YWH-PGM9780-122

Follow-up for dfdeb0b1cb
2026-03-11 16:54:33 +00:00
Daan De Meyer 2f5cecd7de dbus-cgroup: Fix copy paste error
Let's set the appropriate field for ManagedOOMMemoryPressureDurationUSec=
and not a totally different one.
2026-03-11 16:53:36 +00:00
Zbigniew Jędrzejewski-Szmek 7c4047957e udev-builtin-net-id: print cescaped bad attributes
Follow-up for 16325b35fa. Let's
log those bad value to make it easier to figure out why things
are not working if we reject an attribute.
2026-03-11 16:53:04 +00:00
Lennart Poettering 15e9fbc769 dissect-image: include diskseq in DM names, to avoid any name clashes 2026-03-11 17:08:06 +01:00
Lennart Poettering e5924c6ecc dissect-image: don't do path based ops on a non-path
Also, better use path_extract_filename() when extracting filenames
from paths.

Also, why void* for the 'base' parameter?
2026-03-11 17:07:45 +01:00
Luca Boccassi b9cb90743d boot: impose section limit when loading PE from memory too
pe_section_table_from_file already checks with SECTION_TABLE_BYTES_MAX,
do the same in pe_section_table_from_base() just in case.

Originally reported on yeswehack.com as:
YWH-PGM9780-117

Follow-up for f4e081051d
2026-03-11 13:41:21 +00:00
Zbigniew Jędrzejewski-Szmek 44b050fe76 udev: various cleanups and sanitizations (#40983) 2026-03-11 11:06:53 +01:00
Lennart Poettering 6bb70ef95c update TODO 2026-03-11 10:35:38 +01:00
Zbigniew Jędrzejewski-Szmek bdf95e1f80 Chores for RC3 (#41023) 2026-03-11 08:34:42 +01:00
Dylan M. Taylor c72860d5f6 userdb: mark PII fields as sensitive in user records
Mark realName, emailAddress, and location as sensitive in JSON user
records so that they are excluded from debug log output. These fields
contain personally identifiable information that should not be leaked
in logs, which are generally more accessible than the user database
itself.
2026-03-11 10:22:27 +09:00
Yu Watanabe a1d806efcb sd-dhcp-client: several fixlets for sending RELEASE or DECLINE (#41002)
Fixes #39299.
2026-03-11 10:17:44 +09:00
Yu Watanabe 5188882fbf test-network: add test case for sending DHCPv4 RELEASE message 2026-03-11 08:45:28 +09:00
Yu Watanabe 6eaa5ba322 sd-dhcp-client: several fixlets for sending RELEASE or DECLINE
- Extract common logic to client_send_release_or_decline().
- Do not send DECLINE message on BOOTP protocol.
- Drop redundant assignment of chaddr, as it is already set by
  client_message_init() -> dhcp_message_init().
- Do not assign acquired address in ciaddr field of DECLINE message,
  but use Requested IP Address option.
- Broadcast DECLINE message, rather than unicast.
- Set server identifier in both cases.

Fixes #39299.
2026-03-11 08:45:24 +09:00
Rodrigo Campos b27e17d762 portable: Test pinning a single fstype on an GPT image with verity
This tests a GPT image with a single fstype using verity. This was
broken and fixed by the previous commit.
2026-03-10 22:33:31 +01:00
Rodrigo Campos 59e6b68fea dissect: Don't bypass blkid *_lookup_value() to decide USAGE
After commit "core: reuse existing dm-verity device for single
filesystem images pinned by policy" (0bd766553c), when I attach a
portable image (erofs+verity) and try to start a service, it fails with:

  Partition root discovered with policy 'unprotected' but 'verity+read-only-on+growfs-off+erofs' was required, refusing.
  Failed to dissect image: Operation not possible due to RF-kill

The image does have verity, in fact the RootImagePolicy= field was added
automatically.

The inconsistency between what is found at attach vs when starting the
service comes from the fact that dissect_image() is called with a
different policy as parameter and the recent shortcut added.

At attach we do this:

dissect_image(policy="*")
    partition_policy_determine_fstype(policy)
      partition_policy_flags_to_string(...) // mask is 0, returns 0
    -> returns NULL // root_fstype_string is not set
    if (root_fstype_string) // false
      sym_blkid_probe_lookup_value()...

At start, as we do have the policy set, we do:

dissect_image(policy="root=verity+...+erofs:root-verity=...")
    partition_policy_determine_fstype(policy)
      partition_policy_flags_to_string(...) // returns 1
    -> sets root_fstype_string to "erofs"
    if (root_fstype_string) // true
       usage = "filesystem"

Then, the service is blocked to start with the aforementioned error.

It's correct for partition_policy_determine_fstype() to set erofs in
that case, and other callers seem to expect this behavior on similar
cases, but what is not correct is to assume that this means it's a
filesystem. Usage in this case should still be unset.

Let's just always do the lookup, as that gets us the correct answer reliably
and we already did the slow part that is the probe.

The call to `sym_blkid_do_safeprobe()` is a few lines above. The call to
the lookup function isn't very expensive. blkid_probe_lookup_value()[1]
calls __blkid_probe_lookup_value(), which searches on a list[2], IIUC in
memory and no IO is used. It's a linear search of the property.

[1]: https://github.com/util-linux/util-linux/blob/0fd08f19e7a3bc37509491d06a664cfb47be7cd8/libblkid/src/probe.c#L2299
[2]: https://github.com/util-linux/util-linux/blob/0fd08f19e7a3bc37509491d06a664cfb47be7cd8/libblkid/src/probe.c#L2343
2026-03-10 22:33:31 +01:00
Michael Vogt 9a0c83f7e3 sd-boot: fix silly copy/paste mistake
This fixes a very silly copy/paste mistake in 3f95881 - sorry for
that and thanks to Raul Tambre  for reporting.

Closes https://github.com/systemd/systemd/issues/40844
2026-03-10 22:31:37 +01:00
Luca Boccassi 45a200cd75 udev: ensure tag parsing stays within bounds
This cannot actually happen, but add a safety check nonetheless.

Reported on yeswehack.com as:
YWH-PGM9780-43

Follow-up for d7867b3183
2026-03-10 21:29:14 +00:00
Luca Boccassi 69e4ba69d6 udev: ensure there is space for trailing NUL before calling sprintf
sprintf will write 5 characters, as it adds a trailing NUL byte.

Reported on yeswehack.com as:
YWH-PGM9780-62

Follow-up for 8cfcf9980a
2026-03-10 21:29:14 +00:00
Luca Boccassi 16325b35fa udev: check for invalid chars in various fields received from the kernel 2026-03-10 21:29:14 +00:00
Zbigniew Jędrzejewski-Szmek 9a512d5a66 sd-device: refuse properties with invalid characters (#41001) 2026-03-10 22:19:32 +01:00