aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/check-profiles.yml
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-02-04 23:23:58 +0000
committerLibravatar GitHub <noreply@github.com>2024-02-04 23:23:58 +0000
commitdb3146b501a484bf37ef23278480f4c028cfb8d7 (patch)
treede1b5963ee081e37a033960859e4499f3ad914df /.github/workflows/check-profiles.yml
parentci: add timeout limits (#6178) (diff)
downloadfirejail-db3146b501a484bf37ef23278480f4c028cfb8d7.tar.gz
firejail-db3146b501a484bf37ef23278480f4c028cfb8d7.tar.zst
firejail-db3146b501a484bf37ef23278480f4c028cfb8d7.zip
security: fix sscanf rv checks (CodeQL) (#6184)
Fix the following CodeQL warning (CWE-253)[1]: > Rule ID: cpp/incorrectly-checked-scanf > The result of scanf is only checked against 0, but it can also return > EOF. > Functions in the scanf family return either EOF (a negative value) in > case of IO failure, or the number of items successfully read from the > input. Consequently, a simple check that the return value is nonzero > is not enough. > > Recommendation > > Ensure that all uses of scanf check the return value against the > expected number of arguments rather than just against zero. Note: The affected code portions attempt to read values from /etc/passwd and /etc/group, so invalid input seems unlikely to be the case. Either way, the changes make the checks in question more consistent with similar sscanf return value checks in the rest of the code. Added on commit 4f003daec ("prevent leaking user information by modifying /home directory, /etc/passwd and /etc/group", 2015-11-19). [1] https://github.com/netblue30/firejail/security/code-scanning/32
Diffstat (limited to '.github/workflows/check-profiles.yml')
0 files changed, 0 insertions, 0 deletions