Proposal: Enabling DMESG_RESTRICT for Groovy Onward
matthew.ruffell at canonical.com
Tue Aug 11 00:03:58 UTC 2020
I am again following up on my proposal to enable CONFIG_SECURITY_DMESG_RESTRICT
on Groovy onward with debdiffs necessary to implement the feature.
Since there have been no replies, I am assuming that no one has any objections
to adding this feature. The kernel team and security team are +1 due to their
agreement to enable CONFIG_SECURITY_DMESG_RESTRICT in the kernel.
I will ask a SEG package uploader to sponsor the debdiffs for procps and
util-linux in one week's time, on 2020-08-18. It would be great if a core
maintainer could +1 or ACK the changes, or please write back with any objections
Gianfranco Costamagna and Chris Hofstaedtler, I have included you to ask if you
have any objections, since you commonly perform merges from debian, and the
changes to util-linux may increase maintenance burden.
I propose that we restrict access to dmesg to users in group 'adm' like so:
1) CONFIG_SECURITY_DMESG_RESTRICT=y in the kernel.
2) Following changes to /bin/dmesg permissions in package 'util-linux'
- Ownership changes to root:adm
- Permissions changed to 0750 (-rwxr-x---)
- Add cap_syslog capability to binary.
3) Add a commented out '# kernel.dmesg_restrict = 0' to
Why do we want this?
Currently unprivileged users can access the kernel log buffer / dmesg with no
restrictions, but cannot access journalctl or /var/log/kern.log or /var/log/syslog.
Kernel oops messages can leak sensitive information such as kernel pointers in
their register dumps, which helps attackers with their priv esc exploits.
For more context, read:
1) Has been implemented with commit:
This has now landed in kernel 5.8.0-12-generic in groovy-proposed.
2) I have prepared a debdiff to util-linux which implements the changes, and
is ready for review here:
3) I have prepared a debdiff to procps, and is ready for review here:
Can I please get feedback on the long term maintainability of the patches,
particularly the changes to util-linux? Would Debian be interested in these
If everyone is in agreement with the changes, can I please get the debdiffs
The Launchpad Bug for this proposal is LP1886112:
Test packages for procps and util-linux for Groovy can be found in this ppa:
More information about the ubuntu-devel