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:03 UTC

(flink) branch release-1.20 updated: [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.20
in repository https://gitbox.apache.org/repos/asf/flink.git


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

commit b59241970d92b32bd8d72d042e76a820911d8d66
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Fri Oct 11 11:45:57 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);
         }
     }