Bug 780

Summary: visudo does not catch UTF-8 EN SPACE characters
Product: Sudo Reporter: Sebastian Wiesinger <sudo>
Component: VisudoAssignee: Todd C. Miller <Todd.Miller>
Status: ASSIGNED ---    
Severity: normal    
Priority: low    
Version: 1.8.10   
Hardware: PC   
OS: Linux   
Attachments: sudoers UTF-8 example

Description Sebastian Wiesinger 2017-03-20 07:05:59 MDT
Created attachment 489 [details]
sudoers UTF-8 example

While trying to enter new sudo entries into a sudoers file someone pasted a line that had UTF-8 EN SPACE (U+2002) chars instead of "normal" 0x20 space chars. This was not visible and not detected by visudo. The lines where then not used and not visible while doing sudo -l.

I'm attaching an example file with the offending lines.
Comment 1 Todd C. Miller 2017-04-12 08:22:28 MDT
In this case the UTF-8 characters are treated as part of the username since sudoers is parsed in the  C locale by default.  The least surprising thing may be for the sudoers parser to treat the various UTF-8 space characters as blanks regardless of the sudoers locale.