C/C++

C or C++ : Unsafe function: getpw

Classification

PCI DSS 4.0

Overview

The getpw() function used is insecure because it may lead to a buffer overflow. This may lead to incorrect behavior or crash of the application.

The getpw() function reconstructs the password line entry for the given user ID uid in the buffer buf. The returned buffer contains a line of format name:passwd:uid:gid:gecos:dir:shell. The getpw() function is dangerous as it may overflow the provided buffer buf.

References

MEDIUM

DerScanner Severity Score

Check your C/C++ code for this vulnerability, free

Request a free pilot of DerScanner. We give you access and help with the first scan. It works in the cloud and on-premise.

Try it on your code, free

By submitting this form, I acknowledge that DerScanner may process my personal data I provided above for purposes explained above. More details about the processing.