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
  • module.c
Find file BlameHistoryPermalink
  • Kees Cook's avatar
    module: Do not expose section addresses to non-CAP_SYSLOG · c744568a
    Kees Cook authored Jul 02, 2020
    commit b25a7c5a
    
     upstream.
    
    The printing of section addresses in /sys/module/*/sections/* was not
    using the correct credentials to evaluate visibility.
    
    Before:
    
     # cat /sys/module/*/sections/.*text
     0xffffffffc0458000
     ...
     # capsh --drop=CAP_SYSLOG -- -c "cat /sys/module/*/sections/.*text"
     0xffffffffc0458000
     ...
    
    After:
    
     # cat /sys/module/*/sections/*.text
     0xffffffffc0458000
     ...
     # capsh --drop=CAP_SYSLOG -- -c "cat /sys/module/*/sections/.*text"
     0x0000000000000000
     ...
    
    Additionally replaces the existing (safe) /proc/modules check with
    file->f_cred for consistency.
    
    Reported-by: default avatarDominik Czarnota <dominik.czarnota@trailofbits.com>
    Fixes: be71eda5
    
     ("module: Fix display of wrong module .text address")
    Cc: stable@vger.kernel.org
    Tested-by: default avatarJessica Yu <jeyu@kernel.org>
    Acked-by: default avatarJessica Yu <jeyu@kernel.org>
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    c744568a
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7