You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2025/04/21 15:25:00 UTC
[jira] [Commented] (IMPALA-13973) Base64 decoding doesn't report errors in some platforms
[ https://issues.apache.org/jira/browse/IMPALA-13973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17946157#comment-17946157 ]
ASF subversion and git services commented on IMPALA-13973:
----------------------------------------------------------
Commit b19331b3d336f680f67c15b4674e2523288d7e59 in impala's branch refs/heads/master from Zoltan Borok-Nagy
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=b19331b3d ]
IMPALA-13968: Fix TestBinaryTypeInText.test_invalid_binary_type in ARM builds
In some platforms there's a bug in libSASL, which makes sasl_decode64()
accept almost anything as input and it won't report any errors.
See details here:
https://github.com/cyrusimap/cyrus-sasl/issues/619
TestBinaryTypeInText::test_invalid_binary_type uses a data file
that has two values that should be Base64 encoded but they aren't.
The test checks that Impala raises the corresponding errors.
The first value doesn't have a correct size, so Impala's
Base64DecodeBufLen() will reject it. The second one passes the
Base64DecodeBufLen() check so we will try to decode it with
Base64Decode() that uses sasl_decode64() under the hood. If
sasl_decode64() has the bug we won't report any errors for the
second value.
This patch changes the second value to one that still passes
the Base64DecodeBufLen() check, but also sasl_decode64() rejects
it in all platforms. To achieve this, the new value uses the
special '=' character.
The bug in sasl_decode64() is also a known issue in Impala,
see IMPALA-9926.
Alternatively, we could create our own Base64 decoder, or use one
from a different library, but it is out of scope of this patch
as it requires more thought and performance measurements.
IMPALA-13973 tracks this option.
Change-Id: Ifff99fd2839e75add49ee835323764615bd5139a
Reviewed-on: http://gerrit.cloudera.org:8080/22791
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
> Base64 decoding doesn't report errors in some platforms
> -------------------------------------------------------
>
> Key: IMPALA-13973
> URL: https://issues.apache.org/jira/browse/IMPALA-13973
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Reporter: Zoltán Borók-Nagy
> Priority: Major
> Labels: ramp-up
>
> Base64 decoding doesn't report errors in some platforms.
> When the libSASL library in the system has a bug, sasl_decode64() accepts almost anything instead of rerturning a proper error code.
> See details at https://github.com/cyrusimap/cyrus-sasl/issues/619
> This issue was already reported by IMPALA-9926 and IMPALA-13968, but they only modified our tests to make them pass in such environments.
> We could add our own implementation for Base64 decoding, or use another library that doesn't have this bug (and hopefully neither other bugs).
> The issue is fixed in libSASL, but since we use the library from the system we run on, it means we cannot guarantee correct behavior.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org