Skip to content

[P2][Tier-1] Crafted interaction term crashes LiveView via unrescued FunctionClauseError (audit C6) #195

Description

@ty13r

Severity: P2 (client-triggerable crash) · Tier-1 (mechanical)
Co-maintained repo (Pascal = architect).
Location: packages/live_ui/lib/live_ui/runtime/screen_component.ex:182 + packages/unified_iur/lib/unified_iur/interaction.ex:99-102

decode_interaction rescues only ArgumentError, then calls Interaction.new/1, which only matches %Interaction{} / list / map. A base64 term that decodes safely to a bare value (integer/tuple/binary — all permitted under [:safe]) hits no new/1 clause -> FunctionClauseError, unrescued -> process crash. Bounded (LV re-mounts; [:safe] blocks code-exec) but a client-triggerable crash on the canonical event path.

Fix: add a catch-all Interaction.new(_), do: {:error, …} or broaden the rescue to [ArgumentError, FunctionClauseError] returning {:error, :invalid_canonical_interaction}.

2026-05-28 cross-repo review — see ariston-ui docs/audits/cross-repo-review-2026-05-28.md (finding C6).

Activity

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