Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CADk+mPBXXWW9oA+7chdNEGrXQWx=QBWR5fZ187osvSSAZ_HFNw@mail.gmail.com>
Date: Tue, 1 Dec 2026 11:30:05 -0500
From: rgerhards@...scon.com
To: oss-security@...ts.openwall.com
Subject: rsyslog: 2 security advisories published 2026-12-01 (imjournal)

Hello,

rsyslog has published the following security advisory(ies). The
distros list was notified in advance.

Fix: https://github.com/rsyslog/rsyslog/pull/8145

GHSA-3w8v-2pjp-5r8p: imjournal permits local journal clients to inject
record delimiters through syslog tag fields
Advisory: https://github.com/rsyslog/rsyslog/security/advisories/GHSA-3w8v-2pjp-5r8p

### Summary

The optional `imjournal` input copies the journal fields
`SYSLOG_IDENTIFIER` and `SYSLOG_PID` into rsyslog's `syslogtag`.
systemd-journald
does not validate these client-supplied, non-underscore fields and
permits binary
field values. A local unprivileged process that can submit an entry to the
system journal can therefore place line feeds and other control bytes in the
tag. imjournal sanitizes NUL bytes in these values, but does not neutralize
other control bytes; the message sanitizer applies to `MESSAGE`, not the tag.

When a configured action renders `%syslogtag%` into a line-oriented format, one
journal entry can produce multiple physical log lines. With the built-in
forward format and default LF-delimited TCP framing, an embedded LF can also end
the first frame. A downstream syslog receiver then parses the remaining bytes as
an independent record with attacker-chosen PRI, timestamp, short hostname, and
message body.

The trusted `_PID` fallback is derived from sender credentials and is not a
client-controlled injection source. `_COMM` is also a trusted journald field.
Although a process may choose its task name, LF injection through
`_COMM` was not
reproduced on systemd 255 and is not part of the confirmed vector.

### Affected configurations and prerequisites

- rsyslog loads `imjournal` and consumes the system journal.
- The attacker is a local low-privilege process permitted to submit journal
  entries. This is normally available through the native journal socket.
- The output template renders the tag without control-character escaping. The
  built-in file and forward formats do so.
- Creation of a separate downstream record additionally requires a
  delimiter-based transport/receiver path, such as the default LF-delimited
  `omfwd` TCP framing demonstrated here. Octet-counted framing or a safely
  escaping template changes that effect.

### Impact

This is a log-integrity vulnerability. A local user can make one journal entry
appear as multiple local file lines and, under the demonstrated default TCP
forwarding path, as a neighboring syslog record at a collector. The injected
record can claim a different facility/severity, timestamp, short hostname, and
program/message text.

Local clients can already submit arbitrary message text and plausible program
identifiers. The additional security effect is crossing the record boundary and
forging metadata that would normally be supplied by rsyslog's output template.
No confidentiality, memory-safety, log-deletion, or availability impact was
demonstrated.

### Technical details

On affected versions, `readjournal()` obtains `SYSLOG_IDENTIFIER` and
`SYSLOG_PID`, passes each through `sanitizeValue()`, and assembles the tag with
`asprintf()`. `sanitizeValue()` replaces only NUL. `enqMsg()` calls
`parser.SanitizeMsg()` for the raw `MESSAGE` and then separately calls
`MsgSetTAG()` with the unsafely assembled tag.

On fresh public main `a6c1f4023df4f4e783158ea3837796dc0ef45e4e`, a UID-1000
process submitted one live journal entry containing LF in both fields. The
default file template produced multiple physical lines. A fresh-main sender and
receiver using default TCP forwarding produced two receiver messages from that
single entry; the second raw frame began:

```text
<34>Nov 14 00:00:00 forge CODEX-GHSA-3W8V-20261114
```

### Affected versions

The identifier-to-tag path was introduced by commit
`289e54fdb5d4ebf722425982ff54d7c96132e306` and first appeared in tag
`v7.3.11` (first stable series release `v7.4.0`). The PID component was added by
`1e3167f227e8e5f94f8c103031ed4fd01731c968`. The NUL-only sanitizer added in
`e33c8ffaeca79f1860ce048cf0addcdc23d91c22` did not address other control
bytes. The behavior remains present on current public main.

### Resolution and workarounds

Update to the patched disclosure-day daily-stable build listed in this
advisory when available. The fix neutralizes control bytes before
journal-derived
identifier and PID values are assembled into the tag and adds regression tests
for both fields.

Until then, operators can reduce exposure by using an output template that
escapes or replaces control bytes in tag-derived properties and by using
octet-counted forwarding where supported. Restricting which local processes may
submit journal entries also reduces exposure. Octet-counted forwarding prevents
the demonstrated frame split but does not by itself make multiline local file
output safe.

### Acknowledgements

Found and reported by Rainer Gerhards during an internal imjournal security
review. The internal audit, reproducer preparation, and draft text used AI
assistance; Rainer Gerhards retains sole ownership of the maintainer validation
and disclosure.

Affected: rsyslog >= 7.3.11
Fixed in: 2026-12-01 daily stable
Severity: Low, CVSS 3.1 3.3 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N)
Credits: @rgerhards

GHSA-pff6-5vr4-hf2h: imjournal permits local journal clients to bypass
message-size limits and consume rsyslog memory and disk
Advisory: https://github.com/rsyslog/rsyslog/security/advisories/GHSA-pff6-5vr4-hf2h

## Summary

The optional `imjournal` input uses
`sd_journal_set_data_threshold(maxMessageSize)` when reading journal
entries, but libsystemd documents that threshold as a hint and may
return larger objects. imjournal does not apply its own per-field or
per-entry limit after reading the data.

A local process permitted to write to journald can submit oversized
`SYSLOG_IDENTIFIER`, `SYSLOG_PID`, `MESSAGE`, or other non-underscore
fields. imjournal copies the complete identifier and PID into the
syslog tag and copies every journal field into the message's `$!` JSON
tree. Core raw-message truncation occurs only after imjournal has
allocated and copied the complete `MESSAGE`, and it does not truncate
the tag or JSON properties. The imjournal rate limiter counts messages
and is invoked after these objects are built, so it does not bound
bytes or peak allocation.

Affected deployments load `imjournal`. Memory pressure needs no
particular output template. Disk growth additionally requires a
template that writes the tag or structured fields; the default file
format writes the tag. Forwarding templates may also transmit an
oversized tag.

The attacker must already have local journal-write capability. Trusted
`_COMM` and `_PID` fallback fields are not the oversized
attacker-controlled path. Journald's version-dependent field, entry,
transport, and storage limits still apply, but those limits are much
larger than rsyslog's normal `maxMessageSize`, and journald storage
quotas do not cap rsyslog's root-owned output files.

## Reproduction and impact

On rsyslog main `a6c1f4023df4f4e783158ea3837796dc0ef45e4e`, a live
unprivileged submission on systemd 255 containing a 1 MiB identifier,
64 KiB PID, and 1 MiB additional field was accepted. imjournal
constructed a 1,114,115-byte tag while configured with
`maxMessageSize=8192`; the structured field remained 1 MiB.

A production-like audit using five 40 MB identifiers produced a
200,000,205-byte default output file and 438 MB peak rsyslog RSS. A
separate entry with a 60 MB `MESSAGE` and a 60 MB additional field
retained both complete values in `$!` while `$msg` was limited to
8,096 bytes. No memory corruption was observed.

Repeated entries can fill an rsyslog output filesystem, exhaust
rsyslog memory, or disrupt log collection. Large tag and JSON objects
persist while queued and may accumulate behind slow or blocked
actions; without queueing, much of the allocation is per-message and
transient. The impact is availability only.

## Affected configuration

- rsyslog loads `imjournal` and reads a journal writable by the local attacker.
- Disk impact requires an action/template that emits the tag or `$!`
fields; default file output emits the tag.
- Memory pressure occurs during ingestion regardless of the selected
output template.

The issue has existed since imjournal first shipped the affected tag
and all-field JSON paths in rsyslog 7.3.11. Current main remained
affected when tested. The absence of an upper bound in the
affected-version field means no patched version has yet been
identified; it does not claim that unsupported historical branches
receive fixes.

## Severity

Medium, CVSS 3.1 5.5: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`.

The local access prerequisite and optional imjournal deployment keep
the issue below High severity. High availability impact reflects the
demonstrated ability, under repetition or queueing, to exhaust the
logging service's memory or output filesystem.

## Weakness classification

Primary: CWE-770 (Allocation of Resources Without Limits or Throttling).

Secondary: CWE-400 (Uncontrolled Resource Consumption).

## Remediation direction

Apply explicit limits at the libsystemd-to-rsyslog boundary: cap
identifier and PID before tag construction, cap each copied structured
value, and impose a total per-entry structured-data budget. Do not
rely on the libsystemd threshold. Handle truncation deterministically
and test oversized identifier, PID, `MESSAGE`, an arbitrary field, and
many-field totals.

Tag-size remediation should be coordinated technically with the
separate control-character issue in `GHSA-3w8v-2pjp-5r8p`, because the
findings share a construction site. The findings, advisories, CVEs,
credits, and notifications remain distinct.

## Credit and AI assistance disclosure

Found and reported by Rainer Gerhards during an internal imjournal
security audit.

AI assistance was used during source review, test-harness development,
evidence synthesis, and advisory drafting. The source analysis, live
unprivileged journald reproduction, affected-version history, severity
decision, and final advisory were reviewed and approved by the
maintainer. AI assistance is acknowledged textually; no GitHub
identity is claimed for an AI system.

Affected: rsyslog >= 7.3.11
Fixed in: 2026-12-01 daily stable
Severity: Medium, CVSS 3.1 5.5 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)
Credits: @rgerhards

Regards,
the rsyslog security team
(sent automatically by the rsyslog release system)

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.