Saved Set-UID

Motivation

Privilege Management 中我們說到,我們有時候想要將 effective UID 切回 real UID 以避免出現 security vulnerability,但是我們切成 real UID 後會想要再切回 effective UID,這時候我們便會需要將 effective UID 記下來才能做到切換

Introduction

在 process 開始時,如果開啟了 SUID bit,則 kernel 會將 effective UID 的值複製並儲存到 saved-set UID