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/11 09:44:15 UTC

(flink) 01/01: [FLINK-36511] Prevent StackOverflow in FlinkSecurityManager

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

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

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

    [FLINK-36511] Prevent StackOverflow in FlinkSecurityManager
---
 .../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);
         }
     }