Commit Graph
87100 Commits
Author SHA1 Message Date
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
Daan De Meyer 9a70fdcb74 ci: Add one more mcp tool to claude-review workflow 2026-03-10 21:36:20 +01:00
Daan De Meyer 45e4e035f7 ci: Only trigger claude review workflow on pr comments
The trigger for regular pr and issue comments is the same, so we
have to make sure we skip if it's an issue comment and not a pr
comment.
2026-03-10 21:02:36 +01:00
Daan De Meyer 55dd233797 ci: Update prompt to include a list of errors
To make debugging the review workflow easier, have claude include an
overview of errors encountered in the review summary.
2026-03-10 20:45:10 +01:00
Daan De Meyer b62b4c6973 ci: Give claude review read-only access to issues and pull requests
For retrieving previous review comments and extra details from issues
linked in the PR.
2026-03-10 20:45:10 +01:00
Daan De Meyer 60b3603b2d ci: Create claude review tracking comment before starting review
Let's create a comment to let the user know that the review is in
progress and then update that comment with the actual review later.
2026-03-10 20:23:54 +01:00
Daan De Meyer df7fefd6cc Various claude fixes (#41024) 2026-03-10 20:03:02 +01:00
Daan De Meyer 8f56e54a91 ci: Add workflow url to tracking comment in claude-review workflow
Simplifies debugging of failed claude-review workflows.
2026-03-10 19:58:17 +01:00
Daan De Meyer 1254f4f2d2 ci: Don't make a single failed review comment fail the entire job
Let's handle failure to post individual review comments gracefully.
Reduces the impact of failures like in
https://github.com/systemd/systemd/actions/runs/22904601370/job/66461528144.
2026-03-10 19:57:11 +01:00
Daan De Meyer d9cd9b2a1d ci: Update claude review prompt to insist on valid lines
Hopefully fixes the failure in
https://github.com/systemd/systemd/actions/runs/22904601370/job/66461528144.
2026-03-10 19:56:09 +01:00
Daan De Meyer 74c903a28f mount-util: Use new mount API in bind_mount_submounts() (#41008) 2026-03-10 19:49:10 +01:00
Cyrus Xi 9d15e09d5c core/cgroup: fix TasksMaxScale percentage serialization (#41011)
bus_cgroup_set_tasks_max_scale() used a hand-rolled percentage format
that produced values ~10x too small (e.g., "TasksMax=4.0%" instead of
"TasksMax=40.00%").

On daemon-reload, the incorrect value was re-read, silently reducing
the effective TasksMax by ~10x and causing fork rejections on systems
with high thread counts.

Fix by using the existing PERMYRIAD macros, consistent with memory
property handlers (MemoryMax, MemoryHigh, MemoryLow, etc.).

Fixes: #41009
2026-03-11 03:36:21 +09:00
Yu Watanabe f6857cfaf2 fuzz: fix typo
Follow-up for be0db50cad.
2026-03-11 03:23:53 +09:00
Luca Boccassi d42445763e Translations update from Fedora Weblate (#41021)
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-10 17:55:43 +00:00
Jesse Guo b15d769b38 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2026-03-10 17:30:13 +00:00
naly zzwd 7e0c26e0b2 po: Translated using Weblate (Catalan)
Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: naly zzwd <xeanhort007@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ca/
Translation: systemd/main
2026-03-10 17:30:13 +00:00
Marcel Leismann 9177786a5c po: Translated using Weblate (German)
Currently translated at 99.6% (265 of 266 strings)

Co-authored-by: Marcel Leismann <tiixrigjekfv@use.startmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main
2026-03-10 17:30:13 +00:00
Nandakumar Raghavan 6d7cb9a6b8 networkd: fix for networkd crash when client sends Option 82 via SendOption=
When a DHCP client uses SendOption=82:string:..., option_append() calls
the SD_DHCP_OPTION_RELAY_AGENT_INFORMATION case which was written for
the server relay path. It casts optval to sd_dhcp_server* and calls
strlen() on its members, but optval is actually raw binary data from
the client, causing SIGSEGV. The same is applicable when option 43 and
option 77 are passed to SendOption.

Fix by checking optlen > 0 and appending the option as a plain TLV,
skipping the server-specific relay agent logic.
2026-03-10 18:29:59 +01:00
Luca Boccassi 5647a19a58 nsresourced: downgrade benign log message to debug
This is very noisy as there's a dozen of these message every
time it gets called, and it's not really an error but an
expected situation, so downgrade from info to debug
2026-03-10 18:23:14 +01:00
Lennart Poettering a790339f8b update TODO 2026-03-10 18:19:49 +01:00
Luca Boccassi 62e8b0f9b5 NEWS: update contributors list 2026-03-10 17:12:18 +00:00
Luca Boccassi 7a0d0fe986 Update hwdb
ninja -C build update-hwdb
2026-03-10 17:12:18 +00:00
Luca Boccassi 128ff3582a mkosi: update debian commit reference to 56e0eed69a4782eb8e110650d93daebcf1ece49a
* 56e0eed69a Update changelog for 260~rc2-1 release
* 36e6a6d247 Install new files
* 692d0ffde5 Install new files for upstream build
* 04e77a9300 Enable getty@ via packaging scriptlets, not static anymore
* 65e7898ab5 Remove build-depend on rsync, meson is new enough
* 1ab5e82a93 Update changelog for 260~rc1-2 release
* 17a8004c53 sd-boot-efi: do not pick up hwids, they are shipped by sd-ukify
* b620f379b3 Update changelog for 260~rc1-1 release
* 8eb95fc404 Drop unused Lintian overrides
* 82a111e7ef Update symbols file for v260~rc1
* 9cb8e0457b Disable remaining deprecated sysv interfaces
* 100d97ba82 Install new files for v260~rc1
* b8e9e50f4d initramfs-tools: copy udev link files from /usr/local/lib/systemd/network too
2026-03-10 16:59:52 +00:00
Zbigniew Jędrzejewski-Szmek 0692870fe4 network: fix issue when configuring route (#41000)
Fixes #40106.
2026-03-10 17:14:15 +01:00