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
CQL typo may cause segmentation fault #3740
Comments
avikivity
pushed a commit
that referenced
this issue
Oct 4, 2018
The Antlr3 exception class has a null dereference bug that crashes the system when trying to extract the exception message using ANTLR_Exception<...>::displayRecognitionError(...) function. When a parsing error occurs the CqlParser throws an exception which in turn processesed for some special cases in scylla to generate a custom message. The default case however, creates the message using displayRecognitionError, causing the system to crash. The fix is a simple workaround, making sure the pointer is not null before the call to the function. A "proper" fix can't be implemented because the exception class itself is implemented outside scylla in antlr headers that resides on the host machine os. Tested manualy 2 testcases, a typo causing scylla to crash and a cql comment without a newline at the end also caused scylla to crash. Ran unit tests (release). Fixes #3740 Fixes #3764 Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <cfc7e0d758d7a855d113bb7c8191b0fd7d2e8921.1538566542.git.eliransin@scylladb.com> (cherry picked from commit 20f4956)
avikivity
pushed a commit
that referenced
this issue
Oct 4, 2018
The Antlr3 exception class has a null dereference bug that crashes the system when trying to extract the exception message using ANTLR_Exception<...>::displayRecognitionError(...) function. When a parsing error occurs the CqlParser throws an exception which in turn processesed for some special cases in scylla to generate a custom message. The default case however, creates the message using displayRecognitionError, causing the system to crash. The fix is a simple workaround, making sure the pointer is not null before the call to the function. A "proper" fix can't be implemented because the exception class itself is implemented outside scylla in antlr headers that resides on the host machine os. Tested manualy 2 testcases, a typo causing scylla to crash and a cql comment without a newline at the end also caused scylla to crash. Ran unit tests (release). Fixes #3740 Fixes #3764 Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <cfc7e0d758d7a855d113bb7c8191b0fd7d2e8921.1538566542.git.eliransin@scylladb.com> (cherry picked from commit 20f4956)
avikivity
pushed a commit
that referenced
this issue
Oct 4, 2018
The Antlr3 exception class has a null dereference bug that crashes the system when trying to extract the exception message using ANTLR_Exception<...>::displayRecognitionError(...) function. When a parsing error occurs the CqlParser throws an exception which in turn processesed for some special cases in scylla to generate a custom message. The default case however, creates the message using displayRecognitionError, causing the system to crash. The fix is a simple workaround, making sure the pointer is not null before the call to the function. A "proper" fix can't be implemented because the exception class itself is implemented outside scylla in antlr headers that resides on the host machine os. Tested manualy 2 testcases, a typo causing scylla to crash and a cql comment without a newline at the end also caused scylla to crash. Ran unit tests (release). Fixes #3740 Fixes #3764 Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <cfc7e0d758d7a855d113bb7c8191b0fd7d2e8921.1538566542.git.eliransin@scylladb.com> (cherry picked from commit 20f4956)
avikivity
pushed a commit
that referenced
this issue
Oct 7, 2018
The Antlr3 exception class has a null dereference bug that crashes the system when trying to extract the exception message using ANTLR_Exception<...>::displayRecognitionError(...) function. When a parsing error occurs the CqlParser throws an exception which in turn processesed for some special cases in scylla to generate a custom message. The default case however, creates the message using displayRecognitionError, causing the system to crash. The fix is a simple workaround, making sure the pointer is not null before the call to the function. A "proper" fix can't be implemented because the exception class itself is implemented outside scylla in antlr headers that resides on the host machine os. Tested manualy 2 testcases, a typo causing scylla to crash and a cql comment without a newline at the end also caused scylla to crash. Ran unit tests (release). Fixes #3740 Fixes #3764 Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <cfc7e0d758d7a855d113bb7c8191b0fd7d2e8921.1538566542.git.eliransin@scylladb.com> (cherry picked from commit 20f4956)
avikivity
pushed a commit
that referenced
this issue
Oct 7, 2018
The Antlr3 exception class has a null dereference bug that crashes the system when trying to extract the exception message using ANTLR_Exception<...>::displayRecognitionError(...) function. When a parsing error occurs the CqlParser throws an exception which in turn processesed for some special cases in scylla to generate a custom message. The default case however, creates the message using displayRecognitionError, causing the system to crash. The fix is a simple workaround, making sure the pointer is not null before the call to the function. A "proper" fix can't be implemented because the exception class itself is implemented outside scylla in antlr headers that resides on the host machine os. Tested manualy 2 testcases, a typo causing scylla to crash and a cql comment without a newline at the end also caused scylla to crash. Ran unit tests (release). Fixes #3740 Fixes #3764 Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <cfc7e0d758d7a855d113bb7c8191b0fd7d2e8921.1538566542.git.eliransin@scylladb.com> (cherry picked from commit 20f4956)
avikivity
pushed a commit
that referenced
this issue
Oct 8, 2018
The Antlr3 exception class has a null dereference bug that crashes the system when trying to extract the exception message using ANTLR_Exception<...>::displayRecognitionError(...) function. When a parsing error occurs the CqlParser throws an exception which in turn processesed for some special cases in scylla to generate a custom message. The default case however, creates the message using displayRecognitionError, causing the system to crash. The fix is a simple workaround, making sure the pointer is not null before the call to the function. A "proper" fix can't be implemented because the exception class itself is implemented outside scylla in antlr headers that resides on the host machine os. Tested manualy 2 testcases, a typo causing scylla to crash and a cql comment without a newline at the end also caused scylla to crash. Ran unit tests (release). Fixes #3740 Fixes #3764 Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <cfc7e0d758d7a855d113bb7c8191b0fd7d2e8921.1538566542.git.eliransin@scylladb.com> (cherry picked from commit 20f4956)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation details
Scylla version (or git commit hash): master, 6593226
I'm not sure yet whether it's a misuse of ANTLR that we can work around or a bug, but here's how to reproduce (note the lack of whitespace between
3
andallow filtering
:Decoded backtrace:
The text was updated successfully, but these errors were encountered: