Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • kernel
  • sysctl.c
Find file BlameHistoryPermalink
  • Richard Weinberger's avatar
    sysctl: restrict write access to dmesg_restrict · bfdc0b49
    Richard Weinberger authored Mar 23, 2011
    
    
    When dmesg_restrict is set to 1 CAP_SYS_ADMIN is needed to read the kernel
    ring buffer.  But a root user without CAP_SYS_ADMIN is able to reset
    dmesg_restrict to 0.
    
    This is an issue when e.g.  LXC (Linux Containers) are used and complete
    user space is running without CAP_SYS_ADMIN.  A unprivileged and jailed
    root user can bypass the dmesg_restrict protection.
    
    With this patch writing to dmesg_restrict is only allowed when root has
    CAP_SYS_ADMIN.
    
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    Acked-by: default avatarDan Rosenberg <drosenberg@vsecurity.com>
    Acked-by: default avatarSerge E. Hallyn <serge@hallyn.com>
    Cc: Eric Paris <eparis@redhat.com>
    Cc: Kees Cook <kees.cook@canonical.com>
    Cc: James Morris <jmorris@namei.org>
    Cc: Eugene Teo <eugeneteo@kernel.org>
    Cc: <stable@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    bfdc0b49
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7