Bug 291565 - missing gss_inquire_sec_context_by_oid in /usr/lib/libgssapi_krb5.so.122
Summary: missing gss_inquire_sec_context_by_oid in /usr/lib/libgssapi_krb5.so.122
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 15.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on: 291695
Blocks:
  Show dependency tree / graph
 
Reported: 2025-12-11 08:23 UTC by lampa
Modified: 2025-12-15 19:10 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lampa 2025-12-11 08:23:56 UTC
# uname -a
FreeBSD server 15.0-RELEASE FreeBSD 15.0-RELEASE releng/15.0-n280995-7aedc8de6446 GENERIC amd64

# pkg install cyrus-sasl-gssapi
# pkg info cyrus-sasl-gssapi
cyrus-sasl-gssapi-2.1.28
Name           : cyrus-sasl-gssapi
Version        : 2.1.28
Installed on   : Thu Dec 11 09:09:32 2025 CET
Origin         : security/cyrus-sasl2-gssapi
Architecture   : FreeBSD:15:amd64
Prefix         : /usr/local
Categories     : security
Licenses       : BSD4CLAUSE
Maintainer     : ume@FreeBSD.org
WWW            : https://www.cyrusimap.org/sasl/
Comment        : SASL GSSAPI authentication plugin
Options        :
        GSSAPI_BASE    : on
        GSSAPI_HEIMDAL : off
        GSSAPI_MIT     : off
Shared Libs required:
        libc.so.7
        libcom_err.so.122
        libgssapi_krb5.so.122
        libk5crypto.so.122
        libkrb5.so.122
Annotations    :
        FreeBSD_version: 1500068
        build_timestamp: 2025-12-04T01:10:45+0000
        built_by       : poudriere-git-3.4.4-7-gd0e6e138
        port_checkout_unclean: no
        port_git_hash  : b64b73fd938d5b2788547d16ed6a76493acc9142
        ports_top_checkout_unclean: no
        ports_top_git_hash: 629d9fe83024d5fc33b67d7adaddc9be3b346ede
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 69.7KiB
Description    :
SASL GSSAPI authentication plugin


# sasldblistusers2
sasldblistusers2[58443]: unable to dlopen /usr/local/lib/sasl2/libgssapiv2.so: /usr/local/lib/sasl2/libgssapiv2.so: Undefined symbol "gss_inquire_sec_context_by_oid"

# ldd /usr/local/lib/sasl2/libgssapiv2.so
/usr/local/lib/sasl2/libgssapiv2.so:
        libgssapi_krb5.so.122 => /usr/lib/libgssapi_krb5.so.122 (0x10178eab6000)
        libkrb5.so.122 => /usr/lib/libkrb5.so.122 (0x10178f64a000)
        libk5crypto.so.122 => /usr/lib/libk5crypto.so.122 (0x1017906be000)
        libcom_err.so.122 => /usr/lib/libcom_err.so.122 (0x1017910fe000)
        libc.so.7 => /lib/libc.so.7 (0x10178cd62000)
        libkrb5profile.so.122 => /usr/lib/libkrb5profile.so.122 (0x101792b0a000)
        libkrb5support.so.122 => /usr/lib/libkrb5support.so.122 (0x101792646000)
        libcrypto.so.35 => /lib/libcrypto.so.35 (0x101793c00000)
        libthr.so.3 => /lib/libthr.so.3 (0x101792b53000)
        libsys.so.7 => /lib/libsys.so.7 (0x10178b8e6000)

# objdump -T /usr/lib/libgssapi_krb5.so.122|grep by_oid
00000000000469d0 g    DF .text  000000000000022a  HEIMDAL_GSS_2.0 gss_inquire_cred_by_oid

gss_inquire_sec_context_by_oid is not exported, but defined in include file /usr/include/gssapi/gssapi_ext.h
Comment 1 Michael Osipov freebsd_committer freebsd_triage 2025-12-11 11:10:50 UTC
This does not look right and why does it say HEIMDAL although it is MIT Kerberos?

From ports:
# objdump -T /usr/local/lib/libgssapi_krb5.so.2.2 | grep by_oid
00000000000374c0 g    DF .text  000000000000001a  Base        iakerb_gss_inquire_sec_context_by_oid
0000000000034f70 g    DF .text  0000000000000185  Base        krb5_gss_inquire_sec_context_by_oid
000000000002b000 g    DF .text  000000000000022a  Base        gss_inquire_cred_by_oid
000000000002ab90 g    DF .text  00000000000000c0  Base        gss_inquire_sec_context_by_oid
000000000004ae80 g    DF .text  000000000000001a  Base        spnego_gss_inquire_sec_context_by_oid
000000000004aea0 g    DF .text  000000000000001a  Base        spnego_gss_inquire_cred_by_oid
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2025-12-11 12:41:41 UTC
Reread the discussion on src-committers@, especially kib@'s and jhb@'s comments.

According to kib@ and jhb@ changing symbol versions for functions that are the same was incorrect so I restored symbol versions for functions that remained the same. This is for backward compatibility.
Comment 3 Michael Osipov freebsd_committer freebsd_triage 2025-12-11 12:50:50 UTC
(In reply to Cy Schubert from comment #2)

Can you add the reference for that discussion?
Comment 4 Michael Osipov freebsd_committer freebsd_triage 2025-12-11 12:52:43 UTC
(In reply to Cy Schubert from comment #2)

Also, the average use should be able to understand whether the base MIT Kerberos is functionally identical ports MIT Kerberos. If not, one cannot really use it...
Comment 5 lampa 2025-12-11 13:52:32 UTC
This fixes cyrus-sasl-gssapi problem, tested and verified:

diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map
index c0e66aa3c..42f32cc55 100644
--- a/krb5/lib/gssapi/version.map
+++ b/krb5/lib/gssapi/version.map
@@ -39,6 +39,7 @@ HEIMDAL_GSS_2.0 {
                gss_inquire_cred;
                gss_inquire_cred_by_mech;
                gss_inquire_cred_by_oid;
+               gss_inquire_sec_context_by_oid;
                gss_inquire_mech_for_saslname;
                gss_inquire_mechs_for_name;
                gss_inquire_name;
Comment 6 commit-hook freebsd_committer freebsd_triage 2025-12-11 14:04:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f825427c0ae975025e831542782d4078b063a82e

commit f825427c0ae975025e831542782d4078b063a82e
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2025-12-11 14:00:45 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2025-12-11 14:02:37 +0000

    krb5: Add missing symbol

    Submitted by:   lampa@fit.vutbr.cz
    PR:             291565
    MFC after:      1 day

 krb5/lib/gssapi/version.map | 1 +
 1 file changed, 1 insertion(+)
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-12-13 02:20:05 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f97082ae700e67b9c441d869bed003713e8ef483

commit f97082ae700e67b9c441d869bed003713e8ef483
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2025-12-11 14:00:45 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2025-12-13 02:19:40 +0000

    krb5: Add missing symbol

    Submitted by:   lampa@fit.vutbr.cz
    PR:             291565

    (cherry picked from commit f825427c0ae975025e831542782d4078b063a82e)

 krb5/lib/gssapi/version.map | 1 +
 1 file changed, 1 insertion(+)