Bug 241269 - syslogd fails to log anything if there is a unicode character in the hostname of a machine
Summary: syslogd fails to log anything if there is a unicode character in the hostname...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-15 13:59 UTC by Sverre
Modified: 2019-11-10 12:24 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 Sverre 2019-10-15 13:59:56 UTC
I have this machine that has a single unicode character (a monkey) as it's hostname.. In the past this has worked quite well but now syslogd doesn't log anything at all. I am not 100% sure when the regression happened, but I suspect it was around February this year. 

Turning on the debug-flag I see the screen filling up with:
Failed to parse HOSTNAME from and then every single line of output that should have been logged. 

I suspect this might happen to anybody that has a funky character in their hostname.
Comment 1 Yuri Pankov freebsd_committer freebsd_triage 2019-10-17 06:19:02 UTC
Which exactly character (code) is the problem?
Comment 2 Sverre 2019-10-18 17:13:32 UTC
(In reply to Yuri Pankov from comment #1)
🐒
Comment 3 Sverre 2019-10-18 17:14:03 UTC
(In reply to Sverre from comment #2)
The hostname is 🐒.domain.blah
Comment 4 Sverre 2019-11-01 14:47:43 UTC
Actually it seems that it's enough to have some emoji char in your hostname - it doesn't have to be all emoji... so awef🐒awef.domain.blah will also make syslogd fail to log... I think it's the part where it strips out "dangerous characters" that is the culprit,.. Compiling a version without that check now to see if that works.
Comment 5 Sverre 2019-11-01 15:45:43 UTC
It doesn't actually have to be an emoji either.. ℬ, ⨊, ... even the norwegian letters like å,æ,ø makes it fail.. and the swedish variants ä, ö .. It's a nice way to disable all logging if you got root on a box: just switch your hostname to something that has a  weird character in it and there is basically no trace of anything you do on it.