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
  • Christian Brauner's avatar
    sysctl: return -EINVAL if val violates minmax · 33bc00a5
    Christian Brauner authored May 14, 2019
    [ Upstream commit e260ad01 ]
    
    Currently when userspace gives us a values that overflow e.g.  file-max
    and other callers of __do_proc_doulongvec_minmax() we simply ignore the
    new value and leave the current value untouched.
    
    This can be problematic as it gives the illusion that the limit has
    indeed be bumped when in fact it failed.  This commit makes sure to
    return EINVAL when an overflow is detected.  Please note that this is a
    userspace facing change.
    
    Link: http://lkml.kernel.org/r/20190210203943.8227-4-christian@brauner.io
    
    
    Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
    Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Dominik Brodowski <linux@dominikbrodowski.net>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Joe Lawrence <joe.lawrence@redhat.com>
    Cc: Waiman Long <longman@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    33bc00a5
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7