An integer overflow vulnerability was found in shadow-utils. Attacker can use this for local privileges escalation. References: http://seclists.org/oss-sec/2016/q3/111 CVE assignment: http://seclists.org/oss-sec/2016/q3/115
Created shadow-utils tracking bugs for this issue: Affects: fedora-all [bug 1358629]
Upstream bug: https://github.com/shadow-maint/shadow/issues/27
The rhel-5 package shadow-4.0.17 does not include this vulnerability. rhel-6 and rhel-7 shadow-4.1.15-1 include the getulong() function to which a portion of the upstream patch applies, but it is used much less widely and the idmapping does not exist in this version. Thus the demonstration from oss-sec using `newuidmap` is not possible. While the getulong() patch applies to shadow-4.1.15, its use is such that no security flaw exists. The interface to the kernel through /proc/$$/uid_map which enables the vulnerability in 4.2.1 is not present, and of the remaining uses: > 0 getdef.c getdef_ulong 314 if (getulong (d->value, &val) == 0) { > 1 limits.c set_umask 135 if ( (getulong (value, &mask) == 0) > 2 limits.c check_logins 155 if (getulong (maxlogins, &limit) == 0) { > 3 limits.c setup_limits 593 if ( (getulong (cp + 6, &mask) == 0) These parse strings in /etc/limits and /etc/login.defs, which are under administrator control and cannot be influenced by unprivileged users. > 4 rlogin.c do_rlogin 150 if (getulong (cp, &remote_speed) == 0) { This (rarely used) is parsing terminal speed, and does not present a vulnerability. > 5 lastlog.c main 228 if (getulong (optarg, &inverse_days) == 0) { > 6 lastlog.c main 246 if (getulong (optarg, &days) == 0) { These parse arguments given to /bin/lastlog, which is an unprivileged program - day counts in the billions aren't of interest to lastlog in any case :).