Skip to content

RSocket server is subject to empty frames flood denial-of-service #895

Closed

Description

@mostroverkhov

RSocket FrameReassembler 1, 2 silently accepts empty Payload frames with follows flag set - ones with empty both data and metadata.

In this case RSocket stream does zero progress while consuming non-zero CPU, memory and network resources. Because empty frames rate is limited only by network connection width that can be quite large, this may be exploited by external rogue clients to reduce server capacity, responsiveness and lead to elevated costs caused by such parasite traffic.

This vulnerability is similar in spirit to CVE-2019-9518 - flood of empty frames

Activity

  1. OlegDokuka commented on Jul 24, 2020

    @OlegDokuka
    Member

    Good catchup 👍

  2. added this to the 1.0.2 milestone on Jul 27, 2020
  3. OlegDokuka commented on Jul 27, 2020

    @OlegDokuka
    Member

    We will be adding validation on the frame size > 64 as well as going to check that if empty or frame size is less than 64 bytes than this frame has to be the last one. Otherwise, the connection will be terminated.

    For 1.1 the stream will be terminated instead of the whole connection

  4. self-assigned this
    on Jul 27, 2020
  5. mostroverkhov commented on Jul 30, 2020

    @mostroverkhov
    MemberAuthor

    I am not sure why this is marked as "enhancement" given It is covered by CVE - anyways, here another "enhancement" candidate - #898

  6. OlegDokuka commented on Jul 30, 2020

    @OlegDokuka
    Member

    This is not a bug, but rather an improvement to an existing solution so it will be protected against specific malicious use-case

  7. OlegDokuka commented on Jul 30, 2020

    @OlegDokuka
    Member

    @rstoyanchev also, we need to add one more check to ensure that size of all fragments are equal and if the new one is less/greater than the last one, we have to consider it as a terminal frame as well. An attacker can send frames different in size, thus a check for homogenity should be added in place in order to detect a corruption

  8. linked a pull request that will close this issueReject empty fragments #903on Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions