Samanta Navarro 37ae232080 Correctly handle illegal system file in tz
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>
2023-02-01 15:47:35 -06:00
2023-01-26 22:44:39 -06:00
2022-12-22 10:31:43 +01:00
2021-08-18 18:06:02 +00:00
2023-02-01 09:10:34 +01:00
2022-09-27 16:01:31 -05:00
2021-04-16 21:02:37 -05:00
2022-03-18 16:10:51 -05:00
2023-01-12 12:10:57 +01:00
2021-12-23 19:36:50 -06:00
2021-08-18 18:06:02 +00:00
2023-01-12 12:10:57 +01:00
2021-12-19 14:09:08 -06:00
2021-11-22 15:31:54 +01:00
2021-08-18 18:06:02 +00:00

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:

Mailing archives

Authors and maintainers

Authors and maintainers are listed in AUTHORS.md.

Description
No description provided
Readme 20 MiB
Languages
Shell 57.1%
C 40.6%
M4 0.9%
Yacc 0.8%
Makefile 0.4%
Other 0.1%