Debian SE Linux 与 PinTheft

Lobsters Hottest 新闻

摘要

文章报道了 PinTheft Linux 漏洞,并测试了其在 Debian 系统上启用 SELinux 时的表现,发现严格的 SELinux 配置能够阻止该漏洞。

<p><a href="https://lobste.rs/s/jlhsqw/debian_se_linux_pintheft">评论</a></p>
查看原文
查看缓存全文

缓存时间: 2026/05/24 12:57

# Debian SELinux 与 PinTheft 来源:https://etbe.coker.com.au/2026/05/24/debian-selinux-pintheft/ 我们发现了[一个名为 PinTheft 的新 Linux 漏洞 \[1\]](https://github.com/v12-security/pocs/tree/main/pintheft)。我在 Debian 内核 **6.12.74+deb13+1-amd64** 上对其进行了测试。 ## user_t 当我以 user_t 身份运行该漏洞利用程序时,在审计日志中看到如下内容: `` type=PROCTITLE msg=audit(1779615031.043:15540): proctitle="./exp" type=AVC msg=audit(1779615031.043:15541): avc: denied { create } for pid=1360 comm="exp" scontext=user_u:user_r:user_t:s0 tcontext=user_u:user_r:user_t:s0 tclass=rds_socket permissive=0 type=SYSCALL msg=audit(1779615031.043:15541): arch=c000003e syscall=41 success=no exit=-13 a0=15 a1=5 a2=0 a3=0 items=0 ppid=879 pid=1360 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=pts0 ses=1 comm="exp" exe="/home/test/b/pocs/pintheft/exp" subj=user_u:user_r:user_t:s0 key=(null)ARCH=x86_64 SYSCALL=socket AUID="test" UID="test" GID="test" EUID="test" SUID="test" FSUID="test" EGID="test" SGID="test" FSGID="test" `` 运行漏洞利用程序后的最后输出如下: `` [-] only stole 0/1024 refs — may not be enough [-] too few stolen refs, aborting [-] attempt 5 failed, retrying... [-] all 5 attempts failed `` ## unconfined_t 当我以 unconfined_t 身份运行时,输出相同,并且使用 strace 跟踪时看到大量如下内容: `` socket(AF_RDS, SOCK_SEQPACKET, 0) = -1 EAFNOSUPPORT (Address family not supported by protocol) `` 在我运行了 “**modprobe rds**” 之后,该漏洞利用程序在 unconfined_t 下成功执行,输出如下: `` [*] verifying page cache overwrite... [*] page cache page 0 AFTER overwrite (our shellcode) (129 bytes): 0000: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............| 0010: 03 00 3e 00 01 00 00 00 68 00 00 00 00 00 00 00 |..>.....h.......| 0020: 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |8...............| 0030: 00 00 00 00 40 00 38 00 01 00 00 00 05 00 00 00 |[email protected].........| 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 0050: 2f 62 69 6e 2f 73 68 00 81 00 00 00 00 00 00 00 |/bin/sh.........| 0060: 81 00 00 00 00 00 00 00 31 ff b0 69 0f 05 48 8d |........1..i..H.| 0070: 3d db ff ff ff 6a 00 57 48 89 e6 31 d2 b0 3b 0f |=....j.WH..1..;.| 0080: 05 |.| [+] verification PASSED — page cache overwritten with SHELL_ELF [+] executing /usr/bin/su (now contains setuid(0) + execve /bin/sh)... === RESTORE: sudo cp /tmp/.backup_su_13294 /usr/bin/su && sudo chmod u+s /usr/bin/su === # `` ## 结论 处于“严格”配置下的 SELinux 可阻止此漏洞利用。 测试虚拟机运行的是 Debian/Testing,我没有费力去调查不加载 **rds** 模块是 Debian 的默认设置,还是我直接或间接修改的结果。对我而言,通过 SELinux 实现的安全比通过控制模块加载实现的安全更值得关注。 - https://github.com/v12-security/pocs/tree/main/pintheft

相似文章

Linux内核中因单个错误字符导致的高危漏洞

Ars Technica

Linux内核中一个错误的字符引入了一个use-after-free漏洞(CVE-2026-53111),允许非特权用户在Debian和Ubuntu系统上将权限提升至root;该漏洞已修复并移植回旧版本。

Dirtyfrag:通用 Linux 本地权限提升漏洞

Hacker News Top

一份名为“Dirty Frag”的报告详细描述了一种通用的 Linux 本地权限提升(LPE)漏洞。该漏洞通过串联两个内核错误,可在主要发行版上获取 root 访问权限。披露信息指出,由于保密期失效,目前尚无针对此关键安全问题的补丁。

deepsec

Product Hunt

Deepsec 是一个开源的代码安全工具集,旨在帮助开发者识别并修复代码中的安全漏洞。