From cb78797c852ef78b720a25657259455a8d26c313 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 26 2022 08:09:51 +0000 Subject: import autofs-5.1.4-84.el8 --- 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..41260ab --- /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.4.orig/CHANGELOG ++++ autofs-5.1.4/CHANGELOG +@@ -95,6 +95,7 @@ + - remove nonstrict parameter from tree_mapent_umount_offsets(). + - fix handling of incorrect return from umount_ent(). + - dont use initgroups() at spawn. ++- fix invalid tsv access. + + xx/xx/2018 autofs-5.1.5 + - fix flag file permission. +--- autofs-5.1.4.orig/daemon/automount.c ++++ autofs-5.1.4/daemon/automount.c +@@ -2510,6 +2510,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 71a39c8..647ee97 100644 --- a/SPECS/autofs.spec +++ b/SPECS/autofs.spec @@ -8,7 +8,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.1.4 -Release: 83%{?dist} +Release: 84%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -267,6 +267,7 @@ Patch239: autofs-5.1.8-remove-nonstrict-parameter-from-tree_mapent_umount_offset Patch240: autofs-5.1.8-fix-handling-of-incorrect-return-from-umount_ent.patch Patch241: autofs-5.1.8-dont-use-initgroups-at-spawn.patch +Patch242: autofs-5.1.8-fix-invalid-tsv-access.patch %if %{with_systemd} BuildRequires: systemd-units @@ -575,6 +576,7 @@ echo %{version}-%{release} > .version %patch239 -p1 %patch240 -p1 %patch241 -p1 +%patch242 -p1 %build LDFLAGS=-Wl,-z,now @@ -670,6 +672,11 @@ fi %dir /etc/auto.master.d %changelog +* Tue Oct 04 2022 Ian Kent - 5.1.4-84 +- bz2130034 - automount -m crashes with Segmentation fault (core dumped) + - fix invalid tsv access. +- Resolves: rhbz#2130034 + * Wed May 18 2022 Ian Kent - 5.1.4-83 - bz2069097 - libnss_sss: threads stuck at sss_nss_lock from initgroups - dont use initgroups() at spawn.