Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer_underflow_exception when putting invalid license #35340

Closed
robin13 opened this issue Nov 7, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@robin13
Copy link
Member

commented Nov 7, 2018

Elasticsearch version: 6.4.2

Plugins installed: []

JVM version (java -version): 1.8.0_191

OS version (uname -a if on a Unix-like system): Linux 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:

When adding an invalid license, a buffer underflow error results. I presume that the cause is some part of the license being invalid, but that the error could/should be better caught and the response message could be clearer.
The error resulted from using the example here without putting in the actual license.

Steps to reproduce:

  1. Put the license:
PUT _xpack/license
{
  "licenses": [
    {
      "uid":"893361dc-9749-4997-93cb-802e3d7fa4xx",
      "type":"basic",
      "issue_date_in_millis":1411948800000,
      "expiry_date_in_millis":1914278399999,
      "max_nodes":1,
      "issued_to":"issuedTo",
      "issuer":"issuer",
      "signature":"xx"
    }
    ]
}
  1. Results in response:
{
  "error": {
    "root_cause": [
      {
        "type": "buffer_underflow_exception",
        "reason": null
      }
    ],
    "type": "buffer_underflow_exception",
    "reason": null
  },
  "status": 500
}
@elasticmachine

This comment has been minimized.

Copy link

commented Nov 7, 2018

@jkakavas jkakavas self-assigned this Nov 7, 2018

@jkakavas

This comment has been minimized.

Copy link
Contributor

commented Jan 4, 2019

The BufferUnderflowException is thrown from

because getInt() attempts to read 4 bytes and the byteBuffer only contains one (the result of base64 decoding the "xx" string a couple of lines above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.