Skip to content

enable preventing pipe injection#373

Merged
grosser merged 1 commit into
masterfrom
grosser/hmac
Apr 24, 2026
Merged

enable preventing pipe injection#373
grosser merged 1 commit into
masterfrom
grosser/hmac

Conversation

@grosser
Copy link
Copy Markdown
Owner

@grosser grosser commented Apr 24, 2026

attackers with the same uid (or root) can inject the pipe parallel uses to trigger code execution

The /proc//fd/ pipe reopen is just one technique among many. Closing it with HMAC while leaving ptrace wide open is like adding a deadbolt to one of ten unlocked doors. Virtually every Ruby gem
that uses Marshal over a pipe (DRb, many job systems, forking web servers' status sockets, etc.) has the same property, and none of them HMAC.
So I'm adding an option to use a safe serializer since I wanted to support different serializers anyways, but it's not really a necessary default.

Credit to: Anas Cherni from Calif.io in collaboration with Claude and Anthropic Research.

@grosser grosser merged commit 71eb9a3 into master Apr 24, 2026
4 checks passed
@grosser grosser deleted the grosser/hmac branch April 24, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant