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
  • debug
  • debug_core.c
Find file BlameHistoryPermalink
  • Daniel Thompson's avatar
    lockdown: also lock down previous kgdb use · eadb2f47
    Daniel Thompson authored May 23, 2022
    
    
    KGDB and KDB allow read and write access to kernel memory, and thus
    should be restricted during lockdown.  An attacker with access to a
    serial port (for example, via a hypervisor console, which some cloud
    vendors provide over the network) could trigger the debugger so it is
    important that the debugger respect the lockdown mode when/if it is
    triggered.
    
    Fix this by integrating lockdown into kdb's existing permissions
    mechanism.  Unfortunately kgdb does not have any permissions mechanism
    (although it certainly could be added later) so, for now, kgdb is simply
    and brutally disabled by immediately exiting the gdb stub without taking
    any action.
    
    For lockdowns established early in the boot (e.g. the normal case) then
    this should be fine but on systems where kgdb has set breakpoints before
    the lockdown is enacted than "bad things" will happen.
    
    CVE: CVE-2022-21499
    Co-developed-by: default avatarStephen Brennan <stephen.s.brennan@oracle.com>
    Signed-off-by: default avatarStephen Brennan <stephen.s.brennan@oracle.com>
    Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
    Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    eadb2f47
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7