Commit Graph
68649 Commits
Author SHA1 Message Date
Felix Dörre e375bc5fcc journalctl: verify sealed log epochs are continuous
Currently empty epochs are not sealed. This allows an attacker to truncate
a sealed log and continue it without any problems showing when verifying the
log.

This partially addresses CVE-2023-31438. One way to extend this change to
address CVE-2023-31438 completely, would be to verify that there is exactly
one seal per epoch (and not sealing when the epoch has not ended yet).

the change also adds a journal-file flag: HEADER_COMPATIBLE_SEALED_CONTINUOUS
this flag indicates that a journal file is sealed continuously and decides whether
any missing crypto epochs should trigger a warning or an error.
2023-11-09 05:13:27 +09:00
Luca Boccassi 3e433afac9 Merge pull request #29942 from bluca/executor_no_utmp
core: fix build with -Dutmp=false
2023-11-08 20:01:39 +00:00
Luca Boccassi fe7109fc2e Merge pull request #29927 from yuwata/resolve-mdns-fixlets
resolve: several mdns fixlets
2023-11-08 19:56:31 +00:00
Luca Boccassi 98a10e385d Merge pull request #29931 from dtardon/udev-remove-property
udev-manager: actually remove the property
2023-11-08 19:55:45 +00:00
Luca Boccassi 37f16ef072 ci: add -Dutmp=false coverage 2023-11-08 18:41:47 +00:00
Luca Boccassi de3612dbd7 core: fix build with -Dutmp=false 2023-11-08 18:41:47 +00:00
Michal Sekletar e5883df89f man: document nameserver= option 2023-11-08 17:45:35 +00:00
Luca Boccassi e34435857e core: call mac_init from sd-executor
Before the split the SELinux database was inherited via CoW. Since
the split we need to reopen it.

Follow-up for bb5232b6a3
2023-11-08 17:44:36 +00:00
Lennart Poettering 9f97ca70dd update TODO 2023-11-08 18:18:07 +01:00
Yu Watanabe 0fd9bea38e man: fix typo
Follow-up for a9d54de66d.
2023-11-09 00:09:13 +09:00
David Tardon 25270051cc udev-manager: mark old_key as unused too 2023-11-08 14:52:43 +01:00
Yu Watanabe dd51c4332f resolve/mdns: silently ignore Known-Answers only packets 2023-11-08 22:45:14 +09:00
Yu Watanabe 6f087266e3 resolve/mdns: allow mDNS queries with truncation flag
If the query has many Known-Answers records, then the truncation flag is
set.

Fixes #29168.
2023-11-08 22:45:14 +09:00
Yu Watanabe 614af79cfc resolve: tweak logs about truncation 2023-11-08 22:45:07 +09:00
David Tardon e1593039db udev-manager: actually remove the property
AFAICT there's no reason to keep removed entries in the Hashmap
(although it doesn't break anything either). The only use of this
hashmap is in udev_rule_apply_token_to_event(), which just retrieves the
value using hashmap_get(), hence there's no difference there between an
existing entry with a NULL value and a missing entry.
2023-11-08 14:41:28 +01:00
Lennart Poettering ad3163f1dc Merge pull request #29926 from poettering/man-fixes
Various documentation fixes
2023-11-08 14:32:34 +01:00
Lennart Poettering cff559ec3a update TODO 2023-11-08 14:28:10 +01:00
Lennart Poettering d33121d27d man: document that changing --uid= doesn't work
Fixes: #28982
2023-11-08 14:28:10 +01:00
Lennart Poettering 28e3359fdc man: document that Domains=local bind the domain to unicast DNS, not mDNS
Fixes: #28983
2023-11-08 14:28:10 +01:00
Lennart Poettering 28562194c4 service: say explicitly that people should not use different NonBlocking= settings if they share socket units between multiple service units
Fixes: #29600
2023-11-08 14:28:10 +01:00
Lennart Poettering 244101876c man: explicitly document compat guarantees of cryptenroll vs. cryptsetup
Fixes: #29743
2023-11-08 14:28:10 +01:00
Yu Watanabe 7645e5a813 resolve/mdns: split out mdns_make_dummy_packet()
Then, this fixes the following issues:
- if dns_packet_append_zone() for other transaction is failed with
  EMSGSIZE, the previously added key was not removed,
- if dns_transaction_prepare() for other transaction returns 0, then
  we restated the loop without dropping previously appended keys, which
  might not be necessary any more.
2023-11-08 21:38:54 +09:00
Yu Watanabe 6cfa4fc4ce resolve/mdns: do not append packets without records
Previously, if we have only max_rr cached entries, then an empty packet
is appended.

Prompted by #29168.
2023-11-08 21:38:22 +09:00
Lennart Poettering 7480859a11 man,doc: document some aspects of user record management/homed a bit better
Fixes: #29759
2023-11-08 12:40:08 +01:00
Lennart Poettering 3cb938bd12 man: be even clearer that tmpfiles user/group/mode are applied on existing inodes
I think it was clear already, but let's be even clearer.

Fixes: #29774
2023-11-08 12:39:19 +01:00
Lennart Poettering a9d54de66d man: update COREDUMP_xyz journal fields docs
This completes/corrects the documentation for the following fields:

    COREDUMP_CGROUP= - doc where wrong, actually covered COREDUMP_PROC_CGROUP=
    COREDUMP_CMDLINE= → undocumented so far
    COREDUMP_PROC_CGROUP= → docs where there but incorrectly assigned to COREDUMP_CGROUP=
    COREDUMP_PROC_AUXV= → undocumented so far
    COREDUMP_SESSION= → undocumented so far

Fixes: #29832
2023-11-08 12:38:27 +01:00
Lennart Poettering 2e290d55fd man: add missing unit file section name to example
Fixes: #29917
2023-11-08 12:37:26 +01:00
Luca Boccassi bb4791ec85 Merge pull request #29921 from yuwata/sd-dhcp-client-timestamp
dhcp: further cleanups for timestamp
2023-11-08 10:55:11 +00:00
Ronan Pigott 7f0dbde467 resolvectl: do not sort domain output
The order of search domains is important information. We shouldn't
obscure it by sorting the search domains when printing.

Fixes: af781878d5 ("resolvectl: sort domain/nta output")
2023-11-08 10:04:35 +00:00
Frantisek Sumsal 4e55082f74 test: retry the property check a couple of times
41e4ce06fe shortened existing sleeps, which resulted in the check being
sometimes done before the property had a chance to update. Let's do what
what we do with the rest of the checks and retry it a couple of times.

Resolves: #29923
2023-11-08 10:03:53 +00:00
Lennart Poettering e3c5842732 Merge pull request #28519 from ddstreet/tpm2_external_seal
Update systemd-cryptenroll to enroll TPM using only public key
2023-11-08 10:28:28 +01:00
Yu Watanabe 905d0ea7b0 sd-dhcp-client,-server: set timestamp based on the time when received a packet
It seems that RFC does not say anything about the timestamp of lease
we should use: time that the client sent a request or received a reply.
In DHCPv6 client and NDisc, we use a timestamp that we receive a packet,
rather than we sent something. So, let's consistently use the same
logic for DHCPv4 client.

By using the logic, we will hopefully not forget to set timestamp again,
which is fixed by 089362976c.
2023-11-08 17:58:51 +09:00
Yu Watanabe a57dd1d13f sd-dhcp-client: move packet size check to dhcp_packet_verify_headers()
No functional change.
2023-11-08 17:54:52 +09:00
Yu Watanabe 7f42c66015 sd-dhcp-client: split out client_verify_message_header()
This is not necessary to be called when a packet is received through the
RAW socket, but should not hurt anything.
2023-11-08 17:54:30 +09:00
Yu Watanabe 9e6d587961 test: set working directory even if it is expected that the command fails
Otherwise, parsing may unexpectedly succeeds but fail to run writing
.network files with permission error.

Follow-up for 6bc5de53e8.
2023-11-08 08:07:27 +01:00
Yu Watanabe d9c4917b9e vmspawn: fix memleak
Fixes CID#1523912.
2023-11-08 07:54:10 +01:00
Yu Watanabe c62345ffc7 tree-wide: fix typo 2023-11-08 14:57:33 +09:00
Yu Watanabe 69f50bf35e sd-dhcp-client: make client_handle_message() propagate critical error
Then, stop client in the caller side.

This also makes
- ignore all errors except for resource errors like OOM when FORCERENEW
  is received,
- trigger assertion when an message received even if the client is
  stopped.

This should not change any functionality. Just refactoring.
2023-11-08 13:03:40 +09:00
Yu Watanabe b2622db0df Merge pull request #29910 from yuwata/rapid-commit
dhcp: about rapid commit
2023-11-08 12:20:17 +09:00
Luca Boccassi 9871279cde Merge pull request #29913 from keszybz/vmspawn-ci
Build vmspawn in CI and fix one test failure
2023-11-07 23:35:48 +00:00
Luca Boccassi ee32d7a640 Merge pull request #29915 from mrc0mmand/ntp-followups
timesync: fix PropertiesChanges signals for NTP properties
2023-11-07 22:38:23 +00:00
Zbigniew Jędrzejewski-Szmek 0919dbebb0 vmspawn: add missing include
../src/src/vmspawn/vmspawn-util.c:33:13: error: implicit declaration of function ‘access’; did you mean ‘accept’? [-Werror=implicit-function-declaration]
2023-11-07 22:50:37 +01:00
Luca Boccassi 00666ec71f Merge pull request #6763 from kinvolk/iaguis/no-new-privs
core: allow using seccomp without no_new_privs when unprivileged
2023-11-07 21:34:49 +00:00
Zbigniew Jędrzejewski-Szmek 2b84d62869 meson: enable vmspawn by default in developer mode
This should also implicitly enabled vmspawn in CI. It wasn't passing even the
basic tests, which we didn't see, because it needs to be explicitly enabled.
2023-11-07 21:56:57 +01:00
Zbigniew Jędrzejewski-Szmek 30247ea76e man: many fixes systemd-vmspawn(1)
- version information
- indentation and missing tags
- mkosi and qemu don't need root
2023-11-07 21:56:42 +01:00
Luca Boccassi b485c1bf4e Merge pull request #29914 from yuwata/network-generator
network-generator: several cleanups and follow-ups for dns server handling
2023-11-07 20:51:21 +00:00
Zbigniew Jędrzejewski-Szmek ed739145fb xdg-autostart: downgrade warning for missing executables
On a system with a shared home directory, I'm getting a bunch of warnings:

systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.signal.Signal.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/im.riot.Riot.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/libexec/gnome-tweak-tool-lid-inhibitor' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/ignore-lid-switch-tweak.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop: not generating unit, error parsing Exec= line: No such file or directory

This isn't really a problem. Let's just print an info message.
2023-11-07 20:47:04 +00:00
Luca Boccassi 13339e72d2 Merge pull request #29909 from keszybz/documentation-cleanup
Two small documentation cleanups
2023-11-07 20:46:13 +00:00
Frantisek Sumsal 9521574cd4 timesync: fix PropertiesChanges signals for NTP properties
As in their current form they didn't work at all:

systemd-timesyncd[190115]: Assertion 's' failed at src/libsystemd/sd-event/sd-event.c:3058, function sd_event_source_set_enabled(). Ignoring.
systemd-timesyncd[190115]: Failed to reenable system ntp server change event source!
systemd-timesyncd[190115]: Failed to enable ntp server defer event, ignoring: Invalid argument

This was also pointed out in the post-merge review [0].

Let's address this together with the rest of the comments, and add
some tests to make sure everything works as it should.

Resolves: #28770
Follow-up to: 8f1c446

[0] https://github.com/systemd/systemd/commit/8f1c4469793f2f0281fdfbc20ba4085e20cdd16f#r124147466
2023-11-07 21:36:59 +01:00
Frantisek Sumsal 41e4ce06fe test: "prettify" the test a bit 2023-11-07 21:36:59 +01:00