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
You need to sign in or sign up before continuing.
  • linux
  • kernel
  • seccomp.c
Find file BlameHistoryPermalink
  • Tycho Andersen's avatar
    seccomp: don't leave dangling ->notif if file allocation fails · e8393179
    Tycho Andersen authored Sep 02, 2020
    
    
    Christian and Kees both pointed out that this is a bit sloppy to open-code
    both places, and Christian points out that we leave a dangling pointer to
    ->notif if file allocation fails. Since we check ->notif for null in order
    to determine if it's ok to install a filter, this means people won't be
    able to install a filter if the file allocation fails for some reason, even
    if they subsequently should be able to.
    
    To fix this, let's hoist this free+null into its own little helper and use
    it.
    
    Reported-by: default avatarKees Cook <keescook@chromium.org>
    Reported-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
    Signed-off-by: default avatarTycho Andersen <tycho@tycho.pizza>
    Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
    Link: https://lore.kernel.org/r/20200902140953.1201956-1-tycho@tycho.pizza
    
    
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    e8393179
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7