Commit Graph
86504 Commits
Author SHA1 Message Date
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
Yu Watanabe b11e07c607 man: fix typo 2026-02-18 01:00:04 +09:00
Zbigniew Jędrzejewski-Szmek c44446fe31 NEWS,man: mark systemd-report as experimental
I expect that we'll need to make incompatible changes to
all of this, so let's mark things appropriately.
2026-02-17 16:55:32 +01:00
Yu Watanabe 1f8fefd7de memstream-util: fix doubled %m
Follow-up for abe72100cf.
2026-02-18 00:47:25 +09:00
Daan De Meyer 3791710f44 namespace-util: Add extra debug logging 2026-02-17 16:44:37 +01:00
Daan De Meyer 5045a28ae1 coredump: Use error log level in coredump_send_to_container() 2026-02-17 16:44:35 +01:00
Yu Watanabe 5004500c4b NEWS: mention -Dcompat-sysv-interfaces=BOOL meson option 2026-02-18 00:37:47 +09:00
Yu Watanabe 8c648adeae NEWS: -Dlibiptc= meson option has been deprecated since v259 2026-02-18 00:37:47 +09:00
Luca Boccassi 5f2ed2680f NEWS: note new varlink method 2026-02-17 15:38:16 +00:00
Luca Boccassi 9175b93083 NEWS: fix typo 2026-02-17 15:35:40 +00:00
Mike Yuan 1f0749c5f3 NEWS: correct descriptions for bootctl/networkd's varlink interfaces 2026-02-17 16:27:06 +01:00
Mike Yuan 888b385c54 NEWS: two additions for pid1 2026-02-17 16:26:36 +01:00
Mike Yuan b52a202b61 sd-json: fix doubled space 2026-02-17 16:26:36 +01:00
Mike Yuan 603a899720 resolved-dns-scope: fix typo 2026-02-17 16:26:36 +01:00
Yu Watanabe 5d26cb9c1b NEWS: fix typo 2026-02-18 00:20:55 +09:00
Jörg Behrmann 9c5efad4c5 news: fix typos 2026-02-18 00:21:51 +09:00
Zbigniew Jędrzejewski-Szmek 245909680d NEWS: initial list of changes for v260 2026-02-17 15:35:50 +01:00
Zbigniew Jędrzejewski-Szmek 3a4158ce63 NEWS: corrections/rewordings 2026-02-17 15:35:50 +01:00
Alessandro Astone 2f5279d34b udev: Tag GPU render nodes as xaccess-render 2026-02-17 15:27:24 +01:00
Alessandro Astone 1f7f2bc610 xaccess: Rework from boolean into a list of tags
XDG_SESSION_EXTRA_DEVICE_ACCESS will now take a colon-separated list of
identifiers. For every identifier $ID, the session is granted access to all
devices tagged as "xaccess-$ID" in udev.

Fixes: #40634
2026-02-17 15:27:24 +01:00
AsciiWolf b170564b7b hwdb: add Vernier Go Direct sensors 2026-02-17 23:27:01 +09:00
Yu Watanabe ff33e755e8 Fixes & improvments for using homed-luks on 4k disks (#35776)
Mostly consists of fixes to 

- use the same sector_size as the fdisk context we are using, when
converting between sectors returned by libfdisk to bytes. Fixes #30394 ,
Fixes #30393
- Use the explicit sector size if specified in the home record when are
probing the image file using libblkid. Fixes #30393

Also contains some other improvements with using physical block devices.

- Automatically probe sector size of physical block device, if user does
not pass luks-sector-size explicitly.
- Assign partitions to 1 MiB boundaries, as it is the standard practice
followed by all tools, fdisk, gptfdisk, gnu parted etc.
- Avoid stacking of loop device on top of physical block device in
home_create_luks as it leads to degradation of discard operations, and
mkfs getting stuck.
2026-02-17 23:23:23 +09:00
Yu Watanabe cfd544af86 Sensor cleanup 1st pass (#40675)
This is a general cleanup of the sensors hwdb file divides into several
commits per brand.

I have merged the devices that use the same matrices, clean up a little
some clear dmi matches, and apply a inline comment with the device where
is certainly very clear way to display.

My idea is to do more cleanup steps but actually will require more
effort to achieve complete dmis, I can do it with little time, and some
consensus for comment styling.

About the comment styling actually I thing we could follow two rules at
the same time: inline comment when the dmi match is short and there is
no additional many information than just the model, and the other one
comment above the dmi match when is too long or there are need to add
more info.
2026-02-17 22:20:38 +09:00
scarlet-storm 48b9d7e980 Use sectorsize for partition tables on block devs
Fix for specific case #30393 where 4k sector luks container is created
on a 512b device. In this case the partition table needs to be 512b,
else the kernel will not be able to find the partition, and we will
have to create a loop device to translate the partition table to 4k.
2026-02-17 18:23:35 +05:30