Do not require CAP_SYS_ADMIN for reading from /proc/kmsg
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Kees Cook | ||
linux-fsl-imx51 (Ubuntu) |
Fix Released
|
Medium
|
Andy Whitcroft |
Bug Description
Right now, the kernel requires root privileges (in particular, CAP_SYS_ADMIN) not only to open /proc/kmsg, but also to read from it:
$ sudo python
[sudo] password for martin:
>>> import os
>>> f=open(
>>> os.seteuid(1000)
>>> f.read()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 1] Operation not permitted
Due to this, we need to jump through ridiculous hoops to make rsyslog run as non-root user: /etc/init/
Changed in linux (Ubuntu): | |
assignee: | nobody → Kees Cook (kees) |
tags: | added: patch |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
Changed in linux-fsl-imx51 (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Andy Whitcroft (apw) |
This patch implements the ability to not need CAP_SYS_ADMIN for each read on a /proc/kmsg file descriptor. (Submitted to upstream LKML.)