Skip to content

Patch `grape-entity` to prevent having NameError loop

Mehmet Emin INAC requested to merge hotfix_grape_entity_gem into master

What does this MR do?

RubyVM starts raising NameError errors in case of an error in our Grape::Entity instances because of a bug existing in the gem's upstream version.

This causes high CPU usage and puts us at the risk of having DoS. The VM would eventually raise a SystemStackError but this takes quite long because the repeating frames are huge.

In this MR, I propose monkey-patching the grape-entity gem until the upstream version gets fixed.

Related to #329436 (closed).

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Mehmet Emin INAC

Merge request reports

Loading