From 1ae48f7feeb4df1baebcaa27455b73783cd88c89 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 28 2023 07:55:07 +0000 Subject: import autofs-5.1.7-32.el9_1.1 --- diff --git a/SOURCES/autofs-5.1.8-fix-invalid-tsv-access.patch b/SOURCES/autofs-5.1.8-fix-invalid-tsv-access.patch new file mode 100644 index 0000000..715f782 --- /dev/null +++ b/SOURCES/autofs-5.1.8-fix-invalid-tsv-access.patch @@ -0,0 +1,46 @@ +autofs-5.1.8 - fix invalid tsv access + +From: Ian Kent + +When using the --dumpmaps option of automount(8) a SEGV can occur +because a thread specific data variable accessed in the code hasn't +yet been created. + +The thread specific data doesn't need to be set to list the maps +so we can create the key and rely on pthread_getspecific() returning +NULL when the value hasn't been set as this case is handled correctly. + +Signed-off-by: Ian Kent +--- + CHANGELOG | 1 + + daemon/automount.c | 9 +++++++++ + 2 files changed, 10 insertions(+) + +--- autofs-5.1.7.orig/CHANGELOG ++++ autofs-5.1.7/CHANGELOG +@@ -102,6 +102,7 @@ + - bailout on rpc systemerror. + - fix nfsv4 only mounts should not use rpcbind. + - dont use initgroups() at spawn. ++- fix invalid tsv access. + + 25/01/2021 autofs-5.1.7 + - make bind mounts propagation slave by default. +--- autofs-5.1.7.orig/daemon/automount.c ++++ autofs-5.1.7/daemon/automount.c +@@ -2518,6 +2518,15 @@ int main(int argc, char *argv[]) + master = argv[2]; + } + ++ status = pthread_key_create(&key_thread_stdenv_vars, ++ key_thread_stdenv_vars_destroy); ++ if (status) { ++ logerr("%s: failed to create thread data key for std env vars!", ++ program); ++ macro_free_global_table(); ++ exit(1); ++ } ++ + if (master) + master_list = master_new(NULL, timeout, flags); + else diff --git a/SPECS/autofs.spec b/SPECS/autofs.spec index fc83fb1..e8cec87 100644 --- a/SPECS/autofs.spec +++ b/SPECS/autofs.spec @@ -12,7 +12,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.1.7 -Release: 31%{?dist} +Release: 32%{?dist}.1 Epoch: 1 License: GPLv2+ Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}-2.tar.gz @@ -128,6 +128,7 @@ Patch101: autofs-5.1.8-bailout-on-rpc-systemerror.patch Patch102: autofs-5.1.8-fix-nfsv4-only-mounts-should-not-use-rpcbind.patch Patch103: autofs-5.1.8-dont-use-initgroups-at-spawn.patch +Patch104: autofs-5.1.8-fix-invalid-tsv-access.patch %if %{with_systemd} BuildRequires: systemd-units @@ -300,6 +301,7 @@ echo %{version}-%{release} > .version %patch102 -p1 %patch103 -p1 +%patch104 -p1 %build LDFLAGS=-Wl,-z,now @@ -408,6 +410,16 @@ fi %dir /etc/auto.master.d %changelog +* Fri Feb 03 2023 Ian Kent - 1:5.1.7-32.el9_1.1 +- bz2166144 - automount -m crashes with Segmentation fault (core dumped) + - fix incorrect changelog date. +- Related: rhbz#2166144 + +* Fri Feb 03 2023 Ian Kent - 1:5.1.7-32.el9_1 +- bz2166144 - automount -m crashes with Segmentation fault (core dumped) + - fix invalid tsv access. +- Resolves: rhbz#2166144 + * Mon May 30 2022 Ian Kent - 1:5.1.7-31 - bz2087535 - libnss_sss: threads stuck at sss_nss_lock from initgroups - dont use initgroups() at spawn.