Skip to content

Fixes from the 2026-11 audit, part 6: syslog notes, XML layouts and Telnet - #376

Merged
FreeAndNil merged 4 commits into
masterfrom
Feature/2026-11-audit-chain-e
Nov 23, 2026
Merged

FreeAndNil merged 4 commits into
masterfrom
Feature/2026-11-audit-chain-e

Conversation

@FreeAndNil

Copy link
Copy Markdown
Contributor

- RemoteSyslogAppender, and LocalSyslogAppender with Split
- threat model, AGENTS.md, appender pages, one test
- ANT-2026-56JOM6HP, ANT-2026-Q4NJFOP3
… Framework

- XmlTextWriter wrote it literally, read back as a space
- ANT-2026-8WPIUIID
@FreeAndNil FreeAndNil added this to the 3.6.1 milestone Nov 22, 2026
- a telnet client dropped the raw NUL
- ANT-2026-O5V9EV3G
…rties

- the event no longer gets the four log4j keys
- ANT-2026-L9XQVDSD
@FreeAndNil
FreeAndNil marked this pull request as ready for review November 22, 2026 21:36
@FreeAndNil
FreeAndNil merged commit d916a1a into master Nov 23, 2026
3 checks passed
@FreeAndNil
FreeAndNil deleted the Feature/2026-11-audit-chain-e branch November 23, 2026 06:02
@FreeAndNil

Copy link
Copy Markdown
Contributor Author

Implementation plan for #376, kept here for the record. Written up to describe the change as it stands on the branch.

Plan

Fixes from the 2026-11 audit, part 6: syslog notes, XML layouts and Telnet

Context

The same scan as #355 reported, among the lows, four independent points: the syslog appenders send
no record for an empty render, XmlLayout and XmlLayoutSchemaLog4J write a tab in an attribute
literally on .NET Framework, TelnetAppender sends NUL raw, and XmlLayoutSchemaLog4J writes into
the event's properties. The empty render is intentional and only documented. Three issues: #361
(the tab, its line-break half fixed in #364), #374 (Telnet NUL), #375 (the event's properties).

Constraints that shape the design

  • An empty render carries no text, so sending no record loses only the occurrence; not worth a
    behaviour change.
  • On net462 the layouts write through XmlTextWriter, which writes a tab in an attribute
    literally; attribute-value normalization reads it back as a space. netstandard already writes
    	.
  • XmlTextWriter stays on net462: it writes the log4j: prefix undeclared.
  • NUL is escaped as \0 per sink, as Trace, Debug and LocalSyslog do.
  • The event is shared with every appender of the call; a layout that writes into its properties
    races a buffering appender's flush.

Changes

  1. The empty render: .oss-scanner/threat_model.md names it as not a finding, AGENTS.md points
    there, one-line comments in both syslog appenders, both appender pages. No changelog.
  2. XML layouts read back one whitespace character as another #361 On net462, WriteAttributeStringSafe writes each tab as 	; a value without a tab
    takes the old call.
  3. TelnetAppender sends NUL raw #374 TelnetAppender escapes NUL before queueing the event. The stale comment on the encoder is
    corrected.
  4. XmlLayoutSchemaLog4J writes into the event's properties #375 XmlLayoutSchemaLog4J translates its four keys on a copy of the properties and writes the
    copy. Visible change: later appenders of the same event no longer see the four keys.

Docs: the syslog and Telnet appender pages, XML doc comments of the changed members. One changelog
entry per visible change in src/changelog/3.6.1.

Sequencing

  1. The documentation of the empty render.
  2. The tab on net462.
  3. The Telnet NUL.
  4. The properties copy.
  5. Each commit: test against the unfixed code first, fix, mutate each changed line, review loop.

Verification

  • dotnet build of all targets with 0 warnings, tests on net10 and, on Windows, net462.
  • A split of an empty render or one with only line breaks gives no record.
  • A tab in a property name, a property value and the identity reads back exactly for both layouts,
    with leading, doubled and trailing tabs. On Linux the net462 branch was checked by forcing it with
    an XmlTextWriter: unfixed the tab is written literally.
  • A real Telnet client receives adm\0in with a visible \0 and no raw NUL.
  • After formatting, a fixed and an unfixed event keep their properties; the four keys still reach
    the output; an existing key wins; an empty value is not translated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XmlLayoutSchemaLog4J writes into the event's properties TelnetAppender sends NUL raw XML layouts read back one whitespace character as another

2 participants