Skip to content

createrune accepts an empty restriction, after which showrunes crashes lightningd (SIGSEGV) #9673

Open

Description

@MattDHill

Issue and Steps to Reproduce

On a fresh regtest node:

lightning-cli createrune null '[["method=getinfo"],[],["rate=60"]]'
lightning-cli showrunes

createrune accepts the empty restriction ([]) and returns a rune. The next showrunes kills lightningd:

**BROKEN** lightningd: FATAL SIGNAL 11 (version v26.06.7)

The rune is stored, so after a restart every showrunes call crashes lightningd again.

Other malformed restrictions are rejected as expected: [[""]], ["method=getinfo"] and method=getinfo all return restrictions: not a valid restriction. An empty restriction as the last element ([["method=getinfo"],[]]) did not crash in my test.

Expected: createrune rejects a restriction with no alternatives, as it rejects [[""]].

Version

Reproduced on v26.06.7 (the official elementsproject/lightningd:v26.06.7 image) and v26.06.9. lightningd/runes.c on master has no change in this area since.

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