From c0886d7dbedf1c2258c98c6ed1cc4f6b77aeb63a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Oct 26 2012 19:09:25 +0000 Subject: Fix pam_winbind segfault in pam_sm_authenticate(). resolves: #870493 --- diff --git a/samba-3.6.9-fix_pam_winbind_crash.patch b/samba-3.6.9-fix_pam_winbind_crash.patch new file mode 100644 index 0000000..933f277 --- /dev/null +++ b/samba-3.6.9-fix_pam_winbind_crash.patch @@ -0,0 +1,34 @@ +From 96369155d446f5f1bab5401fd9fed709dcb87e0e Mon Sep 17 00:00:00 2001 +From: David Disseldorp +Date: Wed, 2 Nov 2011 18:39:03 +0100 +Subject: [PATCH] pam_winbind: fix segfault in pam_sm_authenticate() + +Ensure the potentially null winbind context is not dereferenced on +cleanup. + +https://bugzilla.samba.org/show_bug.cgi?id=8564 +--- + nsswitch/pam_winbind.c | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c +index 0497726..cb119a6 100644 +--- a/nsswitch/pam_winbind.c ++++ b/nsswitch/pam_winbind.c +@@ -2733,9 +2733,10 @@ out: + _pam_free_data_info3(pamh); + } + +- _PAM_LOG_FUNCTION_LEAVE("pam_sm_authenticate", ctx, retval); +- +- TALLOC_FREE(ctx); ++ if (ctx != NULL) { ++ _PAM_LOG_FUNCTION_LEAVE("pam_sm_authenticate", ctx, retval); ++ TALLOC_FREE(ctx); ++ } + + return retval; + } +-- +1.7.3.4 + diff --git a/samba.spec b/samba.spec index 687a7cb..fa7c29e 100644 --- a/samba.spec +++ b/samba.spec @@ -1,4 +1,4 @@ -%define main_release 94 +%define main_release 95 %define samba_version 3.6.8 %define tdb_version 1.2.9 %define talloc_version 2.0.5 @@ -46,6 +46,7 @@ Patch104: samba-3.0.0rc3-nmbd-netbiosname.patch # The passwd part has been applied, but not the group part Patch107: samba-3.2.0pre1-grouppwd.patch Patch200: samba-3.2.5-inotify.patch +Patch201: samba-3.6.9-fix_pam_winbind_crash.patch Requires(pre): samba-common = %{epoch}:%{samba_version}-%{release} Requires: pam >= 0:0.64 @@ -231,6 +232,7 @@ cp %{SOURCE11} packaging/Fedora/ #%patch104 -p1 -b .nmbd-netbiosname # FIXME: does not apply %patch107 -p1 -b .grouppwd %patch200 -p0 -b .inotify +%patch201 -p1 -b .pam_winbind_crash mv %samba_source/VERSION %samba_source/VERSION.orig sed -e 's/SAMBA_VERSION_VENDOR_SUFFIX=$/&\"%{samba_release}\"/' < %samba_source/VERSION.orig > %samba_source/VERSION @@ -696,6 +698,10 @@ fi %{_datadir}/pixmaps/samba/logo-small.png %changelog +* Fri Oct 26 2012 - Andreas Schneider -2:3.6.8-95 +- Fix pam_winbind segfault in pam_sm_authenticate(). +- resolves: #870493 + * Mon Sep 17 2012 Guenther Deschner - 2:3.6.8-94 - Update to 3.6.8