RetSpill: Igniting User-Controlled Data to Burn Away Linux Kernel Protections


part of the design, and thus cannot be mitigated by existing protec-



tải về 0.65 Mb.
Chế độ xem pdf
trang9/10
Chuyển đổi dữ liệu15.12.2023
Kích0.65 Mb.
#56016
1   2   3   4   5   6   7   8   9   10
retspill


part of the design, and thus cannot be mitigated by existing protec-
tions in the Linux kernel. However, they are enough for successfully
launching RetSpill to achieve full system compromise. We demon-
strate it by successfully exploiting CVE-2016-4557 with RetSpill
only using Valid Data and Calling Convention spillage. To fill the
gap, we developed a protection to mitigate this data spillage. As
shown in Figure 5, our protection inserts a random offset at the bot-
tom of each stack frame. To prevent the random offset region from
becoming the source of Uninitialized Memory data spillage, we
clear the region right after the insertion. As a consequence, when
CFHP is obtained by attackers, they will not be able to reuse user
data directly without guessing the random offset, which drastically
reduces exploit reliability.
Denote the average call-stack depth as 𝐷, the entropy of the
proposed protection is 5 + 𝑙𝑜𝑔(𝐷) bits, which is slightly higher than
RANDKSTACK(5 bits). More importantly, the protection prevents
attackers from accessing all data spillage, whereas RANDKSTACK
only prevents Preserved Registers and Uninitialized Memory.
Due to its lightweight nature, the proposed protection only intro-
duces an average performance overhead of 0.61% as evaluated on
benchmarks from LMBench and Phoronix. The detailed evaluation
result can be found in Table 6.
9
DISCUSSION
Automatic Exploit Context Analysis.
In this work, we only
analyze RetSpill under limited exploit contexts. As mentioned in
§7.1, different system calls can be used to trigger the payload on
Benchmark
Vanilla
Hardened
Overhead
Phoronix
Apache (Reqs/s)
149470.35
150295.67
0.55%
PHPBench (Score)
830189
840718
1.27%
PyBench (ms)
889
885
0.45%
OpenSSL-SHA256 (byte/s)
20984220257
20797618197
-0.89%
OpenSSL-SHA512 (byte/s)
6859393693
6812764710
-0.68%
OpenSSL-RSA4096 (sign/s)
3119.7
3105.9
-0.44%
OpenSSL-RSA4096 (verify/s)
204263.3
203177.1
-0.53%
LMBench
Context Switch (ms)
2.036428571
2.047
-0.52%
UDP (ms)
7.3116
7.4854
-2.32%
TCP (ms)
9.2525
9.3546
-1.09%
10k File Create (ms)
10.99
10.89
0.92%
10k File Delete (ms)
5.89229
5.71896
3.03%
pipe (MB/s)
3648.6
3587.8
-1.67%
AF Unix (MB/s)
8968.9
8712.5
-2.86%
TCP (MB/s)
8081.6
7964.8
-1.45%
mmap Reread (MB/s)
18.61
17.95
-3.55%
Table 6: Performance overhead evaluation of the proposed
defense on Phoronix and LMBench.
the heap, which create different exploit contexts. To fully evaluate
the severity of RetSpill, an automatic solution is needed to explore
all possible exploit contexts for each vulnerability. One such work
is FUZE [71], which combines fuzzing and symbolic execution to
facilitate exploit generation automatically. We can potentially use
its fuzzing and symbolic execution engines to explore different
exploit contexts automatically. We leave the integration with FUZE
for automatic exploit context analysis as future work.
Uninitialized Memory Spillage Evaluation.
In our current
evaluation for IGNI, we do not include data spillage caused by unini-
tialized memory. This is because we lack a way to automatically
and deterministically control uninitialized memory on the kernel
stack. The most relevant research lately on this topic are targeted
stack spray [45] and leak-kptr [8]. We contacted the authors but
failed to port their prototypes to the modern Linux kernel because
of its rapid development in the past few years. Since the evaluation
requires a new automatic approach to perform stack spray, which
is out of the scope of this work, we leave it as future work.
Fine-Grained Randomization Protections.
Existing such pro-
tections in the Linux kernel (e.g., FG-KASLR [34] and kR^X [48])
cannot randomize all kernel executable code, which leaves the ker-
nel vulnerable to RetSpill. Even with perfect fine-grained random-
ization protection, attackers can still use speculative probing [21]
or an arbitrary read primitive to disclose usable ROP gadgets and
launch RetSpill in JIT-ROP [59] style. Thus, we believe fine-grained
randomization may not be a good solution to mitigate RetSpill.
Stealthy Rootkit.
Primitives provided by RetSpill allow attack-
ers to reliably program the kernel from user space. This opens up
the possibility of rootkits that manipulate the kernel without esca-
lating its privilege. As a consequence, this hypothetical rootkit can
bypass intrusion detection techniques based on detecting suspicious
privilege escalation behaviors [27, 56]. Worse still, its every action
involves only the triggering system call, which means malicious


logic can be executed in kernel space while only leaving a trace of
seemingly benign system calls such as close.
Applicability to Other Systems.
RetSpill is not specific to
Linux. Any system that involves exchanging data between a trusted
entity and an untrusted one needs to avoid untrusted data spillage
on the trusted stacks. For example, other operating systems or
hypervisors are potentially susceptible to RetSpill attack. We leave
the verification and severity evaluation of RetSpill on other systems
as future work.
10
RELATED WORK
Exploring Memory Corruption Capability.
Memory corrup-
tion capability is obtained after a vulnerability is triggered. In order
to reliably trigger race condition bugs, Lee et al. [39] use interrupts
to extend race windows for winning races and eventually achieve
memory corruption capability. FUZE [71] explores different use
sites of UAF vulnerabilities with under-context fuzzing. GREBE [41]
proposes an object-driven fuzzing technique to trigger vulnerabili-
ties in different contexts and explore different memory corruption
capabilities. Syzscope [77] symbolizes kernel memory and extracts
memory corruption capabilities through symbolic execution.
Obtaining Exploitation Primitive.
With the memory corrup-
tion capability in hand, researchers propose various techniques
to obtain exploitation primitives. Cho et al. [8] utilizes eBPF to
achieve pointer leak from uninitialized stack variables. Lu et al. [45]
introduce targeted stack spray techniques to exploit use-before-
initialization vulnerabilities. There are also many research works on
kernel heap exploitation. SLAKE [7] introduces different techniques
to manipulate heap memory layout. With the help of elastic ob-
jects, ELOISE [6] proposes a general method to obtain information
leak primitive from an overwrite capability. KOOBE [5] explores
different exploit primitives from heap out-of-bound write capabil-
ity. KHeaps [75] systematically studies the reliability problem in
kernel exploitation and proposes a new stabilization technique. In
order to prevent heap exploitation, many defenses are proposed.
AUTOSLAB [40] proposes to isolate different types of objects into
different slab caches and thus mitigates memory layout manipula-
tion. Hardened Usercopy [11] is introduced to the Linux kernel to
prevent out-of-bound access exploitation.
Escalating Privilege.
Privilege escalation could be done through
control flow hijacking (CFH) attacks. Originally, attackers could
directly hijack the control flow to userspace [32]. The introduc-
tion of kernel space and user space isolation (e.g. KPTI [25, 64],
SMEP [12]/SMAP [47]) mitigates such attacks. With the presence
of isolation, attackers have to inject payload into kernel space.
ret2dir [31] breaks this isolation with physmap, which is mapped
in a predictable region in kernel space. To mitigate CFH attacks,
KASLR [10] and KCFI [16, 20, 36, 73] are proposed. Specifically,
KASLR randomizes kernel address space layout, making addresses
of existing code unpredictable and thus downgrading the reliability
of code reuse attacks. Recently, KASLR has been further extended
as FG-KASLR [34], which randomizes address space layout at func-
tion granularity. CFI preserves the control-flow integrity to pre-
vent CFH attacks. There are different implementations of CFI in
the Linux kernel, including software-based [20, 22] and hardware-
assisted [16, 36, 73]. Other than CFH attacks, data-only attacks are
also capable of escalating privilege. Through an overwriting primi-
tive, attackers could tamper the credentials of the exploit process
to escalate privilege [4]. DirtyCred [42] demonstrates privileged
escalation by replacing unprivileged credentials with privileged cre-
dentials. To prevent data-only attacks, xMP [52] protects sensitive
data utilizing hardware virtualization techniques. PrivGuard [68]
creates duplicate memory to ensure the modifications to sensitive
data are legitimate.
Our work systematically studies the data spillage problem on
kernel stack and discovers a novel and powerful attack: RetSpill.
We thoroughly evaluate RetSpill and show that it can be automated
with our prototype, IGNI.
RetSpill could bypass FG-KASLR [34] which previous research –
KEPLER [70] is not capable of. In addition, compared to KEPLER
and conventional ROP attacks [26, 69], RetSpill has no requirement
of register control and heap control, which significantly simplifies
the process of launching attacks. We also do not assume the infor-
mation of the base of physmap as KEPLER. Furthermore, RetSpill
enables unlimited CFHP without changing the payload on the heap,
which introduces no degradation to exploit reliability for further
exploitation. This feature of RetSpill makes it a stable exploitation
technique, which other "single-shot" exploitation techniques, such
as KEPLER, are unable to achieve.
11
CONCLUSION
We show that untrusted user data on kernel stack are threats to
Linux kernel security. In this research, we discover RetSpill, a dan-
gerous Linux kernel exploitation technique that requires minimal
exploit primitives. Provided with CFHP, RetSpill can utilize seem-
ingly harmless user space data on kernel stack to break the bound-
ary between user space and kernel space despite the presence of
all commonly deployed protections in Linux. We thoroughly study
the technique and show that it is applicable in 21 out of 22 public
exploits. Worse still, we demonstrate RetSpill can be automated,
which makes it even more dangerous. Our proof-of-concept proto-
type, IGNI, semi-automatically turns 20 out of 22 public exploits
that manifest CFHP into full privilege escalation exploits. Finally,
we explore potential protections to minimize the impact of RetSpill.
12
ACKNOWLEDGEMENT
We would like to thank the anonymous reviewers for their insightful
feedback.
This material was supported by 2023 Google PhD Fellowship
Program, NSF CNS-2000792, and grants from Defense Advanced Re-
search Projects Agency (DARPA) under contracts HR001118C0060,
FA8750-19C-0003, and N66001-22-C-4026.


REFERENCES
[1] sefcom/kheaps. https://github.com/sefcom/KHeaps/blob/master/exploit_env/
CVEs/CVE-2017-7533/poc/poc_cfh_combo.c.
[2] angr team. angr/angrop. https://github.com/angr/angrop.
[3] Tyler Bletsch, Xuxian Jiang, Vince W Freeh, and Zhenkai Liang. Jump-oriented
programming: a new class of code-reuse attack. In Proceedings of the 6th ACM
symposium on information, computer and communications security, pages 30–40,
2011.
[4] Hao Chen, David Wagner, and Drew Dean. Setuid demystified. In 11th USENIX
Security Symposium (USENIX Security 02), 2002.
[5] Weiteng Chen, Xiaochen Zou, Guoren Li, and Zhiyun Qian. {KOOBE}: Towards
facilitating exploit generation of kernel {Out-Of-Bounds} write vulnerabilities.
In 29th USENIX Security Symposium (USENIX Security 20), pages 1093–1110, 2020.
[6] Yueqi Chen, Zhenpeng Lin, and Xinyu Xing. A systematic study of elastic objects
in kernel exploitation. In Proceedings of the 2020 ACM SIGSAC Conference on
Computer and Communications Security, pages 1165–1184, 2020.
[7] Yueqi Chen and Xinyu Xing. Slake: Facilitating slab manipulation for exploiting
vulnerabilities in the linux kernel. In Proceedings of the 2019 ACM SIGSAC
Conference on Computer and Communications Security, pages 1707–1722, 2019.
[8] Haehyun Cho, Jinbum Park, Joonwon Kang, Tiffany Bao, Ruoyu Wang, Yan
Shoshitaishvili, Adam Doupé, and Gail-Joon Ahn. Exploiting uses of uninitialized
stack variables in linux kernels to leak kernel pointers. In 14th USENIX Workshop
on Offensive Technologies (WOOT 20), 2020.
[9] Tobias Cloosters, David Paaßen, Jianqiang Wang, Oussama Draissi, Patrick
Jauernig, Emmanuel Stapf, Lucas Davi, and Ahmad-Reza Sadeghi. Riscyrop:
Automated return-oriented programming attacks on risc-v and arm64. In Pro-
ceedings of the 25th International Symposium on Research in Attacks, Intrusions
and Defenses, pages 30–42, 2022.
[10] Kees Cook. Kernel address space layout randomization. https://lwn.net/Articles/
546035/, 2013.
[11] Kees Cook. Hardened usercopy. https://lwn.net/Articles/693745/, 2016.
[12] Jonathan Corbet. Supervisor mode access prevention. https://lwn.net/Articles/
517475/, 2012.
[13] Dino Dai Zovi. Practical return-oriented programming. Source boston, 2010.
[14] Lucas Davi, David Gens, Christopher Liebchen, and Ahmad-Reza Sadeghi. Pt-
rand: Practical mitigation of data-only attacks against page tables. In NDSS,
2017.
[15] Vincent Dehors. Exploitation of a double free vulnerability in ubuntu shiftfs
driver. https://www.synacktiv.com/en/publications/exploitation-of-a-double-
free-vulnerability-in-ubuntu-shiftfs-driver-cve-2021-3492.html, 2021.
[16] Rémi Denis-Courmont, Hans Liljestrand, Carlos Chinea, and Jan-Erik Ekberg.
Camouflage: Hardware-assisted cfi for the arm linux kernel.
In 2020 57th
ACM/IEEE Design Automation Conference (DAC), pages 1–6. IEEE, 2020.
[17] Marco Elver.
stack: Introduce config_randomize_kstack_offset.
https:
//lore.kernel.org/lkml/YfQ54x8zglPT%2FYnL@dev-arch.archlinux-ax161/t/#u,
2022.
[18] Nicolas FABRETTI. Cve-2017-11176: A step-by-step linux kernel exploitation.
https://blog.lexfo.fr/cve-2017-11176-linux-kernel-exploitation-part4.html.
[19] FizzBuzz101. Will’s root: Cve-2022-0185. https://www.willsroot.io/2022/01/cve-
2022-0185.html, 2022.
[20] Xinyang Ge, Nirupama Talele, Mathias Payer, and Trent Jaeger. Fine-grained
control-flow integrity for kernel software. In 2016 IEEE European Symposium on
Security and Privacy (EuroS&P), pages 179–194. IEEE, 2016.
[21] Enes Göktas, Kaveh Razavi, Georgios Portokalidis, Herbert Bos, and Cristiano
Giuffrida. Speculative probing: Hacking blind in the spectre era. In Proceedings
of the 2020 ACM SIGSAC Conference on Computer and Communications Security,
pages 1871–1885, 2020.
[22] Google. Kernel control flow integrity. https://source.android.com/docs/security/
test/kcfi.
[23] Google. Kernel exploit recipes notebook - google docs. https://docs.google.com/
document/d/1a9uUAISBzw3ur1aLQqKc5JOQLaJYiOP5pe_B4xCT1KA/edit#.
[24] Grimm.
Notquite0dayfriday/2021.03.12-linux-iscsi at trunk · grimm-
co/notquite0dayfriday. https://github.com/grimm-co/NotQuite0DayFriday/tree/
trunk/2021.03.12-linux-iscsi.
[25] Daniel Gruss, Moritz Lipp, Michael Schwarz, Richard Fellner, Clémentine Maurice,
and Stefan Mangard. Kaslr is dead: long live kaslr. In International Symposium
on Engineering Secure Software and Systems, pages 161–176. Springer, 2017.
[26] Garrett Gu and Hovav Shacham. Return-oriented programming in risc-v. arXiv
preprint arXiv:2007.14995, 2020.
[27] Isovalent. Detecting a container escape with cilium and ebpf - isovalent. https:
//isovalent.com/blog/post/2021-11-container-escape/, 2021.
[28] Kyriakos K Ispoglou, Bader AlBassam, Trent Jaeger, and Mathias Payer. Block
oriented programming: Automating data-only attacks. In Proceedings of the
2018 ACM SIGSAC Conference on Computer and Communications Security, pages
1868–1882, 2018.
[29] David Bouman Jayden Rivers. Cve-2022-29582: An io_uring vulnerability. https:
//ruia-ruia.github.io/2022/08/05/CVE-2022-29582-io-uring/, 2022.
[30] Xingyu Jin, Christian Resell, Clement Lecigne, and Neal Richard. Monitor-
ing surveillance vendors: A deep dive into in-the-wild android full chains
in 2021.
https://i.blackhat.com/USA-22/Wednesday/US-22-Jin-Monitoring-
Surveillance-Vendors.pdf, 2022.
[31] Vasileios P Kemerlis, Michalis Polychronakis, and Angelos D Keromytis. ret2dir:
Rethinking kernel isolation. In 23rd USENIX Security Symposium (USENIX Security
14), pages 957–972, 2014.
[32] Vasileios P Kemerlis, Georgios Portokalidis, and Angelos D Keromytis. {kGuard}:
Lightweight kernel protection against {Return-to-User} attacks. In 21st USENIX
Security Symposium (USENIX Security 12), pages 459–474, 2012.
[33] Andrey Konovalov. Project zero: Exploiting the linux kernel via packet sock-
ets. https://googleprojectzero.blogspot.com/2017/05/exploiting-linux-kernel-
via-packet.html.
[34] Alexander Lobakin Kristen Carlson Accardi. Function granular kaslr [lwn.net].
https://lwn.net/Articles/832434/, 2020.
[35] Greg
Kroah-Hartman.
Introduce
static_usermodehelper
to
medi-
ate
call_usermodehelper()
-
patchwork.
https://lore.kernel.org/all/
20170116165044.GC29693@kroah.com/, 2017.
[36] Donghyun Kwon, Jiwon Seo, Sehyun Baek, Giyeol Kim, Sunwoo Ahn, and Yun-
heung Paek. Vm-cfi: Control-flow integrity for virtual machine kernel using
intel pt. In International Conference on Computational Science and Its Applications,
pages 127–137. Springer, 2018.
[37] Dang Le. Learning linux kernel exploitation - part 1. https://lkmidas.github.io/
posts/20210123-linux-kernel-pwn-part-1/#the-simplest-exploit---ret2usr.
[38] Dang Le. Learning linux kernel exploitation - part 3 - midas blog. https://
lkmidas.github.io/posts/20210205-linux-kernel-pwn-part-3/, 2021.
[39] Yoochan Lee, Changwoo Min, and Byoungyoung Lee. {ExpRace}: Exploiting
kernel races through raising interrupts. In 30th USENIX Security Symposium
(USENIX Security 21), pages 2363–2380, 2021.
[40] Zhenpeng Lin. How autoslab changes the memory unsafety game. https://
grsecurity.net/how_autoslab_changes_the_memory_unsafety_game, 2021.
[41] Zhenpeng Lin, Yueqi Chen, Yuhang Wu, Dongliang Mu, Chensheng Yu, Xinyu
Xing, and Kang Li. GREBE: Unveiling Exploitation Potential for Linux Kernel
Bugs. In 2022 IEEE Symposium on Security and Privacy (S&P), pages 2078–2095.
IEEE, 2022.
[42] Zhenpeng Lin, Yuhang Wu, and Xinyu Xing. Dirtycred: Escalating privilege in
linux kernel. In Proceedings of the 2022 ACM SIGSAC Conference on Computer
and Communications Security, 2022.
[43] Linxz. Pax - structleak. https://linxz.tech/post/compilers/2021-10-10-structleak/,
2021.
[44] Kangjie Lu, Chengyu Song, Taesoo Kim, and Wenke Lee. Unisan: Proactive kernel
memory initialization to eliminate data leakages. In Proceedings of the 2016 ACM
SIGSAC Conference on Computer and Communications Security, pages 920–932,
2016.
[45] Kangjie Lu, Marie-Therese Walter, David Pfaff, Stefan Nümberger, Wenke Lee,
and Michael Backes. Unleashing use-before-initialization vulnerabilities in the
linux kernel using targeted stack spraying. In NDSS, 2017.
[46] Andy Nguyen.
Cve-2021-22555: Turning \x00\x00 into 10000$ | security-
research. https://google.github.io/security-research/pocs/linux/cve-2021-22555/
writeup.html, 2021.
[47] OSDev.org. Supervisor memory protection - osdev wiki. https://wiki.osdev.org/
Supervisor_Memory_Protection.
[48] Marios Pomonis, Theofilos Petsios, Angelos D Keromytis, Michalis Polychronakis,
and Vasileios P Kemerlis. krˆ x: Comprehensive kernel protection against just-in-
time code reuse. In Proceedings of the Twelfth European Conference on Computer
Systems, pages 420–436, 2017.
[49] Alexander Popov. Cve-2017-2636: Exploit the race condition in the n_hdlc
linux kernel driver. https://a13xp0p0v.github.io/2017/03/24/CVE-2017-2636.html,
2017.
[50] Alexander Popov. Stackleak: A long way to the linux kernel mainline. https:
//events19.linuxfoundation.org/wp-content/uploads/2017/11/STACKLEAK-
A-Long-Way-to-the-Linux-Kernel-Mainline-Alexander-Popov-Positive-
Technologies.pdf, 2018.
[51] Alexander Potapenko. security: allow using clang’s zero initialization for stack
variables. https://lwn.net/Articles/823152/, 2020.
[52] Sergej Proskurin, Marius Momeu, Seyedhamed Ghavamnia, Vasileios P Kemerlis,
and Michalis Polychronakis. xmp: Selective memory protection for kernel and
user space. In 2020 IEEE Symposium on Security and Privacy (SP), pages 563–577.
IEEE, 2020.
[53] Elena Reshetova. randomize kernel stack offset upon syscall. https://lwn.net/
Articles/785484/, 2019.
[54] Matteo Rizzo. Kernote writeup. https://org.anize.rs/0CTF-2021-finals/pwn/
kernote, 2021.
[55] AliAkbar Sadeghi, Salman Niksefat, and Maryam Rostamipour. Pure-call oriented
programming (pcop): chaining the gadgets using call instructions. Journal of
Computer Virology and Hacking Techniques, 14:139–156, 2018.
[56] Samsung. Real-time kernel protection (rkp). https://www.samsungknox.com/
en/blog/real-time-kernel-protection-rkp, 2016.


[57] Edward J Schwartz, Thanassis Avgerinos, and David Brumley. Q: Exploit hard-
ening made easy. In 20th USENIX Security Symposium (USENIX Security 11),
2011.
[58] Edward J Schwartz, Cory F Cohen, Jeffrey S Gennari, and Stephanie M Schwartz. A
generic technique for automatically finding defense-aware code reuse attacks. In
Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications
Security, pages 1789–1801, 2020.
[59] Kevin Z Snow, Fabian Monrose, Lucas Davi, Alexandra Dmitrienko, Christopher
Liebchen, and Ahmad-Reza Sadeghi. Just-in-time code reuse: On the effectiveness
of fine-grained address space layout randomization. In 2013 IEEE symposium on
security and privacy, pages 574–588. IEEE, 2013.
[60] Sami Tolvanen. Kcfi support [lwn.net]. https://lwn.net/Articles/893164/, 2022.
[61] Linus Torvalds. Kernel stack documentation. https://docs.kernel.org/x86/kernel-
stacks.html.
[62] Linus Torvalds.
Linux kernel calling convention source code.
https://
elixir.bootlin.com/linux/v5.17/source/arch/x86/entry/calling.h#L18.
[63] Linus Torvalds. native_write_cr4. https://elixir.bootlin.com/linux/v6.0/source/
arch/x86/kernel/cpu/common.c#L447.
[64] Linus Torvalds. Page table isolation (pti) documentation. https://www.kernel.org/
doc/html/latest/x86/pti.html.
[65] Linux Torvalds. Linux kernel source: arch/x86/include/asm/ptrace.h. https:
//elixir.bootlin.com/linux/v5.17/source/arch/x86/include/asm/ptrace.h#L59.
[66] Linux Torvalds. Linux kernel source code: fs/select.c. https://elixir.bootlin.com/
linux/v5.17/source/fs/select.c#L982.
[67] Linux Torvalds. Linux kernel source: fs/read_write.c. https://elixir.bootlin.com/
linux/v5.17/source/fs/read_write.c#L899.
[68] Lun Wang, Usmann Khan, Joseph Near, Qi Pang, Jithendaraa Subramanian, Neel
Somani, Peng Gao, Andrew Low, and Dawn Song. {PrivGuard}: Privacy reg-
ulation compliance made easier. In 31st USENIX Security Symposium (USENIX
Security 22), pages 3753–3770, 2022.
[69] Yuan Wei, Senlin Luo, Jianwei Zhuge, Jing Gao, Ennan Zheng, Bo Li, and Limin
Pan. Arg: Automatic rop chains generation. IEEE Access, 7:120152–120163, 2019.
[70] Wei Wu, Yueqi Chen, Xinyu Xing, and Wei Zou. {KEPLER}: Facilitating control-
flow hijacking primitive evaluation for linux kernel vulnerabilities. In 28th
USENIX Security Symposium (USENIX Security 19), pages 1187–1204, 2019.
[71] Wei Wu, Yueqi Chen, Jun Xu, Xinyu Xing, Xiaorui Gong, and Wei Zou. {FUZE}:
Towards facilitating exploit generation for kernel {Use-After-Free} vulnerabili-
ties. In 27th USENIX Security Symposium (USENIX Security 18), pages 781–797,
2018.
[72] Xi Yang, Stephen M Blackburn, Daniel Frampton, Jennifer B Sartor, and Kathryn S
McKinley. Why nothing matters: The impact of zeroing. Acm Sigplan Notices,
46(10):307–324, 2011.
[73] Sungbae Yoo, Jinbum Park, Seolheui Kim, Yeji Kim, and Taesoo Kim.
{In-
Kernel} {Control-Flow} integrity on commodity {OSes} using {ARM} pointer
authentication. In 31st USENIX Security Symposium (USENIX Security 22), pages
89–106, 2022.
[74] Kyle Zeng. [cve-2022-1786] a journey to the dawn. https://blog.kylebot.net/2022/
10/16/CVE-2022-1786/.
[75] Kyle Zeng, Yueqi Chen, Haehyun Cho, Xinyu Xing, Adam Doupé, Yan Shoshi-
taishvili, and Tiffany Bao. Playing for {K (H) eaps}: Understanding and improv-
ing linux kernel exploit reliability. In 31st USENIX Security Symposium (USENIX
Security 22), pages 71–88, 2022.
[76] Peter Zijlstra. [x86: Kernel ibt beginnings. https://lwn.net/ml/linux-kernel/
20211122170301.764232470@infradead.org/, 2021.
[77] Xiaochen Zou, Guoren Li, Weiteng Chen, Hang Zhang, and Zhiyun Qian. SyzS-
cope: Revealing High-Risk Security Impacts of Fuzzer-Exposed Bugs in Linux
kernel. In 31st USENIX Security Symposium (USENIX Security 22), pages 3201–3217,
2022.
13
APPENDIX
CVE
Trigger
Original
A.P.
S.A.
System Call
Technique
2010-2959
ioctl
ret2usr
-

2016-0728
keyctl
ret2usr
-

2016-4557
close
N/A
-
-
2016-6187
read
KEPLER
②③

2017-2636
recvfrom
change CR4


2017-6074
recvfrom
change CR4


2017-7184
read
pivot to heap
②④

2017-7308
lseek
change CR4


2017-7533
write
N/A
-
-
2017-8824
getsockopt
change CR4


2017-10661
clock_adjtime
change CR4


2017-11176
setsockopt
pivot to user
-

2018-6555
getsockopt
ret2usr
-

2021-3490
prctl
N/A
-
-
2021-3492
read
set_memory_x
①④

2021-4154
read
pivot to heap
②④

2021-27365
sendmsg
run_cmd
①④

2021-43267
ioctl
N/A
-
-
2022-0185
read
pivot to heap
②④

2022-1786
execve
N/A
-
-
2022-25636
read
pivot to heap
②④

2022-29581
ioctl
pivot to heap
②④

Table 7: All of the old techniques that do not require addi-
tional primitives are no longer applicable in modern systems.
And all of the working techniques require additional primi-
tives besides CFHP. Additional Primitives (A.P.) needed by
the original technique compared with RetSpill, original tech-
nique Still Applicable (S.A.) against modern Linux kernel
deployed with protections. ① rdi control, ② any register con-
trol, ③ physmap leak, ④ heap info leak, N/A: original exploit
does not provide CFHP or there is no public end-to-end ex-
ploit.


tải về 0.65 Mb.

Chia sẻ với bạn bè của bạn:
1   2   3   4   5   6   7   8   9   10




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương