Files
stambha/third_party/patches/linux/0025-share-original-dumpability.patch
T

46 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tyler Smith <74526874+tylertms@users.noreply.github.com>
Date: Tue, 3 Nov 2026 03:15:05 +0000
Subject: [PATCH] refactor(exec): share original dumpability default with
credentials
---
fs/exec.c | 2 --
kernel/exec_state.c | 4 ++++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/exec.c b/fs/exec.c
index fd21bea6bb8aa9890af133a207e0e9625af87e93..7ce1a59ea7b62a742be2d70fb887ad775d9faa06 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -85,8 +85,6 @@
static int bprm_creds_from_file(struct linux_binprm *bprm);
-int suid_dumpable = 0;
-
static LIST_HEAD(formats);
static DEFINE_RWLOCK(binfmt_lock);
diff --git a/kernel/exec_state.c b/kernel/exec_state.c
index 3550e6c175dc6fda423f939453ca6bfb52a4b961..7596cb4fa52d87c4a5d8bd2522e174d2febfedf8 100644
--- a/kernel/exec_state.c
+++ b/kernel/exec_state.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2026 Christian Brauner <brauner@kernel.org> */
+#include <linux/binfmts.h>
#include <linux/init.h>
#include <linux/rcupdate.h>
#include <linux/refcount.h>
@@ -10,6 +11,9 @@
#include <linux/slab.h>
#include <linux/user_namespace.h>
+/* Original fs/exec.c default, shared with credential transitions. */
+int suid_dumpable = 0;
+
/* init to 2 - one for init_task, one to ensure it is never freed */
struct task_exec_state init_task_exec_state = {
.count = REFCOUNT_INIT(2),