Skip to content

CalDAV connect surfaces verbatim errors to members (LAN scan oracle wider than claimed) #104

Closed

Description

@shockalotti

What

internal/handler/calendar.go:162-167: ConnectCalDAV failures are written verbatim to the form via h.writeError(w, BadRequest, err.Error()). Connection-refused vs timeout vs TLS-handshake vs auth-failed are distinguishable, so any authenticated non-admin member can use CalDAV connect as a LAN port/service scan oracle.

The caldav-connect-self-service-no-admin-gate claim in audit/claims.yaml accepts the metadata-only SSRF guard as a deliberate trade-off but understates this oracle.

Fix

Return a generic "could not connect" to the caller and log the detail server-side. Then update the claim caveat to describe the remaining exposure honestly.

Related nit found in the same pass: save-time CheckHostnameNotMetadata returns nil on DNS failure (internal/netutil/netutil.go:87-98), so dial-time transport is the only real enforcement. The code comment claiming a save-time DNS blip surfaces as a user-actionable error is inaccurate in that case.

Found by the 0.10.1 pre-release audit (Layer 2, SSRF pass).

Activity

  1. pullfrog commented on Sep 29, 2026

    @pullfrog
    Contributor
  2. shockalotti commented on Sep 29, 2026

    @shockalotti
    ContributorAuthor

    Fixed on main. The connect form returned verbatim transport errors, making failure classes distinguishable; it now returns one generic message and logs the detail server-side. The claims.yaml caveat now describes the residual exposure honestly, including the accepted timing side-channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions