Commit Graph
89755 Commits
Author SHA1 Message Date
Marcel Ziswiler f620216633 boot: Fix gdb support for RISC-V
This will also allow debugging systemd-boot easily on RISC-V.

Note that the following much simpler variant won't work, as we might be missing
the optional 'zihintpause' extension:

    asm volatile("pause");

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@codethink.co.uk>
2026-06-15 07:23:22 +09:00
Yu Watanabe 4290607eae network: ignore stale interface renames (#42545)
Fixes #20203.
Fixes #42527.
2026-06-15 07:20:52 +09:00
Lennart Poettering 99d7ecea9d test-varlink-idl: add missing IDL files to test-varlink-idl
The test case is supposed to validate all IDLs we ship. But a bunch were
added to the tree without hooking them up here. Fix that.
2026-06-14 23:10:02 +01:00
Luca Boccassi 11bc593c68 sysupdate: reject short manifest hashes
unhexmem_full() ignores whitespace, so a 64-byte manifest digest field
can decode to fewer than 32 bytes. Reject that while parsing instead.

[   83.883087] TEST-72-SYSUPDATE.sh[5995]: systemd-sysupdate: ../src/src/sysupdate/sysupdate-resource.c:581: resource_load_from_web: Assertion `h.iov_len == sizeof(instance->metadata.sha256sum)' failed.

Follow-up for 43cc7a3ef4

Assisted-by: kres (claude-opus-4-7)
Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 06:59:24 +09:00
Chitoku 045e8f1c7b hwdb: add IMDS properties for Vultr 2026-06-14 10:34:58 +01:00
Lennart Poettering 3e8d470a94 update TODO 2026-06-14 07:13:10 +02:00
Luca Boccassi 2629c9c179 Assorted fixes (#40987) 2026-06-13 18:24:54 +01:00
Mike Yuan a9e5f5116e sd-daemon: escape notification msg using shell_escape()
Follow-up for f9e0a62392

xescape() would unconditionally emit hex escapes, rendering
\n unreadable.
2026-06-13 17:11:11 +02:00
Mike Yuan cd13dc16c3 core/execute-serialize: fix error handling 2026-06-13 17:11:11 +02:00
Mike Yuan 6f0731cf34 core/unit: refuse PrivatePIDs= + PAMName=
Fixes #40928
2026-06-13 17:11:11 +02:00
Mike Yuan 9be5a6f665 core/manager: add missing assertion on stop_notify_queue being empty
Follow-up for 1b4ab5a209
2026-06-13 17:11:10 +02:00
Mike Yuan a53d9a5794 namespace-util: add missing half of the assertion in is_our_namespace() 2026-06-13 17:11:10 +02:00
Luca Boccassi 73e9bf735c core: clear pending_reload_message_vl on manager varlink teardown
manager_varlink_done() tore down the varlink server without dropping the
queued reload reply, unlike bus_done_api() which unrefs
pending_reload_message_dbus. Unref it here too, so the slot consistently
mirrors the D-Bus side at teardown.

Follow-up for 55a1b36e91

Assisted-by: kres (claude-opus-4-7)
Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 17:06:41 +02:00
Chitoku 85afe8e82d vsock-util: allow VMADDR_CID_ANY as local CID if enabled in hwdb
On Hyper-V guests, `VMADDR_CID_ANY` is valid as per implementation in
kernel driver: net/vmw_vsock/hyperv_transport.c.

Fixes https://github.com/systemd/systemd/issues/42496

Follow-up for 83359c4da0
2026-06-13 15:54:50 +02:00
Yu Watanabe 4cf7298059 network: ignore stale interface renames
After enumeration, networkd may receive RTM_NEWLINK messages carrying a
stale interface name. This can happen when interface rename notifications
are queued before link enumeration and processed afterwards.

Previously, networkd could become confused by such a message and put the
corresponding Link into the failed state. Avoid this by checking whether
the new interface name is already in use by another interface and ignoring
the rename if so.

Fixes #20203.
2026-06-13 20:04:06 +09:00
Yu Watanabe c96f69e63c network: use hashmap_remove_value() on updating mapping for Link objects
E.g. on issue #20203, we may wrongly remove entry for another interface.
Let's mitigate issue on such situation for safety, though this does not
solve the issue.
2026-06-13 18:55:31 +09:00
Yu Watanabe 70d83c3d35 Revert "network: check the received interface name is actually new"
This reverts commit 176b8be10f.

The check introduced by the commit is racy, as when format_ifname() is
called, the interface may be already renamed (again) to another name.

This is typically problematic when we swap interface names:
```
ip link set aaa name tmpname
ip link set bbb name aaa
ip link set tmpname bbb
```
When networkd received the notification about name change aaa -> tmpname,
the interface is already renamed from tmpname to bbb. So, the reverted
logic skips updating Link.ifname:
```
aaa: New interface name 'tmpname' received from the kernel does not correspond with the name currently configured on the actual interface 'bbb'. Ignoring.
```
On the second notification about name change bbb -> aaa, networkd fails to
update the mapping Manager.links_by_name, as we skipped previous renaming
and the mapping still has an outdated entry for 'aaa'.
```
bbb: Interface name change detected, renamed to aaa.
aaa: Failed to manage link by its new name: File exists
aaa: Could not process link message: File exists
aaa: Failed
aaa: State changed: configured -> failed
```

By reverting the commit, the issue is fixed. But the commit intended to
fix another issue #20203. So this reintroduces #20203. Let's fix it
in a later commit.

Fixes #42527.
Reintroduces #20203.
2026-06-13 18:55:31 +09:00
Luca Boccassi 92e4afc4d3 ask-password: do not reuse flags across Varlink calls
The flags parameter is parsed into a global variable, which means
when there are multiple consecutive calls it is reused. Switch to
a local copy.

Follow-up for 066f6bfb62

Assisted-by: kres (claude-opus-4-7)
Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 09:39:28 +01:00
dongshengyuan 98852876dd journal: fix byte-order conversion in journal_file_append_data()
head_data_offset is declared as le64_t in journal-def.h, so it must be
assigned with htole64(p), not le64toh(p). All other le64_t field
assignments in this file (hash, next_hash_offset) consistently use
htole64().

On little-endian systems this makes no difference, but on big-endian
systems the field->data link would be stored with incorrect byte order,
corrupting journal file traversal.

Assisted-by: claude-opus-4-8 <noreply@anthropic.com>
2026-06-13 16:18:06 +09:00
Ivan Kruglov c925e405f3 pcrextend: skip measurement gracefully when the TPM can't be used
So far --graceful only short-circuited when no TPM was present at all (the
!tpm2_is_mostly_supported() check). If a TPM is present but can't actually be
used for the measurement we want, the measurement still failed hard. For
systemd-pcrextend instances ordered before sysinit.target this pushes the
system to degraded and blocks boot, which defeats the purpose of --graceful.

Make the two extend helpers report every "TPM is present-or-absent but cannot
be used for this measurement" condition with a single errno, -EOPNOTSUPP: no
usable PCR bank, no TPM device, missing crypto (e.g. AES-128-CFB), no NvPCR
support, and OpenSSL-less builds. tpm2_context_new_or_warn() reports a missing
device as -ENOENT, so each helper translates that to -EOPNOTSUPP at the call
site, keeping every errno single-meaning.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 15:39:32 +02:00
Lennart Poettering f61e1e5cf4 update TODO 2026-06-12 12:28:04 +02:00
Luke Na 4776c83db5 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (285 of 285 strings)

Co-authored-by: Luke Na <narukeu@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2026-06-12 11:26:29 +01:00
Luke Na 114600246b po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (285 of 285 strings)

Co-authored-by: Luke Na <narukeu@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2026-06-12 11:23:49 +02:00
Luca Boccassi 272200b0fb basic: use assert_se in alloca_safe()
Ensure it cannot get compiled out regardless of build options

Follow-up for 9e1a759903

Assisted-by: kres (claude-opus-4-7)
2026-06-12 11:21:58 +02:00
Yu Watanabe ff88bc06b4 network: fix log message
Use passed message string, rather than fixed "Forgetting".

Follow-up for a4feabd85d.
2026-06-11 16:32:25 +02:00
Nick Rosbrook 55ba38cefc test: fix check for updatectl
The have_updatectl variable is meant to gracefully handle the case where
updatectl is missing. But, because the script runs with -e, it fails
immediately in that case instead. Moreover, expanding $have_updatectl
when it is present actually executes updatectl, rather than simply
checking for its existence.

Re-factor this check so that it does handle a missing updatectl.
2026-06-11 15:17:36 +01:00
dongshengyuan 54efd4a984 po: update-uyghur-translation 2026-06-11 09:58:38 +01:00
dongshengyuan 202d29f067 po: update-tibetan-translation 2026-06-11 09:58:15 +01:00
ButterflyOfFire 9ce7a3a520 po: Translated using Weblate (Kabyle)
Currently translated at 39.6% (113 of 285 strings)

Co-authored-by: ButterflyOfFire <butterflyoffire@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kab/
Translation: systemd/main
2026-06-11 09:57:42 +01:00
Yu Watanabe 49d22fefcb mkosi: extract common build settings
This also makes mkosi.functions included after the trivial execution checks.
2026-06-11 10:32:19 +02:00
Daan De Meyer c7eebff27e Revert "ci: migrate Claude review workflow to Fable 5"
This reverts commit 487770118f.

We need a setting change in AWS bedrock before Fable can be 
enabled, so revert for now.
2026-06-11 10:24:46 +02:00
Yu Watanabe 6fb1698e3b sd-netlink: fix use-after-free
When a slot is disconnected, previously we tried to remove the slot from
the hashmap with a wrong key. Hence, the pointer to the freed slot object
remained in the hashmap.
2026-06-11 09:44:55 +02:00
Luca Boccassi 36562b721e sd-varlink: disable event source in varlink_server_socket_free()
The cleanup destructor for VarlinkServerSocket only freed ss->address and
the struct, leaking ss->event_source. If sd_varlink_server_listen_address()
hits OOM at free_and_strdup() after the io-source was already armed, the
source stays registered in the event loop with userdata pointing at the
freed socket. Disable it before freeing; the call is a no-op when the
source was never armed, so the other freep sites are unaffected.

Follow-up for c14e841f31

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 09:44:23 +02:00
Yu Watanabe c3a6807a96 network: drop nonexisting section name
Follow-up for a0e5c15d4f.
2026-06-11 09:43:27 +02:00
Luca Boccassi 39bc1dfa0f bus-map-properties: reject wrong variant type
bus_message_map_all_properties() fed the peer-supplied wire signature straight
into the variant dispatch and never compared it against the declared
prop->signature, so map_basic() wrote at the wire type's native width into a
slot sized for the declared type (over-wide numeric writes, peer-controlled
pointers into char** slots later freed by strv_free()). Compare against
prop->signature and skip the variant on mismatch.

This is in practice not a problem as the servers are trusted, and this
only affects clients.

Follow-up for 9f6eb1cd58

Assisted-by: kres (claude-opus-4-7)
Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 09:43:09 +02:00
Luca Boccassi 0aaba6eb83 network: fix modem Bearers/Ports property signatures
The Bearers and Ports entries in the WWAN modem property maps declared
signatures "a{sv}" and "a{su}", but the callbacks read "ao" and "a(su)".
The mismatch was harmless while the declared signature was never checked,
but becomes a dropped property once it is enforced. Declare the actual
signatures.

Follow-up for f8a4c3d375
2026-06-11 09:43:09 +02:00
Luca Boccassi 7cc0f65d63 analyze: fix SoftRebootsCount property signature
The SoftRebootsCount entry in the boot-times map declared signature "t" but the
manager exports it as "u". The mismatch was harmless while the declared signature
was never checked, but becomes a dropped property once it is enforced. Declare "u".

Follow-up for 259046cfe8
2026-06-11 09:43:09 +02:00
Luca Boccassi 7827db326f analyze: fix SystemCallFilter property signature
The SystemCallFilter entry in the security info map declared signature "(as)" but
its property_read_system_call_filter callback reads a "(bas)" (the manager exports
it as "(bas)"), matching the sibling RestrictAddressFamilies entry. The mismatch was
harmless while the declared signature was never checked, but becomes a dropped
property once it is enforced. Declare "(bas)".

Follow-up for ec16f3b6dd
2026-06-11 09:43:09 +02:00
Luca Boccassi 441514184f systemctl: fix InvocationID property signature
The InvocationID entry in status_map declared signature "s" but its bus_map_id128
callback reads an "ay" (the manager exports it as "ay"), matching the other
bus_map_id128 callers. The mismatch was harmless while the declared signature was
never checked, but becomes a dropped property once it is enforced. Declare "ay".

Follow-up for f1d345ed76
2026-06-11 09:43:09 +02:00
Daan De Meyer 487770118f ci: migrate Claude review workflow to Fable 5
Switch the model used by the Claude review workflow from Opus 4.8 to
Fable 5, both for the top-level invocation and the review subagents.

Co-developed-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 23:36:49 +01:00
Christian Brauner efd0173f37 oom: use cgroup.kill if available (#42373)
The log message is informational only, same as the count of killed
processes, so we can safely use cgroup.kill when available instead
of manually recursing through the cgroup tree.
2026-06-10 21:56:01 +02:00
mburucuyapy 047dd36e77 Update 60-sensor.hwdb - Add support for Juno Tab 4 (Wifi) 2026-06-10 16:38:35 +01:00
Luca Boccassi aeaea4e62f Translations update from Fedora Weblate (#42525)
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-06-09 11:26:16 +01:00
Léane GRASSER f00f7fd2b8 po: Translated using Weblate (French)
Currently translated at 100.0% (285 of 285 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2026-06-09 09:04:23 +00:00
ButterflyOfFire cc0ae5671a po: Translated using Weblate (Kabyle)
Currently translated at 37.8% (108 of 285 strings)

Co-authored-by: ButterflyOfFire <butterflyoffire@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kab/
Translation: systemd/main
2026-06-09 09:04:22 +00:00
Paul Meyer af44888d22 man: fix systemd-stub .hwids section to be a singleton
Only .dtbauto and .efifw may appear more than once, .hwids is a
singleton per the UKI specification and the stub reads a single .hwids
section (per profile), matching hardware IDs against entries within it.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2026-06-09 09:33:59 +02:00
Liu Zhangjian b61902904e resolve: use correct hostname for Cloudflare DNS-over-TLS
The Cloudflare DNS-over-TLS service should use 'one.one.one.one'
as the TLS hostname, not 'cloudflare-dns.com' (which is only
correct for DNS-over-HTTPS).

This matches Cloudflare's official documentation:
https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-tls/

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>

Fixes #42287

Signed-off-by: Liu Zhangjian <liuzhangjian@uniontech.com>
2026-06-09 09:19:14 +02:00
Yu Watanabe 33faf6e070 fuzz-dhcp-client: do not trigger assertion on building payload
Fixes oss-fuzz#521277316 (https://issues.oss-fuzz.com/issues/521277316).
Fixes #42516.
2026-06-08 20:29:59 +01:00
Icenowy Zheng a1190f5c99 boot: enable only IMAFDCZicsrZifencei for RISC-V
The UEFI specification only defines A/C/I/M/Zicsr/Zifencei as mandatory
extensions in boot services. However, on systems with everything built
with F/D support, its difficult to disable F/D without changing a
toolchain. In addition, both EDK2 and U-Boot enable F/D on boot,
although they neither enable nor disable V. EDK2 comments even claim the
enablement of FPU is "to be compliant with UEFI spec" despite the spec
requires dynamic detection before using F/D.

Add corresponding -march flags to prevent systemd-boot from using other
extensions on RISC-V, and a comment for the temporary enablement of F/D.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
2026-06-08 16:49:26 +01:00
Chris Down a518180f6b core: Don't silently succeed on UserNamespacePath= join failures (#42512)
These also need to set exit_status so that sd-executor returns the right
thing to pid1.
2026-06-08 20:34:20 +09:00