CVE-2023-47480: Unchecked Privilege Drop

The return value of a privilege-dropping function like setuid() or setgid() is ignored. If the system call fails (e.g., due to resource limits like RLIMIT_NPROC), the program may silently continue executing with unintended elevated privileges, leading to a local privilege escalation vulnerability. Always check the return value and handle failures appropriate

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2023-47480-unchecked-privilege-drop --engine opengrep

Description

The return value of a privilege-dropping function like setuid() or setgid() is ignored. If the system call fails (e.g., due to resource limits like RLIMIT_NPROC), the program may silently continue executing with unintended elevated privileges, leading to a local privilege escalation vulnerability. Always check the return value and handle failures appropriate