百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

cve-2014-0038

> 编程语言
开源

针对 CVE-2014-0038 的 Linux 本地根权限漏洞

199 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

针对 CVE-2014-0038 的 Linux 本地根权限漏洞

Local root exploit for CVE-2014-0038

Bug:

The X86_X32 recvmmsg syscall does not properly sanitize the timeout pointer passed from userspace.

Exploit primitive:

Pass a pointer to a kernel address as timeout for recvmmsg, if the original byte at that address is known it can be overwritten with known data. If the least significant byte is 0xff, waiting 255 seconds will turn it into a 0x00.

Restrictions:

The first long at the passed address (tv_sec) has to be positive and the second long (tv_nsec) has to be smaller than 1000000000.

Overview:

Target the release function pointer of the ptmx_fops structure located in non initialized (and thus writable) kernel memory. Zero out the three most significant bytes and thus turn it into a pointer to an address mappable in user space. The release pointer is used as it is followed by 16 0x00 bytes (so the tv_nsec is valid). Open /dev/ptmx, close it and enjoy.

Not very beautiful but should be fairly reliable if symbols can be resolved.

Tested on Ubuntu 13.10

See also http://blog.includesecurity.com/2014/03/exploit-CVE-2014-0038-x32-recvmmsg-kernel-vulnerablity.html

Run:

Retrieve addresses from /proc/kallsyms and run the exploit:

./build.sh && ./timeoutpwn

If you would like to build the binary for a remote server, try this:

bash
ssh user@host 'cat /proc/kallsyms' > syms.txt
CFLAGS=-static ./build.sh syms.txt
scp timeoutpwn user@host:
...

If ptmx_fops cannot be found in kallsyms, try extracting it from the vmlinux as provided with the headers package (linux-headers on Arch Linux):

nm /lib/modules/$(uname -r)/build/vmlinux > syms.txt

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Cexploitkernellinux

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言