shadow/src
Tobias Stoeckmann 875d2d49c1 chfn: Prevent buffer overflow.
This is a stability fix, not a security fix, because the affected -o
option can only be used by root and it takes a modified passwd file.

If a gecos field for a user has BUFSIZ characters without commas and an
equals sign (i.e. a huge slop/extra field) and chfn is called with -o,
then a buffer overflow occurs.

It is not possible to trigger this with shadow tools. Therefore, the
passwd file must be modified manually.

I have fixed this unlikely case the easiest and cleanest way possible.
Since chfn bails out if more than 80 characters excluding commas are
supposed to be written into gecos field, we can stop processing early on
if -o argument is too long.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2020-07-12 19:09:14 +02:00
..
.gitignore Create a new libsubid 2020-06-07 12:11:58 -05:00
.indent.pro [svn-upgrade] Integrating new upstream version, shadow (4.0.8) 2007-10-07 11:46:07 +00:00
chage.c migrate to new SELinux api 2019-10-22 14:56:31 +02:00
chfn.c chfn: Prevent buffer overflow. 2020-07-12 19:09:14 +02:00
chgpasswd.c Initial bcrypt support 2019-12-01 11:00:57 -06:00
chpasswd.c Initial bcrypt support 2019-12-01 11:00:57 -06:00
chsh.c migrate to new SELinux api 2019-10-22 14:56:31 +02:00
expiry.c Fixed signal races in shadow tools. 2016-07-02 18:11:09 +02:00
faillog.c Replacing exit with return 2020-03-09 18:01:32 +00:00
free_subid_range.c Create a new libsubid 2020-06-07 12:11:58 -05:00
get_subid_owners.c Create a new libsubid 2020-06-07 12:11:58 -05:00
gpasswd.c Flush sssd caches in addition to nscd caches 2018-09-13 14:20:02 +02:00
groupadd.c Flush sssd caches in addition to nscd caches 2018-09-13 14:20:02 +02:00
groupdel.c Flush sssd caches in addition to nscd caches 2018-09-13 14:20:02 +02:00
groupmems.c spelling: remove 2017-10-22 21:12:29 +00:00
groupmod.c Flush sssd caches in addition to nscd caches 2018-09-13 14:20:02 +02:00
groups.c * src/newgrp.c, src/userdel.c, src/grpck.c, src/gpasswd.c, 2010-08-22 19:36:09 +00:00
grpck.c Do not flush nscd and sssd cache in read-only mode 2019-02-27 17:40:04 +01:00
grpconv.c Flush sssd caches in addition to nscd caches 2018-09-13 14:20:02 +02:00
grpunconv.c Flush sssd caches in addition to nscd caches 2018-09-13 14:20:02 +02:00
id.c * src/newgrp.c: Limit the scope of variable pid. 2010-03-23 11:26:34 +00:00
lastlog.c Add maximum padding to fit IPv6-Addresses 2020-05-24 23:48:25 +02:00
list_subid_ranges.c Create a new libsubid 2020-06-07 12:11:58 -05:00
login_nopam.c * src/newgrp.c: Limit the scope of variable pid. 2010-03-23 11:26:34 +00:00
login.c silence more compiler warnings 2020-01-12 08:20:50 -06:00
logoutd.c * src/newgrp.c, src/userdel.c, src/grpck.c, src/gpasswd.c, 2010-08-22 19:36:09 +00:00
Makefile.am Create a new libsubid 2020-06-07 12:11:58 -05:00
new_subid_range.c Create a new libsubid 2020-06-07 12:11:58 -05:00
newgidmap.c remove unused variables 2019-10-12 20:03:32 -05:00
newgrp.c silence more compiler warnings 2020-01-12 08:20:50 -06:00
newuidmap.c remove unused variables 2019-10-12 20:03:32 -05:00
newusers.c remove unused and misleading 'owner' argument from find_new_sub* 2020-04-17 16:32:44 -05:00
nologin.c Adding logging of SSH_ORIGINAL_COMMAND to nologin. 2020-01-11 14:46:52 -06:00
passwd.c modify #endif does not match condition of #if in passwd.c 2020-03-05 10:51:39 +08:00
pwck.c Check for "NONEXISTENT" in "src/pwck.c" 2020-05-11 09:26:43 -04:00
pwconv.c Make the sp_lstchg shadow field reproducible (re. #71) 2019-03-31 16:00:01 +01:00
pwunconv.c Flush sssd caches in addition to nscd caches 2018-09-13 14:20:02 +02:00
su.c su.c: run pam_getenvlist() after setup_env 2018-06-25 16:00:21 +02:00
suauth.c spelling: unrecognized 2017-10-22 21:30:30 +00:00
sulogin.c Fixed signal races in shadow tools. 2016-07-02 18:11:09 +02:00
useradd.c Merge pull request #234 from edneville/79_userdel 2020-06-10 00:31:10 -05:00
userdel.c Adding run-parts style for pre and post useradd/del 2020-06-10 00:26:55 -05:00
usermod.c usermod: check only local groups with -G option 2020-03-30 13:07:32 +02:00
vipw.c Fix vipw not resuming correctly when suspended 2019-11-11 20:19:57 -06:00