From: Joel Rosdahl Date: Mon, 12 Jan 2026 20:28:28 +0000 (+0100) Subject: fix: Avoid leaking inode cache file descriptor to executed programs X-Git-Tag: v4.13~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb75d0be00f3334befaa00b8f1ce936aab8532e4;p=thirdparty%2Fccache.git fix: Avoid leaking inode cache file descriptor to executed programs --- diff --git a/src/ccache/inodecache.cpp b/src/ccache/inodecache.cpp index ed9c7f98..22aef2d1 100644 --- a/src/ccache/inodecache.cpp +++ b/src/ccache/inodecache.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2020-2025 Joel Rosdahl and other contributors +// Copyright (C) 2020-2026 Joel Rosdahl and other contributors // // See doc/authors.adoc for a complete list of contributors. // @@ -266,6 +266,7 @@ InodeCache::mmap_file(const fs::path& path) LOG("Failed to open inode cache {}: {}", path, strerror(errno)); return false; } + util::set_cloexec_flag(*m_fd); if (!fd_is_on_known_to_work_file_system(*m_fd)) { return false; }