Open
Description
Hi,
There is a race condition in the sys_open
syscall with the O_CREAT
flag which allows for privilege escalation.
Lines 400 to 402 in 28190ad
The tl;dr is that since there is no locking here, an unprivileged process can create two threads. One will do a call to create a file, and another will remove the file immediately after it is created by the create_file_fs
call, then symlink it to another file - owned by root - and then the kopen
will just happily open the symlink. At this point, the unprivileged process can open any file owned by root.
I can share a proof of concept of exploiting that vulnerability if you want.
This bug was found during HXP 38C3 CTF competition (which contained a challenge with TaoruOS).
Metadata
Metadata
Assignees
Labels
No labels