Bug 250972 - (CVE-2007-3848) CVE-2007-3848 Privilege escalation via PR_SET_PDEATHSIG
CVE-2007-3848 Privilege escalation via PR_SET_PDEATHSIG
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Peter Zijlstra
impact=important,source=secalert,repo...
: Security
Depends On: 251115 251116 251117 251118 251119 252306 252307
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-06 05:06 EDT by Marcel Holtmann
Modified: 2007-11-01 09:35 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-01 09:35:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marcel Holtmann 2007-08-06 05:06:01 EDT
Reported by Vulnerability Research Labs, COSEINC PTE Ltd.

An unprivileged user may send arbitrary signal to a child process even
if it is running with higher privileges.

When a parent process dies or exits its child processes may receive a
signal.  Each child process may choose and set its own "parent process
death signal" using PR_SET_PDEATHSIG function of the prctl() system
call. 

        PARENT          CHILD
        ----------------------------------------------------------------
        fork()
                        prctl(PR_SET_PDEATHSIG)
        exit()'ed or killed
                        child receives the signal

The parent process death signal is not reset over execve() system call
and is inherited by spawned process:

        PARENT          CHILD
        ----------------------------------------------------------------
        fork()
                        prctl(PR_SET_PDEATHSIG)
                        execve("./a.out")
        exit()'ed or killed
                        child receives the signal

The signal gets delivered only if parent process has sufficient
privileges to send signals to child processes. Typically any child
process running with higher privilege than its parent will receive no
signal. 

        PARENT          CHILD
        ----------------------------------------------------------------
        fork()
                        prctl(PR_SET_PDEATHSIG)
                        execve("/bin/setuid-binary")
        exit()'ed or killed
                        child receives NO signal this time

However, above restriction may be bypassed if parent process execute
setuid-root binary which dies afterwards.

        PARENT          CHILD
        ----------------------------------------------------------------
        fork()
                        prctl(PR_SET_PDEATHSIG)
                        execve("/bin/setuid-binary")
        execve("/bin/setuid-binary")
        exit()'ed or killed
                        privileged process receives the signal
Comment 6 Marcel Holtmann 2007-08-14 12:14:13 EDT
This went public today:

http://marc.info/?l=openwall-announce&m=118710356812637&w=2
Comment 8 Marcel Holtmann 2007-08-17 15:33:35 EDT
The post of their advisory can be found here:

http://marc.info/?l=bugtraq&m=118711306802632&w=2

Note You need to log in before you can comment on or make changes to this bug.