diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2023-12-10 12:46:26 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-12-11 20:02:31 +0000 |
commit | 2c711ce57ced9f97c2cf4c8d59c1730447a7bd7f (patch) | |
tree | 57a05c112e103e9ec6333d70fdda308e0fab9843 /modules/pam_shells | |
parent | b8429cc8036cd23d075174d13eedc6d857e2b454 (diff) | |
download | pam-2c711ce57ced9f97c2cf4c8d59c1730447a7bd7f.tar.gz pam-2c711ce57ced9f97c2cf4c8d59c1730447a7bd7f.tar.bz2 pam-2c711ce57ced9f97c2cf4c8d59c1730447a7bd7f.zip |
pam_unix: fix possible shadow signed overflows
It is possible to trigger signed integer overflows in
check_shadow_expiry if /etc/shadow contains very large values.
Since these values have to be set by a system administrator, it would
already count as a configuration error.
Yet, avoid overflows which would consider accounts which are supposed
to be valid for a veeery long time as already invalid. Also, it would
be undefined behavior for almost all C standards.
Also consider every negative value as invalid, not just -1. The shadow
project has different ways of handling these values, but this approach
is in sync with its lib/isexpired.c implementation.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'modules/pam_shells')
0 files changed, 0 insertions, 0 deletions