]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 days agotmpfiles: inherit age-by for X entries 43031/head
dongshengyuan [Wed, 15 Jul 2026 05:35:57 +0000 (13:35 +0800)] 
tmpfiles: inherit age-by for X entries

X entries inherit the cleanup age from the closest parent directory rule.
Inherit the age-by fields too, so parent rules such as m:1d keep their
full cleanup policy.

Reproducer:
  mkdir -p /tmp/tmpfiles-ageby/parent/{child,other}
  printf old >/tmp/tmpfiles-ageby/parent/child/file
  printf old >/tmp/tmpfiles-ageby/parent/other/file
  touch -d '3 days ago' /tmp/tmpfiles-ageby/parent/{child,other}/file
  systemd-tmpfiles --clean - <<'EOT'
  d /tmp/tmpfiles-ageby/parent - - - m:1d
  X /tmp/tmpfiles-ageby/parent/child - - - -
  EOT

Before:
  child/file remained because X used the default age-by set.
  other/file was removed by the parent m: rule.

Follow-up for 7f7a50dd157b3bfb4282c3cc3a56671121eabe24.

8 days agotmpfiles: do not follow copy source symlinks
dongshengyuan [Wed, 15 Jul 2026 05:29:55 +0000 (13:29 +0800)] 
tmpfiles: do not follow copy source symlinks

C lines copy symlinks as symlinks. The post-copy type check should
inspect the source symlink itself, not follow its target.

Reproducer:
  src=/tmp/tmpfiles-src-link.$$
  dst=/tmp/tmpfiles-dst-link.$$
  conf=/tmp/tmpfiles-conf.$$
  ln -s missing-target "$src"
  printf 'C %s - - - - %s\n' "$dst" "$src" >"$conf"
  systemd-tmpfiles --create "$conf"

Before:
  Failed to stat($src): No such file or directory
  status=73
  $dst -> missing-target already existed

Follow-up for 8f6fb95cd069884f4ce0a24eb20efc821ae3bc5e.

8 days agotmpfiles: restore timestamps after removing directories
dongshengyuan [Wed, 15 Jul 2026 05:28:57 +0000 (13:28 +0800)] 
tmpfiles: restore timestamps after removing directories

dir_cleanup() restored parent timestamps after removing files, but not
after removing child directories. Mark directory removals as changes too.

Reproducer:
  rm -rf /tmp/tf-mtime-dir
  mkdir -p /tmp/tf-mtime-dir/old-child
  touch -d '2020-01-01 00:00:00' \
        /tmp/tf-mtime-dir/old-child /tmp/tf-mtime-dir
  before=$(stat -c %Y /tmp/tf-mtime-dir)
  systemd-tmpfiles --clean - <<'EOT'
  d /tmp/tf-mtime-dir - - - M:1s
  EOT

Before:
  equal=no
  gone=yes

Follow-up for 3b63d2d31d0850bd7a81ab9b468218d2c4c461e8.

8 days agotmpfiles: propagate copy errors after opening target
dongshengyuan [Wed, 15 Jul 2026 05:25:55 +0000 (13:25 +0800)] 
tmpfiles: propagate copy errors after opening target

Opening the destination only proves that it exists. If copy_tree_at()
failed for any reason other than an existing destination, report that
copy error.

Reproducer:
  name=tmpfiles-copy-bug.$$
  src=/tmp/$name.src; dst=/tmp/$name.dst; conf=/tmp/$name.conf
  mkdir "$src" "$dst"
  printf payload >"$src/file"
  chmod 500 "$dst"
  printf 'C %s - - - - %s\n' "$dst" "$src" >"$conf"
  systemd-tmpfiles --create "$conf"

Before:
  exit=0
  copied=no

Follow-up for 8f6fb95cd069884f4ce0a24eb20efc821ae3bc5e.

8 days agotmpfiles: check relative L? targets beside the link
dongshengyuan [Wed, 15 Jul 2026 05:23:23 +0000 (13:23 +0800)] 
tmpfiles: check relative L? targets beside the link

Relative symlink targets are resolved from the directory containing the
link. Make the L? existence check use the same rule.

Reproducer:
  tmp=$(mktemp -d /tmp/tmpfiles-link.XXXXXX)
  conf=$(mktemp /tmp/tmpfiles-conf.XXXXXX)
  printf data >"$tmp/target"
  printf 'L? %s/link - - - - target\n' "$tmp" >"$conf"
  systemd-tmpfiles --create --dry-run "$conf"

Before:
  The target was checked root-relative, not beside the link.

Follow-up for b5dc805583bbb019c6bf4c73bf0814a396dc0f12.

9 days agotmpfiles: keep directory specifiers rootless
dongshengyuan [Wed, 15 Jul 2026 05:22:04 +0000 (13:22 +0800)] 
tmpfiles: keep directory specifiers rootless

%t and the other directory specifiers are parsed as normal paths.
They are prefixed by --root= later, so the specifier itself must stay
rootless.

Reproducer:
  tmp=$(mktemp -d /tmp/tmpfiles-root.XXXXXX)
  conf=$(mktemp /tmp/tmpfiles-conf.XXXXXX)
  printf 'd %%t/tmpfiles-repro 0755 - - -\n' >"$conf"
  systemd-tmpfiles --root="$tmp" --create --dry-run "$conf"

Before:
  Would create directory $tmp/$tmp/run/tmpfiles-repro

Follow-up for de61a04b188f81a85cdb5c64ddb4987dcd9d30d3.

12 days agoManage dlopen notes at beginning of execution, and downgrade priorities in shared...
Zbigniew Jędrzejewski-Szmek [Sun, 19 Jul 2026 19:23:47 +0000 (21:23 +0200)] 
Manage dlopen notes at beginning of execution, and downgrade priorities in shared libraries (#43060)

12 days agoportable: tighten image handling and command error reporting (#43033)
Zbigniew Jędrzejewski-Szmek [Sun, 19 Jul 2026 19:09:24 +0000 (21:09 +0200)] 
portable: tighten image handling and command error reporting (#43033)

Let's further improve portable image handling and command error
reporting.

12 days agoImprove sysinstall messages (#43050)
Zbigniew Jędrzejewski-Szmek [Sun, 19 Jul 2026 18:16:06 +0000 (20:16 +0200)] 
Improve sysinstall messages (#43050)

I was trying to use systemd-sysinstall and those are the fixes for
various ugly parts that are immediately obvious when it is used.

12 days agoboot: cover BCD offsets past the buffer
dongshengyuan [Fri, 17 Jul 2026 02:44:03 +0000 (10:44 +0800)] 
boot: cover BCD offsets past the buffer

Add a zero-length test for offset > max so the first bounds guard
is covered separately from the length overflow check.

Follow-up: 231857cfe8da749925ee2beb1352e74fa96f1372

12 days agopassword-quality-util-passwdqc: restore password-quality-util.h include
Alexey Shabalin [Sat, 18 Jul 2026 14:41:33 +0000 (17:41 +0300)] 
password-quality-util-passwdqc: restore password-quality-util.h include

suggest_passwords() references the N_SUGGESTIONS macro, which is defined in
password-quality-util.h. Commit ff33c8f87d ("Extend test-dlopen-so to also
cover cases when built without support") introduced the per-backend split
headers: for the pwquality backend it added the new
password-quality-util-pwquality.h include while keeping password-quality-util.h,
but for the passwdqc backend it replaced password-quality-util.h with
password-quality-util-passwdqc.h (which only pulls in shared-forward.h). As a
result N_SUGGESTIONS is no longer declared in the passwdqc translation unit and
the build fails when the passwdqc backend is enabled.

The passwdqc backend is not exercised by the default CI, so this went
unnoticed. Add the include back, matching the pwquality backend.

12 days agosystemd-imds-generator: fix import docs
Arian van Putten [Sat, 18 Jul 2026 16:02:45 +0000 (18:02 +0200)] 
systemd-imds-generator: fix import docs

We only run import in the initrd by default. Clarify this.

13 days agorun: split out polkit ops into separate .c file (#43047)
Lennart Poettering [Sat, 18 Jul 2026 09:03:36 +0000 (11:03 +0200)] 
run: split out polkit ops into separate .c file (#43047)

2 weeks agorun: simplify timer property handling 43047/head
Lennart Poettering [Thu, 16 Jul 2026 14:44:44 +0000 (16:44 +0200)] 
run: simplify timer property handling

Let's make timer prop handling less special, and more like path/socket
handling. Let's move the checks for at least one OnXYZ= setting to a
common place at the end of parsing, instead of explicit checks for each
property.

2 weeks agorun: split out polkit ops into separate .c file
Lennart Poettering [Mon, 13 Jul 2026 21:47:34 +0000 (23:47 +0200)] 
run: split out polkit ops into separate .c file

Let's shorten an already very long .c file, by splitting it apart a bit.

Splitting out the polkit code is relatively easy, since it does not
touch any of the arg_xyz variables.

2 weeks agodocs: clarify scope of portable services
acandoo [Fri, 17 Jul 2026 19:09:07 +0000 (15:09 -0400)] 
docs: clarify scope of portable services

Removed note clarifying that portable services are only for system services and not user services, and changed comparisons to "system services" with just "services". With newer systemd versions, `systemd-portabled` can be run as a user service.

2 weeks agodlopen-note: downgrade all dlopen notes in libsystemd.so and libsystemd-shared.so 43060/head
Yu Watanabe [Fri, 10 Jul 2026 16:20:47 +0000 (01:20 +0900)] 
dlopen-note: downgrade all dlopen notes in libsystemd.so and libsystemd-shared.so

Since all executables now manage their required dlopen notes directly
within their own source code with explicit priority levels, it is no
longer necessary to declare high-priority dlopen notes in the shared
libraries themselves.

2 weeks agotree-wide: drop DLOPEN_FOO() macros
Yu Watanabe [Fri, 10 Jul 2026 14:59:06 +0000 (23:59 +0900)] 
tree-wide: drop DLOPEN_FOO() macros

Since 4c0d8d967300fde858f83ec4b361db19e3e257c8, most dlopen notes are
set at the beginning of the executables. Let's manage all dlopen notes
there, rather than setting them where dlopen is called.

Note that the only exceptions are the LIBBPF_NOTE for networkd and
nsresource. Since dlopen_bpf() is wrapped in an `#if` guard, the notes
are instead set within the corresponding functionality.

As a result, the DLOPEN_FOO() wrapper macros are no longer needed and
can be dropped completely.

2 weeks agosd-dlopen: make header self-standing again
Luca Boccassi [Fri, 17 Jul 2026 11:10:01 +0000 (12:10 +0100)] 
sd-dlopen: make header self-standing again

The purpose of this header was to provide MIT-0 sources that can be copied
and pasted liberally. Including an LGPL-2.1+ header from it deafeats its
purpose. Make it self-standing again.

Follow-up for aa0db003cf537aeb051cc51a2f7e95d51a5756cd

2 weeks agoupdate TODO
Lennart Poettering [Thu, 16 Jul 2026 14:30:12 +0000 (16:30 +0200)] 
update TODO

2 weeks agonspawn: use chase() for creating dev nodes (#43037)
Luca Boccassi [Fri, 17 Jul 2026 08:02:28 +0000 (09:02 +0100)] 
nspawn: use chase() for creating dev nodes (#43037)

2 weeks agorepart: fix varlink description string 43050/head
Zbigniew Jędrzejewski-Szmek [Fri, 17 Jul 2026 07:21:59 +0000 (09:21 +0200)] 
repart: fix varlink description string

Fixup for 1c76e204d3eb2e43918ddd18c9a93eed8facedfd.

2 weeks agonetwork: silence false warning about unitialized variable
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2026 13:17:33 +0000 (15:17 +0200)] 
network: silence false warning about unitialized variable

[1177/3647] Compiling C object systemd-networkd.p/src_network_networkd-bridge-vlan.c.o
In function ‘bridge_vlan_append_set_info’,
    inlined from ‘bridge_vlan_set_message’ at ../src/network/networkd-bridge-vlan.c:257:21:
../src/network/networkd-bridge-vlan.c:162:28: warning: ‘untagged’ may be used uninitialized [-Wmaybe-uninitialized]
  162 |                         if (untagged == u)
      |                            ^
../src/network/networkd-bridge-vlan.c: In function ‘bridge_vlan_set_message’:
../src/network/networkd-bridge-vlan.c:111:14: note: ‘untagged’ was declared here
  111 |         bool untagged, pvid_is_untagged;
      |              ^~~~~~~~

2 weeks agosysinstall: don't ask whether to erase a disk that contains no partitions
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2026 16:11:31 +0000 (18:11 +0200)] 
sysinstall: don't ask whether to erase a disk that contains no partitions

When the target disk carried no partitions, the installer still asked:

    Please type 'keep' to install the OS in addition to what the disk
    already contains, or 'erase' to erase all data on the disk:

The question is meaningless in that case: there's nothing on the disk
worth preserving, and both answers lead to the same result.

Modify fsystemd-repart to report in the dry-run reply of
io.systemd.Repart.Run() the number of partitions currently on the disk.
The field is only included if the existing partition table was actually
read, i.e. in the 'refuse' and 'allow' empty modes, and omitted
otherwise.

Make systemd-sysinstall skip the erase question if the reply positively
indicates that there are no partitions, proceeding as if 'keep' was
selected.

2 weeks agosysinstall: suppress 'no' prompt to begin installation
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2026 17:03:18 +0000 (19:03 +0200)] 
sysinstall: suppress 'no' prompt to begin installation

The user has to type 'yes', but it doesn't mean that the default of
'no' is ever useful. Suppress it, so the user doesn't have to press
backspace twice.

2 weeks agonspawn: use chase() for creating dev nodes 43037/head
Luca Boccassi [Thu, 16 Jul 2026 16:41:05 +0000 (17:41 +0100)] 
nspawn: use chase() for creating dev nodes

Follow-up for de40a3037af944f6803375f2f5269cffc4247f56

2 weeks agonspawn: log at error level before exiting if parsing OCI fails
Luca Boccassi [Wed, 15 Jul 2026 14:39:40 +0000 (15:39 +0100)] 
nspawn: log at error level before exiting if parsing OCI fails

Currently it silently errors out, with nothing at all printed on the
console

Follow-up for de40a3037af944f6803375f2f5269cffc4247f56

2 weeks agoboot: fix MEMMAP_DEVICE_PATH EndingAddress field calculation
Lennart Poettering [Thu, 16 Jul 2026 13:59:08 +0000 (15:59 +0200)] 
boot: fix MEMMAP_DEVICE_PATH EndingAddress field calculation

Let's do what EDK2 does.

Fixes: #43038
2 weeks agoudev-util: bound leading whitespace skip in udev_replace_whitespace (#42757)
Yu Watanabe [Thu, 16 Jul 2026 16:16:07 +0000 (01:16 +0900)] 
udev-util: bound leading whitespace skip in udev_replace_whitespace (#42757)

udev_replace_whitespace() is documented to read at most 'len' bytes from
'str':
- the strspn() skip of leading whitespace stops at a non-space byte or
NUL, not at 'len'
- ata_id passes the space padded, non-NUL-terminated ATA IDENTIFY
model/serial/fw fields
- an all-blank field reads off the end of the 512-byte hd_driveid stack
struct
Capped the skip to 'len'; existing outputs are unchanged. Added a
regression test.

2 weeks agoAssorted remote/shared/resolved hardening fixes flagged by kres (#42978)
Yu Watanabe [Thu, 16 Jul 2026 16:12:32 +0000 (01:12 +0900)] 
Assorted remote/shared/resolved hardening fixes flagged by kres (#42978)

2 weeks agoRebased and reapplied the fix, dropped the test case.
xiahualiu [Tue, 14 Jul 2026 15:07:29 +0000 (08:07 -0700)] 
Rebased and reapplied the fix, dropped the test case.

2 weeks agodiscover-image: don't ignore symlinks to raw images
Frantisek Sumsal [Tue, 14 Jul 2026 11:37:38 +0000 (13:37 +0200)] 
discover-image: don't ignore symlinks to raw images

Since 5c6bb289990ba53898cbc62db6e732ecb9dc87ac image_discover() uses
chaseat() to chase the path to the image. This however breaks the raw
image check in image_make() as "path" is now not the symlink itself, but
the symlink target.

So with:

$ ls -l /var/lib/machines
total 872104
lrwxrwxrwx. 1 root root         12 Jul 14 06:10 foo.raw -> foo.squashfs
-rw-r--r--. 1 root root 5368709120 Jul 13 02:07 foo.squashfs

The endswith(path, ".raw") check is now performed on "/.../foo.squashfs"
instead of "/.../foo.raw", making it false and thus ignoring the image
symlink completely.

Address this by also checking if the pretty name is set - if so, and the
path is a regular file, the caller must've been image_find() or
image_discover() which already checked if the original path ends in .raw
and is a regular file.

Follow-up for 5c6bb289990ba53898cbc62db6e732ecb9dc87ac.

Resolves: #41656

2 weeks agohomed: fix verification of local identity file
Luca Boccassi [Tue, 14 Jul 2026 18:23:28 +0000 (19:23 +0100)] 
homed: fix verification of local identity file

Follow-up for 70a5db5822c8056b53d9a4a9273ad12cb5f87a92

2 weeks agoAssorted coverity issues (#43035)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2026 12:20:25 +0000 (14:20 +0200)] 
Assorted coverity issues (#43035)

2 weeks agoAssorted network hardening fixes flagged by kres (#43014)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2026 12:15:18 +0000 (14:15 +0200)] 
Assorted network hardening fixes flagged by kres (#43014)

2 weeks agorepart: log allocation failure at debug level in Varlink service mode
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2026 11:45:23 +0000 (13:45 +0200)] 
repart: log allocation failure at debug level in Varlink service mode

When systemd-sysinstall probes whether an installation would fit by
calling io.systemd.Repart.Run() in dry-run mode, systemd-repart runs as
a child process sharing sysinstall's stderr. When the requested
partitions didn't fit, context_ponder() logged its failure at LOG_ERR
before vl_method_run() converted it into a structured Varlink error
(InsufficientFreeSpace or DiskTooSmall), which the client then reports
to the user in its own words. The internal message hence appeared
interleaved with the user-facing report:

    Can't fit requested partitions into available free space (1.9G), refusing.
    The selected disk is not large enough for an OS installation.
    The size of the selected disk is 0B, but a minimal size of 15.7G is required.

Log at LOG_DEBUG when running as a Varlink service, and keep LOG_ERR
for CLI invocations, where this message is the primary error report
shown to the user.

2 weeks agorepart: report the actual block device size in currentSizeBytes
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2026 11:33:55 +0000 (13:33 +0200)] 
repart: report the actual block device size in currentSizeBytes

The io.systemd.Repart interface documents the currentSizeBytes field as
the size of the selected block device, both in the Run() method's
dry-run reply and in the InsufficientFreeSpace and DiskTooSmall errors.
The implementation however filled it in from the "current size"
computed by determine_auto_size(), which means something else entirely:
the size of the image as it currently exists, i.e. the GPT metadata
overhead plus the sizes of all existing partitions — a metric designed
for growing image files with --size=auto. For a disk that is being
partitioned from scratch (i.e. carries no partition table yet) that
value is 0.

As a result, when systemd-sysinstall was pointed at a blank 2G disk
that is too small for the OS installation, it reported:

    The selected disk is not large enough for an OS installation.
    The size of the selected disk is 0B, but a minimal size of 15.7G is required.

Report context->total instead, i.e. the actual size of the block
device, which is also the value the DiskTooSmall check compares the
required size against. Do this in all three places that send
currentSizeBytes, matching the documented semantics of the field.

2 weeks agosysupdate: add config file with metadata for sysupdate components (#42651)
Luca Boccassi [Thu, 16 Jul 2026 11:48:10 +0000 (12:48 +0100)] 
sysupdate: add config file with metadata for sysupdate components (#42651)

This carries some metadata for components. It's supposed to grow a bit,
and include a way to enable/disable transfers, and to condition them.

2 weeks agorepart,dissect: explicitly support DDIs that are both signed *and* encrypted (#43009)
Lennart Poettering [Thu, 16 Jul 2026 11:40:49 +0000 (13:40 +0200)] 
repart,dissect: explicitly support DDIs that are both signed *and* encrypted (#43009)

This is a pretty relevant usecase: preparing an image on some trusted
host, submitting it to some other host that authenticates it and
decrypts it, and consumes it only then.

Let's support this explicitly.

2 weeks agomachined: Allow user ids in open_shell for machine-dbus
cidkidnix [Tue, 7 Jul 2026 19:04:30 +0000 (14:04 -0500)] 
machined: Allow user ids in open_shell for machine-dbus

Previously "machinectl shell --uid=1000 <container>" resulted in a
sucessful drop into a shell in the respective target machine. After
commit a9e9288288567beae57337ae903dd3b6c774001c this is no longer the
case.

This fixes the above breaking change brought in commit a9e9288288567beae57337ae903dd3b6c774001c

2 weeks agoudev-util: bound leading whitespace skip in udev_replace_whitespace 42757/head
Syed Mohammed Nayyar [Mon, 29 Jun 2026 06:02:14 +0000 (11:32 +0530)] 
udev-util: bound leading whitespace skip in udev_replace_whitespace

The function documents that at most 'len' bytes are read from 'str',
but the leading whitespace skip used strspn(), which is bounded only
by a non-whitespace byte or a NUL. ata_id passes the space padded,
non-NUL-terminated ATA IDENTIFY fields, so an all-blank model reads
past the buffer. Use strnspn() to cap the skip to 'len'.

2 weeks agostring-util: add strnspn()
Syed Mohammed Nayyar [Mon, 29 Jun 2026 06:02:14 +0000 (11:32 +0530)] 
string-util: add strnspn()

Like strspn(), but reads at most 'n' bytes from the input. strspn()
is bounded only by a non-matching byte or a NUL, so it over-reads a
buffer that is all matching bytes and not NUL terminated within 'n'.

2 weeks agoci: add test suite for verity+luks disk images 43009/head
Lennart Poettering [Mon, 13 Jul 2026 13:41:36 +0000 (15:41 +0200)] 
ci: add test suite for verity+luks disk images

2 weeks agodissect-image: support activating luks+verity partitions
Lennart Poettering [Mon, 13 Jul 2026 13:41:21 +0000 (15:41 +0200)] 
dissect-image: support activating luks+verity partitions

Let's properly activate images that have both LUKS and Verity enabled
for a partition.

2 weeks agorepart: say when we are calculating Verity data
Lennart Poettering [Tue, 14 Jul 2026 08:56:19 +0000 (10:56 +0200)] 
repart: say when we are calculating Verity data

We say when we encrypt a partition, let's also say when we calculate
verity protection data.

2 weeks agorepart: support generating LUKS+Verity partitions
Lennart Poettering [Mon, 13 Jul 2026 13:40:56 +0000 (15:40 +0200)] 
repart: support generating LUKS+Verity partitions

For various cases it is interesting to both sign and encrypted a file
system, for example to prepare it on one host and provide it to another.
Let's explicitly support preparing this in systemd-repart via setting
both Verity= and Encrypt=.

2 weeks agoupdate TODO
Lennart Poettering [Thu, 16 Jul 2026 05:04:26 +0000 (07:04 +0200)] 
update TODO

2 weeks agoportable: honor --force for directory extensions 43033/head
dongshengyuan [Wed, 15 Jul 2026 08:50:12 +0000 (16:50 +0800)] 
portable: honor --force for directory extensions

Pass relax_extension_release_check through the directory extraction
path instead of hardcoding false. Directory extensions now honor the
same --force relaxation as dissected images.

Reproducer:
  cp -a /tmp/app0 /tmp/app10
  sudo portablectl attach --force --runtime \
      --extension /tmp/app10 /tmp/rootdir app0

Before:
  directory image extraction always used strict extension-release name
  checks. --force relaxed other extension paths but still rejected a
  renamed directory extension with matching metadata.

Follow-up: 06768b90a32ac0d36252ebc5f426ad471bf29fce

2 weeks agosysext: validate work directory metadata before removal 42978/head
Luca Boccassi [Fri, 10 Jul 2026 18:08:57 +0000 (19:08 +0100)] 
sysext: validate work directory metadata before removal

unmerge_hierarchy() joined the persisted work_dir value directly with
--root=. An empty value therefore resolved to the root itself and was passed
to rm_rf().

Require the decoded metadata to name a non-empty, safe, normalized relative
path before constructing the removal target. Add coverage using a disposable
root with deliberately emptied metadata.

Follow-up for 9cfad502f4aa103ef0d2191cbb6b82fecfbc5044

2 weeks agoshift-uid: close consumed directory fds on early return
Luca Boccassi [Fri, 10 Jul 2026 17:48:35 +0000 (18:48 +0100)] 
shift-uid: close consumed directory fds on early return

recurse_fd() consumes each directory fd passed to it, but it has no
cleanup set up until after take_fdopendir() succeeds.
Errors and skipped procfs, sysfs, or read-only subtrees therefore leak the
incoming fd.

Follow-up for b1fb2d971c810e0bdf9ff0ae567a1c6c230e4e5d

2 weeks agorm-rf: fail closed when the root check fails
Luca Boccassi [Fri, 10 Jul 2026 17:22:34 +0000 (18:22 +0100)] 
rm-rf: fail closed when the root check fails

path_is_root_at() returns a negative errno when it cannot determine whether
a target is the root file system. rm_rf_at() treats those errors as a
negative answer and continued with destructive operations.

Propagate root-check errors before modifying the target, while preserving
REMOVE_MISSING_OK for an absent path.

Follow-up for c0228b4fa3e4e633afa5eb8417e6cd3e311cd250

2 weeks agovconsole: reject empty layout during keymap conversion with error
Luca Boccassi [Fri, 10 Jul 2026 16:59:24 +0000 (17:59 +0100)] 
vconsole: reject empty layout during keymap conversion with error

A leading-dash console keymap or leading-comma X11 layout can produce an
empty layout while converting between the two formats. find_converted_keymap()
then asserts on it, allowing malformed input to abort callers such as localed.

Return EINVAL for an empty derived layout instead.

Follow-up for 6d0f5027364518ef17ef91b61dad945e1c4fd0f5

2 weeks agoresolved: preserve unchanged question on asymmetric redirect
Luca Boccassi [Fri, 10 Jul 2026 16:51:53 +0000 (17:51 +0100)] 
resolved: preserve unchanged question on asymmetric redirect

dns_question_cname_redirect() returns no replacement when a question
already matches a CNAME target or a DNAME does not apply. If only one of
the UTF-8 and IDNA questions redirects, dns_query_cname_redirect() then
installs NULL for the unchanged side.

Keep a reference to the original question on whichever side does not
redirect, and update the existing asymmetric DNAME test to verify it.

Follow-up for 23b298bce75a0d1f4f15f34458af9678b4a30c3a

2 weeks agojournal-remote: zero-initialize MHD daemon wrapper
Luca Boccassi [Fri, 10 Jul 2026 15:09:49 +0000 (16:09 +0100)] 
journal-remote: zero-initialize MHD daemon wrapper

MHDDaemonWrapper_free() unconditionally unrefs both event sources, but
setup_microhttpd_server() could return before initializing either pointer.
Zero-initialize the wrapper so cleanup after MHD startup failures safely
unrefs NULL.

Follow-up for 3c67c8bd4c5784bbcc644e489b9a39c0d2bc0e42

2 weeks agojournal-remote: remove disabled compression entry before freeing
Luca Boccassi [Fri, 10 Jul 2026 14:38:22 +0000 (15:38 +0100)] 
journal-remote: remove disabled compression entry before freeing

compression_config_put() frees the COMPRESSION_NONE value when a later
algorithm is selected, but lefts the map entry pointing at it. Remove the
entry first so subsequent parsing, mangling, and teardown cannot access or
free stale memory.

Follow-up for c259c9e25329c93cb1b7363f89d917ffa5ce57c1

2 weeks agonetwork: cancel netlink calls for detached requests 43014/head
Luca Boccassi [Mon, 13 Jul 2026 18:44:58 +0000 (19:44 +0100)] 
network: cancel netlink calls for detached requests

Store the asynchronous netlink slot in the Request object and release it
when the request is detached. This cancels the pending callback instead of
keeping the request alive until its reply arrives.

Follow-up for 80d62d4f1aa62c03828e4cbe2c2dfb2a19765af8

2 weeks agonetwork: compare all multipath route nexthops
Luca Boccassi [Mon, 13 Jul 2026 18:23:21 +0000 (19:23 +0100)] 
network: compare all multipath route nexthops

The multipath route comparator looks up every nexthop in the first
route and hence compares each entry with itself. Compare both ordered
nexthop sets instead, including weights, as the hash function does.

Follow-up for 47420573a778e83f2bddd536cf185cd5829e8ba9

2 weeks agotpm2-util: keep the measurement log's torn-write marker intact
Paul Meyer [Tue, 14 Jul 2026 11:26:56 +0000 (13:26 +0200)] 
tpm2-util: keep the measurement log's torn-write marker intact

The userspace measurement log carries a sticky-bit marker while a writer
is between updating a measurement register and appending the matching
record, so that a writer dying in between leaves the log detectably
incomplete.

However, the next successful writer used to clear the marker again after
appending its own record, erasing the evidence that an earlier writer
had died and the log is still missing a record. Keep the marker set in
that case instead; the new record is appended and synced regardless. The
marker likewise stays set if the measurement itself fails, so that any
non-clean completion remains flagged: a spurious flag on a failed but
harmless measurement is preferable to erasing evidence of a real gap,
and PCR replay stays authoritative either way.

Finally, warn when systemd-pcrlock loads a marked log, so the resulting
PCR validation failures come with a hint at their cause.

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2 weeks agojournalctl: reject field listing with filters
dongshengyuan [Mon, 13 Jul 2026 07:33:09 +0000 (15:33 +0800)] 
journalctl: reject field listing with filters

Reproducer:
  journalctl -F _SYSTEMD_UNIT -u test.service --no-pager
  journalctl -u test.service --no-pager -n 1

Before, the field listing ignored the unit filter and listed unrelated
units, while the normal journal query applied the filter.

sd_journal_query_unique() cannot represent journalctl filters such as
unit, boot, time, cursor, or grep filters. Walking the journal line by
line would make field listing linear in the number of entries and
duplicate unique-value handling.

Keep the scope-option predicate next to add_filters(), and reject field
listings combined with options that actually limit the journal.
Display-only options such as --pager-end are left alone.

2 weeks agoclonesetup: check target table size for overflow 43035/head
Luca Boccassi [Wed, 15 Jul 2026 11:06:02 +0000 (12:06 +0100)] 
clonesetup: check target table size for overflow

The target parameter length is added to two headers and aligned before
allocation. Check each operation and reject payloads that cannot be
represented by the device-mapper ioctl header.

CID#1663846

Follow-up for 104970a8bd7a3b53067f6e50283183406a579f0b

2 weeks agoclonesetup: check target message size for overflow
Luca Boccassi [Wed, 15 Jul 2026 11:05:04 +0000 (12:05 +0100)] 
clonesetup: check target message size for overflow

Build the variable-length ioctl size with checked additions. Reject an
oversized message before allocating and copying it into the buffer.

CID#1663845

Follow-up for 104970a8bd7a3b53067f6e50283183406a579f0b

2 weeks agotest: make NSS IPv4 tuple bounds explicit
Luca Boccassi [Wed, 15 Jul 2026 11:07:20 +0000 (12:07 +0100)] 
test: make NSS IPv4 tuple bounds explicit

gaih_addrtuple.addr has room for an IPv6 address, while IPv4 uses only
the first struct in_addr. Express the remaining range directly in terms
of that type so static analysis can prove the access remains within the
array.

CID#1663899

Follow-up for 2d85bba6b9ddd20b74992c740fab7f82c9c03f01

2 weeks agomkosi: update debian commit reference to 88c420c621dbd1b988950cf26fc60789fc989453
Luca Boccassi [Wed, 15 Jul 2026 14:21:12 +0000 (15:21 +0100)] 
mkosi: update debian commit reference to 88c420c621dbd1b988950cf26fc60789fc989453

88c420c621 Install new files for upstream build
5b7f67b86a Update changelog for 261.1-3 release
3f91c8567c NEWS: update about removal of sd-tpm dep
e13ba94737 Drop obsolete TODO
b0c5def366 systemd: downgrade systemd-tpm and mount to recommends
e9eb859a3a systemd-tpm: depend on tpm-udev for rules and tmpfiles.d
42f74bb110 Drop obsolete comment from d/control
fc40986137 debian/extra/network: use NamePolicy=keep mac on USB wifi devices

2 weeks agooci-util: Don't fall back to default registry for explicit registries
Kai Lüke [Wed, 15 Jul 2026 07:09:13 +0000 (16:09 +0900)] 
oci-util: Don't fall back to default registry for explicit registries

When a reference specifies a registry like ghcr.io or quay.io for which
we don't have a registry config file, the fallback forced the default
registry which is wrong.

Only use the default as fallback when there is no explicit registry.

2 weeks agoCleanup argument and return values for copy_bytes_full helpers (#43034)
Yu Watanabe [Wed, 15 Jul 2026 16:32:04 +0000 (01:32 +0900)] 
Cleanup argument and return values for copy_bytes_full helpers (#43034)

Follow-up for #43004.

2 weeks agoboot: guard missing Windows auto entry
dongshengyuan [Tue, 14 Jul 2026 11:40:15 +0000 (19:40 +0800)] 
boot: guard missing Windows auto entry

config_add_entry_loader_auto() returns NULL when the Windows loader
is missing. With reboot-for-bitlocker enabled, the caller still
assigned e->call and could dereference NULL.

This can happen when reboot-for-bitlocker is enabled but the ESP does
not contain EFI/Microsoft/Boot/bootmgfw.efi.

Before:
  systemd-boot could dereference NULL while building the menu

Follow-up for: 661615a0afacee3545cde0a48286c0fef983f8fe.

2 weeks agojournalctl: use root machine ID for namespaces
dongshengyuan [Tue, 14 Jul 2026 11:34:21 +0000 (19:34 +0800)] 
journalctl: use root machine ID for namespaces

journalctl --root=... --list-namespaces scans the target root's
journal tree, but used the host machine ID when matching namespace
directories.

Reproducer:
  root="$(mktemp -d)"
  mid=11111111111111111111111111111111
  mkdir -p "$root/etc" "$root/var/log/journal/$mid.testns"
  printf '%s\n' "$mid" >"$root/etc/machine-id"
  journalctl --root="$root" --list-namespaces --quiet

Before:
  no output

Follow-up for: 68f66a171398e27280a95e58ae7464219cccaaec.

2 weeks agonetwork: add IPv4ProxyARPAddress= and consolidate proxy ARP/NDP handling
Aritra Basu [Sun, 7 Jun 2026 06:04:11 +0000 (02:04 -0400)] 
network: add IPv4ProxyARPAddress= and consolidate proxy ARP/NDP handling

This adds an IPv4 counterpart to `IPv6ProxyNDPAddress=` for adding
manual entries to the kernel's IPv4 neighbour proxy table (check via
`ip -4 neighbour show proxy dev <dev>`). systemd-networkd only exposed
`IPv4ProxyARP=` for per-interface `proxy_arp` sysctl (automatic proxy
ARP) with no way to manage manual entries from a .network file.

To avoid duplicating the IPv6 proxy NDP code path, both families are
now combined into a single new `networkd-neighbor-proxy` module. The
IPv6 behaviour is preserved: `IPv6ProxyNDPAddress=` still implies
`IPv6ProxyNDP=yes` unless `IPv6ProxyNDP=` is explicitly disabled and
entries are still dropped if the kernel has no IPv6 support.
The same rule is applied to `IPv4ProxyARPAddress=`. It implies
`IPv4ProxyARP=yes` when the sysctl is not explicitly set and has no
effect if `IPv4ProxyARP=` has been set to false.

This keeps the user model symmetric and predictable across both
families: a single per-address setting that turns on the matching
per-interface sysctl automatically, while still letting system
administrators opt out by setting the boolean explicitly to false.

Note that the IPv4 manual NTF_PROXY entries installed here would
actually function without `proxy_arp` (unlike IPv6, where `proxy_ndp`
gates the manual entries); the implication is kept for symmetry with
`IPv6ProxyNDPAddress=` and is now called out explicitly in the man
page, together with the fact that enabling `proxy_arp` also activates
interface-wide automatic proxy ARP for routed-toward addresses on
connected subnets.

Parser-time validation rejects addresses the kernel would refuse:
the ANY/null address for both families, IPv4 and IPv6 multicast
and the IPv4 limited broadcast 255.255.255.255.

Signed-off-by: Aritra Basu <aritrbas+gh@cisco.com>
2 weeks agoshared/copy: simplify argument convention for reflink_range 43034/head
Zbigniew Jędrzejewski-Szmek [Wed, 15 Jul 2026 10:59:45 +0000 (12:59 +0200)] 
shared/copy: simplify argument convention for reflink_range

reflink_range() would treat size==UINT64_MAX as "copy everything", but
only if the offsets were 0. There are only two callers: one always passes
a fixed size, the other translated size==UINT64_MAX to 0. Make things
more uniform by always treating size==UINT64_MAX the same as size==0.

2 weeks agoshared/copy: simplify return convention for try_reflink_copy_bytes
Zbigniew Jędrzejewski-Szmek [Wed, 15 Jul 2026 10:39:30 +0000 (12:39 +0200)] 
shared/copy: simplify return convention for try_reflink_copy_bytes

Follow-up for 5a12005c834eab92d7c76d61c7090aa78b61cdfb.

Also a rescue a comment from the discussion in the PR.

2 weeks agoupdate TODO 42651/head
Lennart Poettering [Wed, 24 Jun 2026 11:32:03 +0000 (13:32 +0200)] 
update TODO

2 weeks agoci: add test for the various new sysupdate features
Lennart Poettering [Wed, 1 Jul 2026 20:32:45 +0000 (22:32 +0200)] 
ci: add test for the various new sysupdate features

2 weeks agoshell-completion: add shell completion for systemd-sysupdate
Lennart Poettering [Wed, 1 Jul 2026 13:29:38 +0000 (15:29 +0200)] 
shell-completion: add shell completion for systemd-sysupdate

2 weeks agoman: document the new .component files
Lennart Poettering [Wed, 1 Jul 2026 16:22:13 +0000 (18:22 +0200)] 
man: document the new .component files

2 weeks agoman: document the new systemd-sysupdate switches and verbs
Lennart Poettering [Wed, 1 Jul 2026 12:58:28 +0000 (14:58 +0200)] 
man: document the new systemd-sysupdate switches and verbs

2 weeks agounits: add unit that can auto-enables all suggested component/features
Lennart Poettering [Wed, 1 Jul 2026 17:51:51 +0000 (19:51 +0200)] 
units: add unit that can auto-enables all suggested component/features

if enabled it will plug itself before systemd-sysupdate-update.service
and enable every component + feature that is suggested.

2 weeks agounits: update all components in systemd-sysupdate-update.service
Lennart Poettering [Wed, 1 Jul 2026 21:28:01 +0000 (23:28 +0200)] 
units: update all components in systemd-sysupdate-update.service

Let's beef up systemd-sysupdate-update.service and update not just one
component but all enables ones.

2 weeks agosysupdate: add support for 'update --component-all'
Lennart Poettering [Tue, 30 Jun 2026 20:55:45 +0000 (22:55 +0200)] 
sysupdate: add support for 'update --component-all'

Let's add a way to quickly update all components that are enabled.

2 weeks agotpm2-util: initialize NvPCRs on first extension
Paul Meyer [Mon, 13 Jul 2026 07:47:40 +0000 (09:47 +0200)] 
tpm2-util: initialize NvPCRs on first extension

Both callers of tpm2_nvpcr_extend_bytes() duplicate the same dance: on
-ENETDOWN, i.e. when the NvPCR isn't anchored yet because
systemd-tpm2-setup hasn't run, they acquire the anchor secret,
initialize the NvPCR, and extend again. Move this into
tpm2_nvpcr_extend_bytes() itself. The only caller-specific bit, whether
the anchor secret shall be synced to /var, is passed in as a parameter.

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2 weeks agoportabled: apply pool limits to portable images
dongshengyuan [Wed, 15 Jul 2026 08:49:10 +0000 (16:49 +0800)] 
portabled: apply pool limits to portable images

Apply SetPoolLimit to IMAGE_PORTABLE instead of IMAGE_MACHINE. The
manager property and the setter now refer to the same portable image
pool.

Reproducer:
  sudo portablectl set-limit 1G
  busctl get-property org.freedesktop.portable1 \
      /org/freedesktop/portable1 \
      org.freedesktop.portable1.Manager PoolLimit

Before:
  SetPoolLimit adjusted the machine image pool while portablectl
  reported the portable image pool. The command could succeed without
  changing the limit that portable users queried later.

Follow-up: 824fcb95c9e66abe6b350ebab6e0593498ff7aa1

2 weeks agoportablectl: normalize set-limit image paths
dongshengyuan [Wed, 15 Jul 2026 08:41:15 +0000 (16:41 +0800)] 
portablectl: normalize set-limit image paths

Normalize the image argument for per-image SetImageLimit requests while
leaving the single-argument pool limit mode unchanged. This aligns quota
handling with other path-taking verbs.

Reproducer:
  cd /tmp
  portablectl set-limit ./portable-repro 1G

Before:
  ./portable-repro was sent unchanged to portabled and rejected as an
  invalid image name/path. Per-image quota changes worked for absolute
  paths but not for equivalent relative paths.

Follow-up: 61d0578b07b97cbffebfd350bac481274e310d39

2 weeks agoportablectl: normalize remove image paths
dongshengyuan [Wed, 15 Jul 2026 08:39:16 +0000 (16:39 +0800)] 
portablectl: normalize remove image paths

Normalize each remove argument with determine_image() before building
the RemoveImage request. Relative paths are converted before reaching
portabled.

Reproducer:
  cd /tmp
  portablectl remove ./portable-repro

Before:
  ./portable-repro was sent unchanged to portabled and rejected as an
  invalid image name/path. Removing an image by a relative path failed
  even though the path referred to a valid local image.

Follow-up: 61d0578b07b97cbffebfd350bac481274e310d39

2 weeks agoportable: keep unit symlinks inside the image
dongshengyuan [Wed, 15 Jul 2026 08:38:07 +0000 (16:38 +0800)] 
portable: keep unit symlinks inside the image

Open unit files with chase_and_openat() rooted at the image instead of
plain openat(). Symlinks are now resolved under the image root and must
end at a regular file.

Reproducer:
  ln -s /tmp/portable-host-unit \
      IMAGE/usr/lib/systemd/system/PREFIX.service
  portablectl inspect --cat IMAGE PREFIX.service

Before:
  inspect followed the absolute symlink on the host and printed host
  file contents as image unit metadata. Image inspection could leak or
  trust files outside the portable image.

Follow-up: 61d0578b07b97cbffebfd350bac481274e310d39

2 weeks agoportablectl: normalize read-only image paths
dongshengyuan [Wed, 15 Jul 2026 08:36:02 +0000 (16:36 +0800)] 
portablectl: normalize read-only image paths

Run read-only image arguments through determine_image() before sending
them over D-Bus. This gives relative paths the same normalized form as
other portablectl image operations.

Reproducer:
  cd /tmp
  portablectl read-only ./portable-repro true

Before:
  ./portable-repro was sent unchanged to portabled and rejected as an
  invalid image name/path. The same image worked when passed as an
  absolute path, so relative paths behaved inconsistently.

Follow-up: 61d0578b07b97cbffebfd350bac481274e310d39

2 weeks agocopy: drop COPY_REFLINK
Daan De Meyer [Sun, 12 Jul 2026 19:50:42 +0000 (21:50 +0200)] 
copy: drop COPY_REFLINK

Reflinking is a safe optimization whenever the source and destination are
regular, seekable files on a filesystem that supports cloning. Requiring each
caller to opt in through COPY_REFLINK adds flag plumbing without changing the
necessary fallback behavior.

Drop COPY_REFLINK, renumber the remaining flags, and have copy_bytes_full()
unconditionally try FICLONE or FICLONERANGE before entering its normal copy
loop. Isolate the clone attempt and its file-offset bookkeeping in a helper so
copy_bytes_full() only has to handle its cloned, unavailable, and error results.
A successful clone therefore completes in one operation, while an unsupported
or rejected clone falls back to progress-limited copy_file_range(), sendfile(),
or buffered copying. Keep the public reflink helpers for operations that
specifically require clone semantics.

Existing test-copy coverage exercises both bounded and unbounded regular-file
copies through copy_bytes_full().

Signed-off-by: Daan De Meyer <daan@amutable.com>
2 weeks agoportablectl: keep inspect --force unit metadata
dongshengyuan [Wed, 15 Jul 2026 08:30:15 +0000 (16:30 +0800)] 
portablectl: keep inspect --force unit metadata

Parse the WithExtensions metadata block whenever --force selects that
bus method. This keeps the following unit-file array aligned with the
reply layout.

Reproducer:
  portablectl inspect --force /usr/share/minimal_0.raw \
      minimal-app0.service

Before:
  inspect printed the image metadata but dropped the matching unit
  list. Scripts could not see which unit files were selected when
  --force was used with the WithExtensions bus reply.

Follow-up: bdfa3f3a5c6d16d56d432e7bc52be0c03a5ce6ad

2 weeks agorepart: make COW behavior configurable
Daan De Meyer [Tue, 14 Jul 2026 11:04:17 +0000 (13:04 +0200)] 
repart: make COW behavior configurable

systemd-repart currently forces newly created image files into NOCOW mode.
That prevents files from being reflinked into the image, making image builds
slower and increasing their disk usage on filesystems that support cloning.

Add a tristate --cow= option. By default, leave the filesystem or parent
directory COW policy unchanged. With --cow=yes, explicitly enable COW; with
--cow=no, retain the previous behavior of forcing NOCOW. Add XO_COW as the
counterpart to XO_NOCOW so xopenat_full() applies either policy while retaining
its normal creation-error cleanup.

Document the new option and extend TEST-58-REPART to verify inherited COW and
NOCOW policies as well as explicit COW and NOCOW overrides. Compare the unset
behavior with the filesystem default so the test also works on nodatacow
mounts, and skip it when the inode attribute is unsupported.

Signed-off-by: Daan De Meyer <daan@amutable.com>
2 weeks agorules: install 60-persistent-media-controller.rules
Jason Yang [Tue, 14 Jul 2026 02:38:25 +0000 (10:38 +0800)] 
rules: install 60-persistent-media-controller.rules

Commit 04f19d673587 ("udev: Add /dev/media/by-path symlinks for media
controllers") added the rule file and the feature was announced in the
v256 NEWS, but the file was never added to the rules.d/meson.build
install list, so no build has ever shipped it and the advertised
/dev/media/by-path/ symlinks are never created.

Add it to the unconditionally installed rules.

2 weeks agosd-dhcp-relay: fix off-by-one when discarding BOOTREQUEST messages by hops count
hanjinpeng [Wed, 8 Jul 2026 07:05:51 +0000 (03:05 -0400)] 
sd-dhcp-relay: fix off-by-one when discarding BOOTREQUEST messages by hops count

According to RFC specifications
```
RFC 1542 section 4.1.1 states:
The relay agent MUST silently discard BOOTREQUEST messages whose 'hops'
   field exceeds the value 16."
```

"Exceeds the value 16" means hops > 16, i.e. a message that arrives with
hops == 16 is still valid and must be relayed (after which its hops field
becomes 17). The code used ">= 16", which silently dropped a valid message
that had legitimately traversed exactly 16 relay agents, one hop too early.

This matches the wording of the adjacent comment, which already says
"exceeds the value 16".

2 weeks agodlopen-note: drop unnecessary header
Yu Watanabe [Fri, 10 Jul 2026 16:13:10 +0000 (01:13 +0900)] 
dlopen-note: drop unnecessary header

It unexpectedly snuck in there.

Follow-up for a74b3e1778ec00a21f5d1f10947daef2c02c6ffe.

2 weeks agobcd, id128, sysupdate: tighten edge-case handling (#43018)
Luca Boccassi [Tue, 14 Jul 2026 23:03:03 +0000 (00:03 +0100)] 
bcd, id128, sysupdate: tighten edge-case handling (#43018)

2 weeks agoAssorted udev hardening fixes flagged by kres (#42903)
Luca Boccassi [Tue, 14 Jul 2026 22:21:53 +0000 (23:21 +0100)] 
Assorted udev hardening fixes flagged by kres  (#42903)

2 weeks agoresolved: fix spurious BrowseServices add/remove flapping with ifindex=0 (#42982)
Lennart Poettering [Tue, 14 Jul 2026 21:58:34 +0000 (23:58 +0200)] 
resolved: fix spurious BrowseServices add/remove flapping with ifindex=0 (#42982)

## Problem
A `BrowseServices` subscription with `"ifindex":0` (browse all
interfaces) receives a continuous flap of `added`/`removed` events for a
service that is still present — within a second, and with no goodbye
packet involved.

## Root cause
For `ifindex==0`, `mdns_browser_revisit_cache()` looked up each mDNS
scope's cache separately and called `mdns_manage_services_answer()`
**once per scope**. That function derives `removed` events by diffing
the browser's *global* discovered-service list (all interfaces, filtered
only by owner family) against the single answer it's handed. So with ≥2
mDNS-relevant interfaces of the same family, a service present on
interface A isn't in interface B's answer and is spuriously removed
while B is reconciled, then re-added on the next revisit tick.

## Fix
Accumulate the pruned cache answers from every matching mDNS scope into
one combined `DnsAnswer` and reconcile **once**, so removals diff the
global list against the union across interfaces. Items are merged with
`dns_answer_add_full()` (not `dns_answer_extend()`, which defaults each
item's `until` to `USEC_INFINITY` and would skew the RFC 6762 §5.2
TTL-maintenance schedule). The single-interface (`ifindex>0`) path is
unchanged.

## Test
`TEST-89-RESOLVED-MDNS.sh` gains `testcase_browse_ifindex_zero_no_flap`:
it adds a service-less dummy mDNS link to guarantee ≥2 same-family
scopes (the flap precondition), browses `ifindex=0`, waits for
discovery, then asserts **zero** `removed` events while every publisher
stays up. The subscription uses `varlinkctl --timeout=infinity`, since
it sits idle after discovery and the default 45s idle timeout would
sever it (and the assertion) mid-observation.

## Testing status
Builds clean; `shellcheck -x` clean. First CI round: `TEST-89`
(including this testcase) passed on all mkosi platforms; the failing
jobs all traced to unrelated flakes/infra.

2 weeks agoversion_is_valid() tweaks (#43025)
Lennart Poettering [Tue, 14 Jul 2026 21:46:40 +0000 (23:46 +0200)] 
version_is_valid() tweaks (#43025)

We have two validators, and neither really makes sense. Let's unify and
clean things up.

2 weeks agoboot: downgrade EFI_MEMORY_ATTRIBUTE_PROTOCOL warning
Aswin Murugan [Tue, 14 Jul 2026 06:07:14 +0000 (11:37 +0530)] 
boot: downgrade EFI_MEMORY_ATTRIBUTE_PROTOCOL warning

U-Boot currently does not implement EFI_MEMORY_ATTRIBUTE_PROTOCOL
even when reporting EFI version >= 2.10. Consequently, systemd-boot
emits a warning on every boot when running on U-Boot firmware.

The absence of EFI_MEMORY_ATTRIBUTE_PROTOCOL is a current
U-Boot limitation and not a condition users can remedy.
Furthermore, the EFI specification does not require all
firmware advertising EFI 2.10 or newer to implement the
protocol. As a result, the warning provides little value on
U-Boot systems while causing log_wait() to impose a 2.5-second
boot delay.

Downgrade the message to LOG_DEBUG, this keeps the diagnostic
available for debugging purposes without penalizing normal
boot time.

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
2 weeks agoAssorted basic/shared/home/import hardening fixes flagged by kres (#42950)
Lennart Poettering [Tue, 14 Jul 2026 21:31:53 +0000 (23:31 +0200)] 
Assorted basic/shared/home/import hardening fixes flagged by kres (#42950)

2 weeks agosysupdate: Add ListFeatures() and ListTargets() varlink methods (#42900)
Lennart Poettering [Tue, 14 Jul 2026 21:14:22 +0000 (23:14 +0200)] 
sysupdate: Add ListFeatures() and ListTargets() varlink methods (#42900)

Following on from adding the basic varlink scaffolding to sysupdate,
let’s varlinkify a couple of the D-Bus methods. Because varlink doesn’t
have a concept of object paths, the D-Bus path structure which allows a
target to be selected has been squashed down to a target argument for
each relevant method.

Varlinkify the way to list targets, and also the way to list features
because that was simple to do at the same time.

More methods need varlinkifying in the future, but let’s do it in small
and manageable chunks.

2 weeks agotest: extend version_is_valid() testcase a bit 43025/head
Lennart Poettering [Tue, 14 Jul 2026 13:41:23 +0000 (15:41 +0200)] 
test: extend version_is_valid() testcase a bit

2 weeks agobootspec: log about invalid version strings
Lennart Poettering [Tue, 14 Jul 2026 13:41:09 +0000 (15:41 +0200)] 
bootspec: log about invalid version strings

2 weeks agoman: update version formatting requirements in os-release
Lennart Poettering [Tue, 14 Jul 2026 13:30:42 +0000 (15:30 +0200)] 
man: update version formatting requirements in os-release

Allow full UAPI.10 version strings, i.e. "+", "_", "~" and "^" too, to
match the recent reworking.

These version strings are generally distro-managed, hence use the more
liberal alphabet.

Fixes: #32785