From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2C0A13858C55; Fri, 2 Sep 2022 21:45:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C0A13858C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662155122; bh=V0i4Qxjp/R6CLLlh0YfCZhQX2OZxUVgjXSN+OCeXEXY=; h=From:To:Subject:Date:From; b=Z3qdDllC/NIIRvyp6oVEBGWQEZ2DkbNlcQPPbztldsAL/ZFqECy96vIjVK7uxvk96 geoJJJR00Gl0Fw3JxrtIlTLkKX/Kl51di2RLxCcJwyoOzZ6f3ZqwfTlvkutdlc02jr 72C7vBgJ68xTw96eLmgJql6IDlxhaF0mi94DdVo4= From: "reg.glibc.8bngd at fraggod dot net" To: glibc-bugs@sourceware.org Subject: [Bug libc/29544] New: Regression in syslog(3) calls breaks RFC due to extra whitespace Date: Fri, 02 Sep 2022 21:45:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: reg.glibc.8bngd at fraggod dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29544 Bug ID: 29544 Summary: Regression in syslog(3) calls breaks RFC due to extra whitespace Product: glibc Version: 2.36 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: reg.glibc.8bngd at fraggod dot net CC: drepper.fsp at gmail dot com Target Milestone: --- Updating glibc from 2.35 to 2.36 introduced extra whitespace character into messages formatted and sent through syslog()/vsyslog() calls, which seem to break RFC and at least one common syslogd implementation (rsyslog). For example, given following code in syslog.c file: #include int main(int argc, char **argv) { openlog("test", LOG_PID, LOG_LOCAL0); syslog(LOG_ERR, "test"); return 0; } And then running it like this: gcc -o syslog syslog.c && strace -e sendto ./syslog Should produce the following line (expected behavior, RFC, glibc-2.35): sendto(3, "<131>Sep 3 02:32:14 test[81843"... But instead, it produces this line (actual behavior, glibc-2.36): sendto(3, "<131>Sep 3 02:32:14 test[81843"... Difference is a single whitespace character inserted after timestamp, which breaks parser in e.g. rsyslog daemon, and was confirmed by its author to be incorrect output, not conforming to RFC (in the comment here - https://github.com/rsyslog/rsyslog/issues/4979#issuecomment-1235380700 ). Behavior seem to be consistent between apps using syslog() and vsyslog() ca= lls, and seem to be a regression in glibc-2.36 release. glibc-2.35 and earlier versions appear to be working correctly, producing output without that extra space in an otherwise exactly same VM. Given recent rewrite in misc/syslog.c here, guess it might be a simple bug = that managed to slip through the cracks. Related bug reports (with some degree of initial misattribution on my part): - rsyslog - https://github.com/rsyslog/rsyslog/issues/4979 - systemd - https://github.com/systemd/systemd/issues/24540 - Arch Linux - https://bugs.archlinux.org/task/75776 Thanks. --=20 You are receiving this mail because: You are on the CC list for the bug.=