17 Commits
Author SHA1 Message Date
Siteshwar Vashisht efc430cae2 core: return correct error codes from ask_password_conv()
These error codes are directly consumed by PAM, so incorrect error
codes may lead to reporting misleading errors. Also, add a helper method
`log_oom_return_pam_buf_err()` that logs out of memory conditions and
returns `PAM_BUF_ERR`.
2026-11-05 19:01:09 +01:00
Siteshwar Vashisht 2f164da4a2 sysupdate: fix a memory leak in find_suitable_partition()
If a smaller partition is found than the previous one, previous
partition's `label` and `device` fields leak memory.

Also, use `TAKE_GENERIC()` to reset `pinfo`.
2026-10-16 13:57:59 +02:00
Siteshwar Vashisht f891713c94 oci-util: add tests for oci_ref_parse() 2026-10-14 04:09:53 +02:00
Siteshwar Vashisht fe9fe613d9 oci-util: don't mistake a registry port for an OCI tag
The tag separator can only appear as the last path component, hence
start the search there.

Fixes an issue reproducible through:

```
> /usr/lib/systemd/systemd-pull oci quay.io:443/fedora/fedora fedora-without-tag
OCI ref 'quay.io:443/fedora/fedora' is invalid.
```
2026-10-13 14:51:50 +02:00
Siteshwar Vashisht de82782024 tpm2-util: TPM2_PCR_MASK_VALID() should take 64-bit parameter
... as some of the fields like `pcr_mask` field of `struct
tpm2_credential_header` that are passed to this function are 64-bit.
2026-10-04 21:25:45 +09:00
Siteshwar Vashisht 542c3cd97a creds-util: fix validation check for TPM2 PCR mask
... field on big-endian architectures.
2026-10-04 18:15:40 +09:00
Siteshwar Vashisht d5b4357f8f udev-rules: fix remaining buffer size calculation
... in `attr_subst_subdir()`.

`strnpcpy_full()` returns space left in the buffer. Its return value
should be directly used instead of being subtracted from buffer size.
2026-10-04 17:20:56 +09:00
Siteshwar Vashisht 513e4b9947 nspawn-bind-user: fix logging an error message
... in `write_membership()` function.

Log the actual error message returned from `chase_and_open()`.
2026-10-04 17:01:06 +09:00
Siteshwar Vashisht 458c5ce35c logind: fix one-byte buffer overflow
... in `inhibit_what_to_string()`.

Add missing colon with `handle-reboot-key`.
2026-10-04 16:59:30 +09:00
Siteshwar Vashisht 041e70d7f7 core/dbus-unit: fix returning on "JobTimeoutUSec"
branch in `bus_unit_set_transient_property()`.
2026-10-03 21:32:31 +02:00
Siteshwar Vashisht d3157f2a67 ndisc: fix an off by 2 write in ndisc_option_build_encrypted_dns()
This function constructs the NDisc Encrypted DNS option (RFC 9463).
`poff` is initialized to `off + sizeof(uint16_t)` - pointing past the 2
bytes SvcParam length field. After all SvcParams are written the length
is set at line 1541. `LESS_BY(poff, off) = poff - off` includes the 2
bytes length field itself. The correct value is `poff - off -
sizeof(uint16_t)`.
2026-09-23 16:33:34 +02:00
Siteshwar Vashisht cef0631a8d btrfs-util: validate that sh.len is large enough
... to contain the `struct btrfs_chunk` header and all declared stripes
before using `num_stripes` as a loop bound.
2026-09-10 03:31:16 +09:00
Siteshwar Vashisht cdead3747f network/netdev: add a NULL check
... for `netdev->ifname`.
2026-09-10 01:00:04 +09:00
Siteshwar Vashisht 6df59b0753 tar-util: fix an off by one read
Standard Linux POSIX ACL tag values are 0x00, 0x01, 0x02, 0x04, 0x08,
0x10 and 0x20. ELEMENTSOF(tag_map) evaluates to 33, which is one past
the last valid index 32.
2026-09-08 14:34:47 +09:00
Siteshwar Vashisht 504ebbe826 creds-util: add a check in decrypting credentials
... and avoid continuing decryption in case of failure.
2026-09-04 03:29:27 +09:00
Siteshwar Vashisht b4f2262be8 journal: fix cleaning up iovec entries
... when journald's messages exceed `kmsg_own_ratelimit`.
2026-09-04 03:29:00 +09:00
Siteshwar Vashisht 00ca860b2c ndisc: fix an out of memory condition
... and skip the loop when building NDisc option fails.
2026-09-03 05:53:35 +09:00