Commit Graph
86527 Commits
Author SHA1 Message Date
Luca Boccassi 1cd2ff3cca stub: more hardening against malformed images
Avoid issues with malformed images.

Reported on various yeswehack.com reports

YWH-PGM9780-73
YWH-PGM9780-68
YWH-PGM9780-67
YWH-PGM9780-87
2026-02-18 15:05:44 +00:00
Daan De Meyer cec9eb5e7e vmspawn: Don't keep tpmstate around in auto mode if ephemeral 2026-02-18 15:18:58 +01:00
Zbigniew Jędrzejewski-Szmek ba67af7efb Bump minimum version of python to 3.9 (#40711) 2026-02-18 13:33:29 +01:00
Luca Boccassi a23d89065a bash completion: various machinectl/portablectl fixes (#40719) 2026-02-18 11:08:29 +00:00
dependabot[bot] 20b2224a7c build(deps): bump super-linter/super-linter in the actions group
Bumps the actions group with 1 update: [super-linter/super-linter](https://github.com/super-linter/super-linter).


Updates `super-linter/super-linter` from 8.4.0 to 8.5.0
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/12562e48d7059cf666c43a4ecb0d3b5a2b31bd9e...61abc07d755095a68f4987d1c2c3d1d64408f1f9)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-version: 8.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-18 19:54:44 +09:00
Luca Boccassi 5137d58c22 bash completion: add --user/--system to portablectl 2026-02-18 10:40:12 +00:00
Luca Boccassi 28846f4e62 bash completion: add missing machinectl parameters 2026-02-18 10:40:12 +00:00
Luca Boccassi 3f618b8851 bash completion: fix machinectl completion when mixing machines and files 2026-02-18 10:39:38 +00:00
Luca Boccassi 5b6516f81e bash completion: add --system/--user to machinectl 2026-02-18 10:39:38 +00:00
Luca Boccassi 6fdc22f933 ci: set dependabot cooldown period, disable persisting credentials for actions/checkout (#40728)
github/dependabot: set cooldown period
github/workflows: disable persisting credentials for actions/checkout
2026-02-18 10:39:11 +00:00
Yu Watanabe d0e1f58200 metrics: add networkd related metrics (#40619)
This adds support for networkd related metrics. The output looks like this:
```
{
	"name" : "io.systemd.Network.addressState",
	"object" : "lo",
	"value" : "off"
}
{
	"name" : "io.systemd.Network.adminState",
	"object" : "lo",
	"value" : "unmanaged"
}
{
	"name" : "io.systemd.Network.carrierState",
	"object" : "lo",
	"value" : "carrier"
}
{
	"name" : "io.systemd.Network.ipv4AddressState",
	"object" : "lo",
	"value" : "off"
}
{
	"name" : "io.systemd.Network.ipv6AddressState",
	"object" : "lo",
	"value" : "off"
}
{
	"name" : "io.systemd.Network.managedInterfaces",
	"value" : 0
}
{
	"name" : "io.systemd.Network.operationalState",
	"object" : "lo",
	"value" : "carrier"
}
```
2026-02-18 19:26:55 +09:00
Yu Watanabe ef6c8c79dc Revert "check-os-release.py compatible with Python < 3.8"
This reverts commit ce0a056abc.
2026-02-18 18:47:15 +09:00
Yu Watanabe 08719d0e78 Revert "tools: make update-dbus-docs compatible with Python 3.7"
This reverts commit 668b3a42fe.

Now we require Python 3.9 or newer.
2026-02-18 18:47:15 +09:00
Yu Watanabe 7ff27c8012 Revert "generate-bpf-delegate-configs: fix compatibility with Python 3.7"
This reverts commit dee77ac201.

Now we require Python 3.9 or newer.
2026-02-18 18:47:15 +09:00
Yu Watanabe 3aaa9d9882 Revert "meson: fix compatibility with Python 3.7"
This reverts commit 2793d6acf0.

Now we require Python 3.9 or newer.
2026-02-18 18:47:15 +09:00
Jörg Behrmann 761f1ef2f3 Bump minimum version of python to 3.9
This was announced in fd8c620751 and every
still-supported distributo release provides at least 3.9, as tracked by #38608.
2026-02-18 18:47:15 +09:00
Yu Watanabe 582d499e32 meson: ukify unconditionally requires pefile module
Follow-up for 3fc5eed470.
2026-02-18 18:47:15 +09:00
Yaping Li 23c639be6d metrics: add networkd related metrics 2026-02-18 17:58:33 +09:00
Yu Watanabe 69f75cd896 network: use higher log level when we cannot bind resolve hook varlink socket 2026-02-18 17:57:32 +09:00
Yu Watanabe 6109cf8b61 meson,test: sort unit files 2026-02-18 17:57:17 +09:00
Dmitry V. Levin 6461eccacb github/workflows: disable persisting credentials for actions/checkout
Set `persist-credentials: false` for actions/checkout.

By default, using `actions/checkout` causes a credential to be persisted on
disk.  Subsequent steps may accidentally publicly persist the credential, e.g.
by including it in a publicly accessible artifact via actions/upload-artifact.
However, even without this, persisting the credential on disk is non-ideal
unless actually needed.

Link: https://docs.zizmor.sh/audits/#artipacked
2026-02-18 08:00:00 +00:00
Dmitry V. Levin 31fc68a69a github/dependabot: set cooldown period
By default, Dependabot does not perform any cooldown on dependency updates.
In other words, a regularly scheduled Dependabot run may perform an update
on a dependency that was just released moments before the run began.
This presents both stability and supply-chain security risks.

To mitigate these risks, explicitly set Dependabot cooldown period to 7 days.

Link: https://docs.zizmor.sh/audits/#dependabot-cooldown
2026-02-18 08:00:00 +00:00
Yu Watanabe 43c4ecc951 bootspec: add missing else
Otherwise, OOM error will never checked, and the "preferred" setting
always emits warning that the field is unknown.

Follow-up for 450e0dce02.
Fixes CID#1645063.
2026-02-18 06:37:44 +01:00
David Santamaría Rogado cad60201fc udev: rules: integration fix
ID_INTEGRATION is not being updated with hwdb entries, asign the new
value to it when hwdb has been imported.

We still need the 65-integration.rule assignment for devices that aren't
in hwdb.

While at it remove unneeded check in 70-touchpad.rules, as it was not
added for 70-joystick.rules with the statement if ID_INPUT_* is set and
ID_INPUT not, there is a bug elsewhere. And remove unneeded gotos in
both files.

Follow-up for a4381cae8b.
2026-02-18 11:51:02 +09:00
Daan De Meyer 10eaca4159 sysupdate: Use partition types for pending/partial partitions
Fixes #40658
2026-02-18 11:15:04 +09:00
Yu Watanabe d8da141348 README: mention about musl requirements 2026-02-18 11:04:14 +09:00
Oblivionsage 02cab70acf pe-binary: fix missing le16toh() on NumberOfSections in pe_hash/uki_hash
pe_hash() and uki_hash() pass pe_header->pe.NumberOfSections directly
to typesafe_qsort() and FOREACH_ARRAY() without le16toh(). On
big-endian (s390x), NumberOfSections=3 gets read as 0x0300 (768),
while pe_load_sections() correctly converts it and only allocates 3
sections. This makes qsort process 768 elements on a 3-element
buffer, causing a heap-buffer-overflow (confirmed with ASAN on
native s390x).

Wrap all three raw usages with le16toh() to match pe_load_sections().
2026-02-18 08:25:54 +09:00
Lennart Poettering a3af68b84d verity: measure all root hashes as we activate to a new NvPCR (#40648) 2026-02-17 23:44:46 +01:00
Lennart Poettering 3821e4d8fb update TODO 2026-02-17 22:00:14 +01:00
Lennart Poettering 521a523ce0 ci: add simple test that ensures the verity nvpcr measurements are made 2026-02-17 22:00:14 +01:00
Lennart Poettering a450fab9c6 gpt-auto-generator: enable nvpcr logic by default
Let's enable this kind of measurement by default if people buy into UKIs
and stuff, just like volume key measurement is now enabled by default.
2026-02-17 22:00:14 +01:00
Lennart Poettering 85d7fb2247 veritysetup: optionally measure Verity once we activated it
As in the previous commit, also enable the measurement logic when
activating Verity via veritsetup rather than the dissection logic.

The logic stays close to the interface of cryptsetup for measuring the
volume key.
2026-02-17 22:00:14 +01:00
Lennart Poettering 32f405074a dissect-image: measure Verity before making use of them
Let's hook up the dissection logic with the new measurement infra, and
issue the measurement after successfully unlock an image, but before
returning to the caller.

Note that ideally we'd do this measurement in the kernel, so that we can
place it after authenticating the root hash, but before activating the
medium. One day we should be able to do that via eBPF based on userspace
policies, but for now, this would require too much kernel rework.

Let's however make sure our measurements only contain data that the
kernel could know too, so that we hopefully can move these measurements
to the kernel without changing their formatting.
2026-02-17 22:00:14 +01:00
Lennart Poettering 71ca7532de pcrextend-util: add helpers for measuring roothash/signature of Verity volumes
This adds infrastructure for measuring Verity root hashes from
userspace, along with he issuer/serial of the signatures used to unlock
them.

We measure the triplet of volume name, root hash and issuer/serial. if
confext/sysext use different signing keys then this ensures the event
log carry information about the type of image measures.
2026-02-17 22:00:14 +01:00
Lennart Poettering 3f31c8ff46 pkcs7-util: add helpers for extracting signer info from PKCS7 signatures
Once we start measuring Verity volumes as we activate them we want to
include information about the signature keys used, so that we can have
distinct ones for confext and for sysext and ther purposes and thus have
a cryptograpically protected hint about the kind of image we have
activated in the event log.

Ideally we'd measure a fingerprint of the signing certificate here, but
we don't have that here typically (as PKCS7 signatures used here
typically do not embed that), hence use the next best thing: the issuer
name and the serial number.
2026-02-17 22:00:14 +01:00
Lennart Poettering 8485bba53d tpm2-setup: introduce nvpcr for measuring Verity images
I thnk it's crucial we start to measure Verity images as we activate
them, so that the event log has a full trace of the compisition of the
system. hence let's introduce a new NvPCR for this purpse, under the
name "verity".
2026-02-17 22:00:13 +01:00
Lennart Poettering 0a8f393c64 cryptsetup: extend HAVE_TPM2 conditioning to cover more
If TPM2 support is off, any check for TPM2 support will fail, hence we
can just suppress it.
2026-02-17 22:00:13 +01:00
Lennart Poettering be36f69c90 pcrextend: allow access to the userspace event type field when measuring something
It think we should move most measurements out of the individual tools
requesting them and into the pcrextend service via Varlink, so that
fewer components require access to the TPM.

This only works however, if we can actually write full-blown event log
records via this mechanism, and for that we still were missing access to
the userspace event type we insert into the event log. Add that.
2026-02-17 22:00:13 +01:00
Lennart Poettering d84d17853e cryptsetup: move default choice of nvpcr for keyslots from generator into cryptsetup
Let's pick the default NvPCR name to use inside of cryptsetup itself, instead
of in the generator. I think this is the better choice, since it means
the default can also be used if the regular verittab generator is used
instead of the gpt-auto generator.
2026-02-17 22:00:13 +01:00
r-vdp 450e0dce02 systemd-boot: add a preferred setting that's similar to default but avoids booting known-bad entries
Motivation:
Currently, when setting the default boot pattern, boot assessment status
is not taken into account. This means that with boot assessment enabled,
when an explicit boot entry is configured as the default entry using an
EFI var, as is common for instance in A/B boot schemes, the configured
entry will be booted indefinitly, regardless of the entry's boot
assessment status.
In order to allow for this use case in combination with boot assessment,
we introduce a new `preferred` keyword, both in the config file and in the
bootctl CLI, that acts very similar to the existing `default` keyword but
takes boot assessment into account and never selects any entries that
have been marked as bad.
If the preferred pattern does not resolve to any bootable entry, and a
default pattern is also specified, then the default pattern will be
considered next, and we may then still select a known-bad entry to be
booted.

Fixes: https://github.com/systemd/systemd/issues/31215
Fixes: https://github.com/systemd/systemd/issues/40192
2026-02-18 03:28:12 +09:00
Yu Watanabe 78a61335e3 boot: Fix UKI boot for kernels with non-zero ImageBase (#40429)
The current code incorrectly subtracts ImageBase from section
VirtualAddress values when loading sections into memory. This is based
on a misunderstanding of the PE specification.

VirtualAddress in section headers is the address of the first byte of
the section relative to the image base when the section is loaded into
memory. In other words, VirtualAddress is already an RVA measured from
the image base, it is definitely NOT an absolute address that needs to
be adjusted.

So when loading a PE image into a newly allocated buffer, sections
should be copied to buffer + VirtualAddress, regardless of what
ImageBase says. The ImageBase field merely indicates the *preferred*
load address, it does not affect how section RVAs are interpreted.

This happens to not cause issues when ImageBase was 0 (since
VirtualAddress - 0 = VirtualAddress), which is why this bug went
undetected on modern kernels. However, it fails with kernels that have
non-zero ImageBase values.

So let's remove the nonsensical VirtualAddress < ImageBase check, and
remove the ImageBase subtractions from section loading offsets. This
lets all kernel UKIs work properly again.

Fixes: #40342
2026-02-18 03:27:41 +09:00
Daan De Meyer e38fac0cc5 sd-bus: Make sure we can connect to user machines as well (#40698)
Don't unconditionally look into /run/systemd/machines. If we're a
connected to a session bus, look at the machines for the current user
instead.
2026-02-17 19:13:40 +01:00
Yu Watanabe a5e6f4f81d include: update kernel headers from v6.19 2026-02-18 02:46:05 +09:00
Zbigniew Jędrzejewski-Szmek 353701b07e boot: drop now-unused image_base param 2026-02-17 18:21:45 +01:00
Luca Boccassi 7496163080 dbus/varlink: do not skip privilege check when polkit support is disabled
There's not going to be any query if polkit support is
disabled at build time, so always check the peer's privileges
in that case

Follow-up for f5a12ceaed
2026-02-17 18:12:59 +01:00
Daan De Meyer 6119252f5a sd-bus: Don't fork unnecessarily to connect to container
Let's check if we're already in the right namespaces and call connect()
directly if that's the case. This can easily happen when the machine is
specified as .host or so.
2026-02-17 17:52:20 +01:00
Daan De Meyer a12c5bf4f5 sd-bus: Make sure we can connect to user machines as well
Don't unconditionally look into /run/systemd/machines. If we're a
connected to a session bus, look at the machines for the current user
instead.
2026-02-17 17:52:20 +01:00
Daan De Meyer 8d11835397 namespace-util: Do is_our_namespace() checks first in namespace_enter()
These checks may rely on /proc on older kernels which we could lose access
to by joining namespaces so let's do all the checks first and then join
namespaces.
2026-02-17 17:52:17 +01:00
Yu Watanabe b96f417ea6 xaccess: Rework from boolean into a list of tags (#40645)
Fixes: #40634
2026-02-18 01:24:59 +09:00
Zbigniew Jędrzejewski-Szmek bdf8bbf713 NEWS: clarify the change for non-system accounts in v260 vs. v259
In 5c05a339c6 I retroactively changed the NEWS
entry for v259. But this is very confusing, because it looks like the original
change never happened and it's not clear what is being reverted.

Let's restore the original text, and just add a short note, but then move
the new text to the section for v260.
2026-02-18 01:21:58 +09:00