summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/shadow')
-rw-r--r--meta/recipes-extended/shadow/files/CVE-2019-19882.patch55
-rw-r--r--meta/recipes-extended/shadow/shadow.inc1
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/files/CVE-2019-19882.patch b/meta/recipes-extended/shadow/files/CVE-2019-19882.patch
new file mode 100644
index 0000000000..894d867680
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/CVE-2019-19882.patch
@@ -0,0 +1,55 @@
1From 66b7bc0dcfda12d7f58eba993bd02872cae1d713 Mon Sep 17 00:00:00 2001
2From: Dave Reisner <dreisner@archlinux.org>
3Date: Mon, 16 Dec 2019 14:11:23 -0500
4Subject: [PATCH] Don't auto-enable ACCT_TOOLS_SETUID if PAM is detected
5
6Here's a sad story:
7
8* 70971457 is merged into shadow, allowing newgidmap/newuidmap to be
9installed with file caps rather than setuid.
10* https://bugs.archlinux.org/task/63248 is filed to take advantage of
11this.
12* The arch maintainer of the 'shadow' package notices that this doesn't
13work, and submits a pull request to fix this in shadow.
14* edf7547ad5 is merged, fixing the post install hooks.
15
16The problem here is that distros have been building shadow with PAM for
17O(years), but the install hooks have silently failed due to the
18combination of the directory mismatch (suidubins vs suidsbins) and later
19success with setuid'ing newgidmap/newuidmap.
20
21With the install hooks fixed, those of us (Arch[1] and Gentoo[2] so far)
22who never built shadow explicitly with --enable-account-tools-setuid are
23now getting setuid account tools, and don't have PAM configuration
24suitable for use with setuid account management tools.
25
26It's entirely unclear to me why you'd want this, but I assume there's
27some reason out there for it existing. Regardless, setuid binaries are
28dangerous and shouldn't be enabled by default without good reason.
29
30[1] https://bugs.archlinux.org/task/64836
31[2] https://bugs.gentoo.org/702252
32
33Upstream-Status: Backport
34CVE: CVE-2019-19882
35Signed-off-by: Li Zhou <li.zhou@windriver.com>
36---
37 configure.ac | 2 +-
38 1 file changed, 1 insertion(+), 1 deletion(-)
39
40diff --git a/configure.ac b/configure.ac
41index e3ed3b43..d6e2bfbd 100644
42--- a/configure.ac
43+++ b/configure.ac
44@@ -226,7 +226,7 @@ AC_ARG_ENABLE(account-tools-setuid,
45 *) AC_MSG_ERROR(bad value ${enableval} for --enable-account-tools-setuid)
46 ;;
47 esac],
48- [enable_acct_tools_setuid="maybe"]
49+ [enable_acct_tools_setuid="no"]
50 )
51
52 AC_ARG_ENABLE(utmpx,
53--
542.17.1
55
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 267d2324c5..3bfa39e6ff 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -13,6 +13,7 @@ SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.
13 file://shadow-4.1.3-dots-in-usernames.patch \ 13 file://shadow-4.1.3-dots-in-usernames.patch \
14 ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ 14 ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
15 file://shadow-relaxed-usernames.patch \ 15 file://shadow-relaxed-usernames.patch \
16 file://CVE-2019-19882.patch \
16 " 17 "
17 18
18SRC_URI_append_class-target = " \ 19SRC_URI_append_class-target = " \