37ae232080
If the file referenced by ENV_TZ has a zero length string, then an out of boundary write occurs. Also the result can be wrong because it is assumed that the file will always end with a newline. Only override a newline character with '\0' to avoid these cases. This cannot be considered to be security relevant because login.defs and its contained references to system files should be trusted to begin with. Proof of Concept: 1. Compile shadow's su with address sanitizer and --without-libpam 2. Setup your /etc/login.defs to contain ENV_TZ=/etc/tzname 3. Prepare /etc/tzname to contain a '\0' byte at the beginning `python -c "print('\x00')" > /etc/tzname` 4. Use su `su -l` You can see the following output: `tz.c:45:8: runtime error: index 18446744073709551615 out of bounds for type 'char [8192]'` Signed-off-by: Samanta Navarro <ferivoz@riseup.net> |
||
---|---|---|
.builds | ||
.github | ||
contrib | ||
doc | ||
docs | ||
etc | ||
lib | ||
libmisc | ||
libsubid | ||
man | ||
po | ||
src | ||
tests | ||
.gitignore | ||
.travis.yml | ||
acinclude.m4 | ||
AUTHORS.md | ||
autogen.sh | ||
ChangeLog | ||
configure.ac | ||
COPYING | ||
Makefile.am | ||
NEWS | ||
README | ||
README.md | ||
SECURITY.md | ||
shadow.spec.in | ||
TODO |
shadow-utils
Introduction
The shadow-utils package includes the necessary programs for converting UNIX password files to the shadow password format, plus programs for managing user and group accounts. The pwconv command converts passwords to the shadow password format. The pwunconv command unconverts shadow passwords and generates a passwd file (a standard UNIX password file). The pwck command checks the integrity of password and shadow files. The lastlog command prints out the last login times for all users. The useradd, userdel, and usermod commands are used for managing user accounts. The groupadd, groupdel, and groupmod commands are used for managing group accounts.
Sites
Contacts
There are several ways to contact us:
- the general discussion mailing list
- the #shadow IRC channel on libera.chat:
- irc://irc.libera.chat/shadow
Mailing archives
- the general discussion mailing list archive
- the commit mailing list archive, only used for historical purposes
Authors and maintainers
Authors and maintainers are listed in AUTHORS.md.