Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2021 13:28:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 255420] pam_exec expose_auth_tok segfaults
Message-ID:  <bug-255420-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255420

            Bug ID: 255420
           Summary: pam_exec expose_auth_tok segfaults
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: divVerent@gmail.com

Repro: add to a /etc/pam.d/login:

auth optional pam_exec.so expose_authtok -- /bin/sh -c 'cat > /dev/null'

Result: can no longer login; login will segfault in a strlen(...) + 1 call.

Debugging further yields that this happens in the _second_ call to pam_exec,
namely, pam_sm_setcred. pam_exec there queries the auth token but seems to =
be
getting NULL back.

Suggesting "somehow" handling the case of the pam_get_item(PAM_AUTHTOK) bei=
ng
NULL.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255420-227>