Bug 241937 - syslogd truncates logged messages to 480 bytes
Summary: syslogd truncates logged messages to 480 bytes
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: standards (show other bugs)
Version: 11.3-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-standards (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-13 06:22 UTC by Kurt Jaeger
Modified: 2020-10-19 06:51 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt Jaeger freebsd_committer 2019-11-13 06:22:10 UTC
A change to bring syslogd into RFC5426 land *enforces* a max. length of 480 characters, while the RFC clearly states:

3.2.  Message Size

[...]
   IPv4 syslog receivers MUST be able to receive datagrams with message
   sizes up to and including 480 octets.  IPv6 syslog receivers MUST be
   able to receive datagrams with message sizes up to and including 1180
   octets.  All syslog receivers SHOULD be able to receive datagrams
   with message sizes of up to and including 2048 octets.  The ability
   to receive larger messages is encouraged.

So, please, issue a fix for this. The size the implementation must
minimaly support should not be the size the implementation can maximally support.

See also:
https://reviews.freebsd.org/D15011
https://lists.freebsd.org/pipermail/freebsd-stable/2019-November/091695.html
Comment 1 Scott Aitken 2019-11-18 12:05:56 UTC
Hi Kurt,

this bugs affects everyone - is there any value in updating it?  I can't change it myself.

Scott
Comment 2 Patrik Hildingsson 2020-09-22 21:38:07 UTC
This bug is still in 12.1-RELEASE and is causing lots of confusion. 

Using -O bsd/rfc3164 should not truncate outbound IPv4/IPv6 syslog messages, while issuing syslogd with -O syslog/rfc5424 should truncate outbound IPv4 messages at 480 octets and IPv6 messages at 1180 octets.

By reading syslogd.c it is clear that the truncating of message happens regardless of which option was set.

I would appreciate it very much if someone with better knowledge than I could propose a patch.
Comment 3 Patrik Hildingsson 2020-10-19 06:51:10 UTC
To further pinpoint the issue, the error occurs while relaying syslog from one UDP source to a UDP destination. Other variants have not been tested by me.