You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2024/10/16 11:10:09 UTC

(flink) branch release-1.19 updated: [1.19][FLINK-36511] Prevent StackOverflow in FlinkSecurityManager

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

chesnay pushed a commit to branch release-1.19
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.19 by this push:
     new e6b1884c5f7 [1.19][FLINK-36511] Prevent StackOverflow in FlinkSecurityManager
e6b1884c5f7 is described below

commit e6b1884c5f7bbc782bce8dd3a97f4a8962926f29
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Fri Oct 11 11:45:02 2024 +0200

    [1.19][FLINK-36511] Prevent StackOverflow in FlinkSecurityManager
    
    Backport of https://github.com/apache/flink/pull/25495.
---
 .../main/java/org/apache/flink/core/security/FlinkSecurityManager.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/flink-core/src/main/java/org/apache/flink/core/security/FlinkSecurityManager.java b/flink-core/src/main/java/org/apache/flink/core/security/FlinkSecurityManager.java
index cab2768c9b2..05faf6f75b9 100644
--- a/flink-core/src/main/java/org/apache/flink/core/security/FlinkSecurityManager.java
+++ b/flink-core/src/main/java/org/apache/flink/core/security/FlinkSecurityManager.java
@@ -181,6 +181,8 @@ public class FlinkSecurityManager extends SecurityManager {
         // At this point, exit is determined. Halt if defined, otherwise check ended, JVM will call
         // System.exit
         if (haltOnSystemExit) {
+            // null the security manager to prevent infinite recursion
+            System.setSecurityManager(null);
             Runtime.getRuntime().halt(status);
         }
     }