Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • X xcap-capability-linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • 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
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • xcap
  • xcap-capability-linux
  • Repository

Switch branch/tag
  • xcap-capability-linux
  • arch
  • s390
  • kernel
  • ptrace.c
Find file BlameHistoryPermalink
  • Jarod Wilson's avatar
    [S390] CVE-2008-1514: prevent ptrace padding area read/write in 31-bit mode · 3d6e48f4
    Jarod Wilson authored Sep 09, 2008
    When running a 31-bit ptrace, on either an s390 or s390x kernel,
    reads and writes into a padding area in struct user_regs_struct32
    will result in a kernel panic.
    
    This is also known as CVE-2008-1514.
    
    Test case available here:
    http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/tests/ptrace-tests/tests/user-area-padding.c?cvsroot=systemtap
    
    
    
    Steps to reproduce:
    1) wget the above
    2) gcc -o user-area-padding-31bit user-area-padding.c -Wall -ggdb2 -D_GNU_SOURCE -m31
    3) ./user-area-padding-31bit
    <panic>
    
    Test status
    -----------
    Without patch, both s390 and s390x kernels panic. With patch, the test case,
    as well as the gdb testsuite, pass without incident, padding area reads
    returning zero, writes ignored.
    
    Nb: original version returned -EINVAL on write attempts, which broke the
    gdb test and made the test case slightly unhappy, Jan Kratochvil suggested
    the change to return 0 on write attempts.
    Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
    Tested-by: default avatarJan Kratochvil <jan.kratochvil@redhat.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    3d6e48f4

Replace ptrace.c

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.