This is an automated email from the ASF dual-hosted git repository.

michaelsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit b77cd73c19703cc5cdf22c49562ef2cdc139c1a0
Author: Riza Suminto <[email protected]>
AuthorDate: Wed Dec 3 14:33:01 2025 -0800

    IMPALA-14604: Fix ASAN issue in hdfs-fs-cache.cc
    
    This patch fix heap-use-after-free issue around
    HdfsFsCache::GetConnection. The issue is resolved by changing copy
    access to read-only access of HdfsConnOptions parameter entries.
    
    Testing:
    - Pass tmp-file-mgr-test in ASAN build.
    
    Change-Id: I23ae03bf82191cd3cd99f8d4c7cbd99daaa0cfe8
    Reviewed-on: http://gerrit.cloudera.org:8080/23742
    Reviewed-by: Michael Smith <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 be/src/runtime/hdfs-fs-cache.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/runtime/hdfs-fs-cache.cc b/be/src/runtime/hdfs-fs-cache.cc
index 7f8fcb7bd..4c7ed3bf7 100644
--- a/be/src/runtime/hdfs-fs-cache.cc
+++ b/be/src/runtime/hdfs-fs-cache.cc
@@ -104,7 +104,7 @@ Status HdfsFsCache::GetConnection(const string& path, 
hdfsFS* fs, HdfsFsMap* loc
               hdfs_builder, "fs.s3a.secret.key", s3a_secret_key_.c_str());
         }
         if (options != nullptr) {
-          for (auto option : *options) {
+          for (const auto& option : *options) {
             hdfsBuilderConfSetStr(
                 hdfs_builder, option.first.c_str(), option.second.c_str());
           }

Reply via email to