Skip to content

Possible out-of-bounds read #2803

@VyacheslavVanin

Description

@VyacheslavVanin

here we expect message to have clusterMsgLight header
https://github.com/valkey-io/valkey/blob/unstable/src/cluster_legacy.c#L3627

but we use this chunk as if it has clusterMsg
https://github.com/valkey-io/valkey/blob/unstable/src/cluster_legacy.c#L3622
and print sender field that is not present in clusterMsgLight. As a result we see part of our pubsub channel names in logs instead of node names. And it looks like if messages are small enough then out-of-bounds read is possible

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