Compare commits

...

28 Commits

Author SHA1 Message Date
Salvatore Bonaccorso
ba9a0dec9d Imported Debian patch 1:4.2-3+deb8u2 2017-02-26 11:36:51 +01:00
Balint Reczey
75e2a3b103 Update changelog 2017-02-24 00:58:22 +01:00
Balint Reczey
e5e623f4ca Add myself to uploaders replacing Nicolas FRANCOIS (Nekral) 2017-02-24 00:57:02 +01:00
Balint Reczey
5fd2757d66 Update changelog 2017-02-24 00:51:09 +01:00
Balint Reczey
bef0d93006 Refresh patches 2017-02-24 00:49:51 +01:00
Balint Reczey
dd729b3572 Fix integer overflow in getulong.c (CVE-2016-6252)
Closes: #832170
2017-02-24 00:41:23 +01:00
Salvatore Bonaccorso
1edacbf29a su: properly clear child PID
Closes: #855943
2017-02-24 00:27:53 +01:00
Bastian Blank
a784e094c4 Imported Debian patch 1:4.2-3+deb8u1 2017-02-24 00:16:58 +01:00
Christian Perrier
1f9119ef49 releasing version 1:4.2-3 2014-11-20 22:29:43 +01:00
Christian Perrier
654077fff8 Enforce hardened builds to workaround cdbs sometimes not building with hardening flags as in 1:4.2-2+b1 Thanks to Dr. Markus Waldeck for pointing the issue and Simon Ruderich For providing a working patch. 2014-11-19 21:51:16 +01:00
Christian Perrier
1566e6de21 I forgot the cheese name. Really really release 4.2-2 2014-05-04 19:50:54 +02:00
Christian Perrier
acf9e8fa4a Release 4.2-3 in unsctable 2014-05-04 19:39:31 +02:00
Christian Perrier
6c29058c9f Fix typo in changelog entry 2014-05-04 19:38:27 +02:00
Christian Perrier
16e593e364 * Check upstream signing key in debian/watch 2014-05-04 19:38:08 +02:00
Christian Perrier
e8c4143fdc Properly name the upstream signing key file 2014-05-04 19:36:54 +02:00
Christian Perrier
b4ad01d830 Add upstream signing key as debian/upstream-signing-key.asc 2014-05-04 19:01:50 +02:00
Christian Perrier
ea64aa07a8 Release 4.2-2 to unstable 2014-05-04 18:05:05 +02:00
Christian Perrier
523b9000fd Add a lintian override for newuidmap and newgidmap setuid binaries 2014-05-04 18:04:15 +02:00
Christian Perrier
71869c2d24 Don't forget the series file 2014-04-30 22:56:50 +02:00
Christian Perrier
2aa9297367 Vietnamese translation update. 2014-04-30 22:56:20 +02:00
Christian Perrier
9bc936e018 Fix conflict in debian/changelog 2014-04-30 22:53:53 +02:00
Christian Perrier
2ef82ecb53 Revert Vietnamese translation update. It should go in upstream patches 2014-04-30 22:53:10 +02:00
Christian Perrier
5fc7602f3e Enable libaudit support. Closes: #745774 2014-04-30 22:29:03 +02:00
Christian Perrier
0274441ec5 Vietnamese translation update. 2014-04-30 22:26:25 +02:00
Christian Perrier
60c9571605 use the new pam_exec functionality from pam 1.1.8-1 to implement the dynamic motd, rather than using /run/motd.dynamic from initscripts. This will allow initscripts to drop /etc/init.d/motd. Closes: #741129 2014-04-30 22:23:26 +02:00
Christian Perrier
c7e2932be4 Enable the login package on hurd-any, but without /bin/login, still provided by the hurd package. Closes: #737805. This fix was accidentally forgotten in 1:4.2-1 2014-04-30 22:20:05 +02:00
Christian Perrier
d480b7dfee Add 1:4.1.5.1-1.1 NMU changelog entries 2014-04-30 22:17:11 +02:00
Christian Perrier
260b0eb77a Last upload integrates the use of dh_autoreconf which has the same effect then Eric Dorland's patch in 1:4.1.5.1-1.1 NMU to drop the use of automake1.9. Closes: #724434 2014-04-30 22:16:01 +02:00
11 changed files with 11067 additions and 17 deletions

69
debian/changelog vendored
View File

@@ -1,3 +1,59 @@
shadow (1:4.2-3+deb8u2) jessie-security; urgency=high
* Non-maintainer upload by the Security Team.
* su: properly clear child PID (CVE-2017-2616) (Closes: #855943)
-- Salvatore Bonaccorso <carnil@debian.org> Thu, 23 Feb 2017 17:21:08 +0100
shadow (1:4.2-3+deb8u1) jessie; urgency=medium
* Non-maintainer upload.
* Fix error handling in busy user detection. (Closes: #778287)
-- Bastian Blank <bastian.blank@credativ.de> Wed, 18 Nov 2015 08:07:09 +0000
shadow (1:4.2-3) unstable; urgency=low
* Enforce hardened builds to workaround cdbs sometimes not building
with hardening flags as in 1:4.2-2+b1
Thanks to Dr. Markus Waldeck for pointing the issue and Simon Ruderich
For providing a working patch.
-- Christian Perrier <bubulle@debian.org> Wed, 19 Nov 2014 21:59:09 +0100
shadow (1:4.2-2) unstable; urgency=low
* The "Soumaintrain" release
* The "Rigotte de Condrieu" release was 4.2-1
* Upload to unstable
* Last upload integrates the use of dh_autoreconf which has the same
effect then Eric Dorland's patch in 1:4.1.5.1-1.1 NMU to drop the
use of automake1.9. Closes: #724434
[ Samuel Thibault ]
* Enable the login package on hurd-any, but without /bin/login, still provided
by the hurd package. Closes: #737805.
This fix was accidentally forgotten in 1:4.2-1
[ Josh Triplett ]
* use the new pam_exec functionality from pam 1.1.8-1 to implement the
dynamic motd, rather than using /run/motd.dynamic from initscripts.
This will allow initscripts to drop /etc/init.d/motd.
Closes: #741129
[ Laurent Bigonville ]
* Enable libaudit support. Closes: #745774
[ Trần Ngọc Quân ]
* Vietnamese translation update.
[ Christian Perrier ]
* Add a lintian override for newuidmap and newgidmap setuid binaries
* Add upstream signing key as debian/upstream-signing-key.asc
* Check upstream signing key in debian/watch
-- Christian Perrier <bubulle@debian.org> Sun, 04 May 2014 19:39:07 +0200
shadow (1:4.2-1) experimental; urgency=low
[ Nicolas FRANCOIS (Nekral) ]
@@ -59,6 +115,19 @@ shadow (1:4.2-1) experimental; urgency=low
-- Christian Perrier <bubulle@debian.org> Tue, 22 Apr 2014 09:01:42 +0200
shadow (1:4.1.5.1-1.1) unstable; urgency=medium
* Non-maintainer upload.
[ Eric Dorland ]
* Switch to automake1.11. (Closes: #724434)
[ Samuel Thibault ]
* Enable the login package on hurd-any, but without /bin/login, still provided
by the hurd package. Closes: #737805.
-- Samuel Thibault <sthibault@debian.org> Sun, 16 Mar 2014 20:58:24 +0100
shadow (1:4.1.5.1-1) unstable; urgency=low
* The "Gruyère" release.

8
debian/control vendored
View File

@@ -4,7 +4,8 @@ Priority: required
Maintainer: Shadow package maintainers <pkg-shadow-devel@lists.alioth.debian.org>
Standards-Version: 3.9.5
Uploaders: Christian Perrier <bubulle@debian.org>, Nicolas FRANCOIS (Nekral) <nicolas.francois@centraliens.net>
Build-Depends: dh-autoreconf, gettext, libpam0g-dev, debhelper (>= 6.0.7~), quilt, dpkg-dev (>= 1.13.5), xsltproc, docbook-xsl, docbook-xml, libxml2-utils, cdbs, libselinux1-dev [linux-any], libsemanage1-dev [linux-any], gnome-doc-utils (>= 0.4.3), bison
Build-Depends: dh-autoreconf, gettext, libpam0g-dev, debhelper (>= 6.0.7~), quilt, dpkg-dev (>= 1.13.5), xsltproc, docbook-xsl, docbook-xml, libxml2-utils, cdbs, libselinux1-dev [linux-any], libsemanage1-dev [linux-any], gnome-doc-utils (>= 0.4.3), bison, libaudit-dev [linux-any]
,hardening-wrapper
Vcs-Git: git://anonscm.debian.org/git/pkg-shadow/shadow.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-shadow/shadow.git;a=summary
Homepage: http://pkg-shadow.alioth.debian.org/
@@ -22,9 +23,10 @@ Description: change and administer password and group data
Package: login
Architecture: any
Pre-Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-runtime, libpam-modules
Pre-Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-runtime, libpam-modules (>= 1.1.8-1)
Conflicts: gnunet (<< 0.7.0c-2), amavisd-new (<<2.3.3-8), python-4suite (<< 0.99cvs20060405-1), backupninja (<< 0.9.3-5), echolot (<< 2.1.8-4)
Replaces: manpages-de (<< 0.5-3), manpages-tr (<<1.0.5), manpages-zh (<<1.5.1-1)
Breaks: coreutils (<< 8.21~) [hurd-any], passwd (<< 1:4.1.5.1-2~) [hurd-any], hurd (<< 20140206~) [hurd-any]
Replaces: manpages-de (<< 0.5-3), manpages-tr (<<1.0.5), manpages-zh (<<1.5.1-1), passwd (<< 1:4.1.5.1-2~) [hurd-any], coreutils (<< 8.21~) [hurd-any], hurd (<< 20140206~) [hurd-any]
Essential: yes
Description: system login tools
These tools are required to be able to login and use your system. The

4
debian/login.pam vendored
View File

@@ -82,9 +82,7 @@ session optional pam_lastlog.so
# Prints the message of the day upon succesful login.
# (Replaces the `MOTD_FILE' option in login.defs)
# This includes a dynamically generated part from /run/motd.dynamic
# and a static (admin-editable) part from /etc/motd.
session optional pam_motd.so motd=/run/motd.dynamic noupdate
session optional pam_exec.so type=open_session stdout /bin/uname -snrvm
session optional pam_motd.so
# Prints the status of the user's mailbox upon succesful login

2687
debian/patches/1010_vietnamese_translation vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
Description: Fix user_busy to not leave subuid open in case of error.
Author: William Grant <wgrant@ubuntu.com>
Bug: https://bugs.launchpad.net/ubuntu/vivid/+source/shadow/+bug/1436937
Index: shadow-4.2/libmisc/user_busy.c
===================================================================
--- shadow-4.2.orig/libmisc/user_busy.c
+++ shadow-4.2/libmisc/user_busy.c
@@ -175,6 +175,9 @@ static int user_busy_processes (const ch
if (stat ("/", &sbroot) != 0) {
perror ("stat (\"/\")");
(void) closedir (proc);
+#ifdef ENABLE_SUBIDS
+ sub_uid_close();
+#endif /* ENABLE_SUBIDS */
return 0;
}
@@ -212,6 +215,9 @@ static int user_busy_processes (const ch
if (check_status (name, tmp_d_name, uid) != 0) {
(void) closedir (proc);
+#ifdef ENABLE_SUBIDS
+ sub_uid_close();
+#endif /* ENABLE_SUBIDS */
fprintf (stderr,
_("%s: user %s is currently used by process %d\n"),
Prog, name, pid);
@@ -232,6 +238,9 @@ static int user_busy_processes (const ch
}
if (check_status (name, task_path+6, uid) != 0) {
(void) closedir (proc);
+#ifdef ENABLE_SUBIDS
+ sub_uid_close();
+#endif /* ENABLE_SUBIDS */
fprintf (stderr,
_("%s: user %s is currently used by process %d\n"),
Prog, name, pid);

View File

@@ -0,0 +1,59 @@
From 08fd4b69e84364677a10e519ccb25b71710ee686 Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Thu, 23 Feb 2017 09:47:29 -0600
Subject: [PATCH] su: properly clear child PID
If su is compiled with PAM support, it is possible for any local user
to send SIGKILL to other processes with root privileges. There are
only two conditions. First, the user must be able to perform su with
a successful login. This does NOT have to be the root user, even using
su with the same id is enough, e.g. "su $(whoami)". Second, SIGKILL
can only be sent to processes which were executed after the su process.
It is not possible to send SIGKILL to processes which were already
running. I consider this as a security vulnerability, because I was
able to write a proof of concept which unlocked a screen saver of
another user this way.
---
src/su.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
--- a/src/su.c
+++ b/src/su.c
@@ -363,20 +363,35 @@ static void prepare_pam_close_session (v
/* wake child when resumed */
kill (pid, SIGCONT);
stop = false;
+ } else {
+ pid_child = 0;
}
} while (!stop);
}
- if (0 != caught) {
+ if (0 != caught && 0 != pid_child) {
(void) fputs ("\n", stderr);
(void) fputs (_("Session terminated, terminating shell..."),
stderr);
(void) kill (-pid_child, caught);
(void) signal (SIGALRM, kill_child);
+ (void) signal (SIGCHLD, catch_signals);
(void) alarm (2);
- (void) wait (&status);
+ sigemptyset (&ourset);
+ if ((sigaddset (&ourset, SIGALRM) != 0)
+ || (sigprocmask (SIG_BLOCK, &ourset, NULL) != 0)) {
+ fprintf (stderr, _("%s: signal masking malfunction\n"), Prog);
+ kill_child (0);
+ } else {
+ while (0 == waitpid (pid_child, &status, WNOHANG)) {
+ sigsuspend (&ourset);
+ }
+ pid_child = 0;
+ (void) sigprocmask (SIG_UNBLOCK, &ourset, NULL);
+ }
+
(void) fputs (_(" ...terminated.\n"), stderr);
}

View File

@@ -4,6 +4,7 @@
503_shadowconfig.8
008_login_log_failure_in_FTMP
301-CVE-2017-2616-su-properly-clear-child-PID.patch
429_login_FAILLOG_ENAB
401_cppw_src.dpatch
# 402 should be merged in 401, but should be reviewed by SE Linux experts first
@@ -33,3 +34,5 @@
#userns/manpagetypo
#userns/16_add-argument-sanity-checking.patch
1000_configure_userns
1010_vietnamese_translation
1020_fix_user_busy_errors

16
debian/rules vendored
View File

@@ -3,10 +3,7 @@
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
ifeq ($(DEB_HOST_ARCH_OS),hurd)
# Do not build login on The Hurd
override DEB_ARCH_PACKAGES=passwd
endif
export DEB_BUILD_HARDENING=1
# Enable PIE, BINDNOW, and possible future flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
@@ -24,7 +21,7 @@ DEB_DESTDIR=$(CURDIR)/debian/tmp
include /usr/share/cdbs/1/class/autotools.mk
# Adds extra options when calling the configure script:
DEB_CONFIGURE_EXTRA_FLAGS := --disable-shared --without-libcrack --without-audit --mandir=/usr/share/man --with-libpam --enable-shadowgrp --enable-man --disable-account-tools-setuid --with-group-name-max-length=32 --without-acl --without-attr --without-tcb
DEB_CONFIGURE_EXTRA_FLAGS := --disable-shared --without-libcrack --mandir=/usr/share/man --with-libpam --enable-shadowgrp --enable-man --disable-account-tools-setuid --with-group-name-max-length=32 --without-acl --without-attr --without-tcb
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
DEB_CONFIGURE_EXTRA_FLAGS += --host=$(DEB_HOST_GNU_TYPE)
endif
@@ -34,6 +31,10 @@ CFLAGS += -DDEFAULT_EDITOR=\\\"sensible-editor\\\"
# Add extras to the install process:
binary-install/login::
ifeq ($(DEB_HOST_ARCH_OS),hurd)
# /bin/login is provided by the hurd package.
rm -f debian/login/bin/login
endif
dh_installpam -p login
dh_installpam -p login --name=su
install -c -m 444 debian/login.defs debian/login/etc/login.defs
@@ -52,11 +53,6 @@ binary-install/passwd::
dh_installpam -p passwd --name=chsh
dh_installpam -p passwd --name=chpasswd
dh_installpam -p passwd --name=newusers
ifeq ($(DEB_HOST_ARCH_OS),hurd)
# login is not built on The Hurd, but some utilities of passwd depends on
# /etc/login.defs.
install -c -m 444 debian/login.defs debian/passwd/etc/login.defs
endif
install -c -m 644 debian/useradd.default debian/passwd/etc/default/useradd
install -d debian/passwd/sbin
install -c -m 555 debian/shadowconfig.sh debian/passwd/sbin/shadowconfig

2
debian/uidmap.lintian-overrides vendored Normal file
View File

@@ -0,0 +1,2 @@
uidmap: setuid-binary usr/bin/newgidmap 4755 root/root
uidmap: setuid-binary usr/bin/newuidmap 4755 root/root

8196
debian/upstream/signing-key.asc vendored Normal file

File diff suppressed because it is too large Load Diff

2
debian/watch vendored
View File

@@ -1,3 +1,3 @@
version=3
ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-(.*)\.tar\.gz \
opts=pgpsigurlmangle=s/$/.sig/ http://pkg-shadow.alioth.debian.org/releases/shadow-(.*)\.tar\.xz \
debian uupdate