** Description changed: + [SRU] 2.79: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2175701 [Impact] When a snap with the kerberos-tickets interface connected sets KRB5CCNAME to a DIR: cache (e.g. DIR:/tmp/krb5cc_1000_dir_<random>), snapd logs "will not expose Kerberos tickets' path: Unsupported KRB5CCNAME" and the snap cannot use its tickets. [Test Plan] Sufficiently covered by the associated PR's integration testing: https://github.com/canonical/snapd/pull/17786/changes#diff-9abf6d8230d245294cd670043eb9eff8fe76b75515824e0be0e81674d3dec94b For manual testing: - 1. Install a snap that plugs kerberos-tickets (e.g. thunderbird). - 2. Connect the kerberos-tickets interface: - snap connect thunderbird:kerberos-tickets - 3. Create a DIR: cache: - mkdir /tmp/krb5cc_test_dir - echo "ticket data" > /tmp/krb5cc_test_dir/tkt_foo - 4. Run the snap with a DIR: KRB5CCNAME and try to read its tickets: - KRB5CCNAME=DIR:/tmp/krb5cc_test_dir thunderbird + 1. Install a snap that plugs kerberos-tickets (e.g. thunderbird). + 2. Connect the kerberos-tickets interface: + snap connect thunderbird:kerberos-tickets + 3. Create a DIR: cache: + mkdir /tmp/krb5cc_test_dir + echo "ticket data" > /tmp/krb5cc_test_dir/tkt_foo + 4. Run the snap with a DIR: KRB5CCNAME and try to read its tickets: + KRB5CCNAME=DIR:/tmp/krb5cc_test_dir thunderbird - * Current snapd: logs "WARNING: will not expose Kerberos tickets' path: - Unsupported KRB5CCNAME: DIR:/tmp/krb5cc_test_dir" and the snap cannot - read the tickets. - * Fixed snapd: maps the path to /var/lib/snapd/hostfs/tmp/krb5cc_test_dir - and the snap can read and write tickets in the directory cache. - + * Current snapd: logs "WARNING: will not expose Kerberos tickets' path: + Unsupported KRB5CCNAME: DIR:/tmp/krb5cc_test_dir" and the snap cannot + read the tickets. + * Fixed snapd: maps the path to /var/lib/snapd/hostfs/tmp/krb5cc_test_dir + and the snap can read and write tickets in the directory cache. [Where problems could occur] snap run's ticket path rewriting now accepts DIR: prefixes; if the prefix check is too loose, an invalid or malicious KRB5CCNAME could expose unexpected host paths to the snap. ---original--- When I connect the `kerberos-tickets` plug and run Thunderbird, I get a warning: 2026/10/05 01:02:20.434826 cmd_run.go:1602: WARNING: will not expose Kerberos tickets' path: Unsupported KRB5CCNAME: DIR:/tmp/krb5cc_1000_dir_2xd9ZVBxK6 This means even after LP #1849346 I can't use Kerberos/GSSAPI with Thunderbird (at least given that I want to use DIR ccaches so I can have tickets for multiple realms). I'm not sure if there's a normal DIR ccache path -- /tmp/krb5cc*/* seems like a reasonable set of paths to allow access to -- it basically parallels the FILE caches and seems unlikely to be a non-krb5 ccache. It looks like part of the problem is that https://github.com/canonical/snapd/blob/b76636669265cec8e983294a8852d15b3cc73280/cmd/snapd/cli/cmd_run.go#L796 doesn't include DIR: as a valid KRB5CCNAME prefix and another part is that subdirectories aren't covered by the apparmor profile (https://github.com/canonical/snapd/blob/b76636669265cec8e983294a8852d15b3cc73280/interfaces/builtin/kerberos_tickets.go#L33). Dunno if there's other things going on here.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2169517 Title: snap's kerberos-tickets plug doesn't support DIR: ccaches To manage notifications about this bug go to: https://bugs.launchpad.net/snapd/+bug/2169517/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
