echo string to /dev/kmsg fails to appear on /var/log/syslog
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
rsyslog (Ubuntu) |
Fix Released
|
Medium
|
Chris J Arges | ||
Precise |
Fix Released
|
Medium
|
Chris J Arges | ||
Trusty |
Fix Released
|
Medium
|
Chris J Arges |
Bug Description
[Impact]
In the precise 3.2 series kernel writing strings to /dev/kmsg appears and dmesg and /var/log/syslog, in 3.5 series kernel this does not happen properly even with the equivalent userspace packages.
This is because the default facility number in the kernel has changed from 0 to 1 for user-space generated kmsg entries. Because of this; rsyslog (or any affected sysloggers) need to accept non-kernel facility numbers.
This change was introduced by this commit (in the linux kernel):
7ff9554bb578ba0
[Test Case]
Run the following script as root:
#!/bin/bash
STRING=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 32)
# > /var/log/syslog # this isn't necessary
echo $STRING > /dev/kmsg
sleep 5
grep $STRING /var/log/syslog
# This should return 0.
[Regression Potential]
Any scripts that rely on syslog output may finally see output produced by packages like init/systemd show up in syslog. This changes the default rsyslog.conf file settings but isn't a code change.
Changed in linux (Ubuntu Quantal): | |
assignee: | nobody → Chris J Arges (arges) |
Changed in linux (Ubuntu Saucy): | |
assignee: | nobody → Chris J Arges (arges) |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Quantal): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Saucy): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu): | |
status: | New → In Progress |
Changed in linux (Ubuntu Quantal): | |
status: | New → In Progress |
Changed in linux (Ubuntu Saucy): | |
status: | New → In Progress |
no longer affects: | linux (Ubuntu Quantal) |
no longer affects: | linux (Ubuntu Saucy) |
no longer affects: | linux (Ubuntu Precise) |
no longer affects: | linux (Ubuntu Trusty) |
Changed in rsyslog (Ubuntu Precise): | |
assignee: | nobody → Chris J Arges (arges) |
Changed in rsyslog (Ubuntu Trusty): | |
assignee: | nobody → Chris J Arges (arges) |
Changed in rsyslog (Ubuntu Precise): | |
importance: | Undecided → Medium |
Changed in rsyslog (Ubuntu Trusty): | |
importance: | Undecided → Medium |
Changed in rsyslog (Ubuntu Precise): | |
status: | New → In Progress |
Changed in rsyslog (Ubuntu Trusty): | |
status: | New → In Progress |
After doing a bisect, I found the first bad commit is: 2166071d2d487b7 fc7d860d62
7ff9554bb578ba0