Hide Forgot
Hi, It seems to me that it is possible to inject terminal escape sequences into log files via syslog(3) # tail -f /var/log/messages Aug 23 13:50:33 ghetto kernel: ACPI Error: Method parse/execution failed [\_GPE._L10] (Node ffff88017b0e47d0), AE_NOT_FOUND (20141107/psparse-536) (*) Aug 23 13:50:33 ghetto kernel: ACPI Exception: AE_NOT_FOUND, while evaluating GPE method [_L10] (20141107/evgpe-581) $ logger `printf 'HELLO\n\033[2AAAAAAAAAAAAAA\033[2B'` # tail -f /var/log/messages Aug 23 13:50:33 ghetto kernel: ACPI Error: Method parse/execution failed [\_GPE._L10] (Node ffff88017b0e47d0), AE_NOT_FOUND (20141107/psparse-536) (*) Aug 23 13:50:33 ghetto kernel: ACPI AAAAAAAAAAAAA_NOT_FOUND, while evaluating GPE method [_L10] (20141107/evgpe-581) Aug 23 13:50:39 ghetto saken: HELLO On the (*) line, the escape sequence changed its contents, meaning that an unprivileged user can take advantage of this to hide their presence on the system, for example. While researching this, I found that rsyslogd has "$EscapeControlCharactersOnReceive" which claims that is on by default and that "The intent is to provide a way to stop non-printable messages from entering the syslog system as whole." On my system, this does not seem to be true, and actually went ahead and added "$EscapeControlCharactersOnReceive on" to the /etc/rsyslog.conf file, restarted rsyslog and the problem still persists. I am using rsyslogd 7.4.8 Thanks, Federico Bento.
linked blocking issue, this is fixed in upstream version 8, linked upstream issue as well
Federico, Can you provide exact package version you have been using when you find this issue ? Or at least if it was Fedora or RHEL. Thank you.
Hi, I was running Fedora 20 at the time.
Jiri, My finding was that rsyslog was behaving as expected in RHEL. Seems to me that this "$EscapeControlCharactersOnReceive" option is doing exactly what was meant to. And as commented, I could not reproduce this "misbehave" described in this issue in RHEL at all. In other words switch seems to be working as expected. That's why I ask reporter to confirm was this discovered on RHEL or Fedora. Anyway, comments like "this is fixed in v8/rebase" really don't help when it comes to reproduce the issue. Prove me wrong, but for me this issue should be addressed to Fedora in the first place.
As described in my previous comments, this issue seems not to be present in RHEL-7.x Closing it as "NOTABUG"
I am making relevant comments public so the reporter can read why the bug was closed.