![]() |
|
Message-ID: <20250508230254.GG1827@brightrain.aerifal.cx> Date: Thu, 8 May 2025 19:02:54 -0400 From: Rich Felker <dalias@...c.org> To: whistle@...l.ustc.edu.cn Cc: musl@...ts.openwall.com Subject: Re: Potential Injection Vulnerability in _vsyslog Function On Thu, May 08, 2025 at 11:14:55PM +0800, whistle@...l.ustc.edu.cn wrote: > In the current _vsyslog function, if the log contains characters > like \r or \n, according to CWE-93: Improper Neutralization of CRLF > Sequences ('CRLF Injection'), this could potentially lead to an > injection vulnerability. > > > When using musl, would it be safer to explicitly handle \r and \n > here as an extra security measure? I don't think there's any reason we should be munging the contents of the log message here. The syslogd receiving the datagram is free to reject embedded newlines (meaning \n; \r is completely irrelevant here AFAICT) or store them in some storage-backend-specific way. If it stores them in a manner where they can be misinterpreted as the start of a new log record with different process credentials, that seems like a weakness in the syslogd not in the libc. Especially since someone wanting to do that could just write their own client sending the datagrams with embedded newlines to /dev/log, no? Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.