Skip to content

Commit e67610c

Browse files
authored
Merge pull request #1686 from giuseppe/fix-mode-krun-config
krun: make krun config file world readable
2 parents e208daa + b09aa67 commit e67610c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcrun/handlers/krun.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ libkrun_configure_container (void *cookie, enum handler_configure_phase phase,
212212

213213
/* CVE-2025-24965: the content below rootfs cannot be trusted because it is controlled by the user. We
214214
must ensure the file is opened below the rootfs directory. */
215-
fd = safe_openat (rootfsfd, rootfs, KRUN_CONFIG_FILE, WRITE_FILE_DEFAULT_FLAGS | O_NOFOLLOW, 0700, err);
215+
fd = safe_openat (rootfsfd, rootfs, KRUN_CONFIG_FILE, WRITE_FILE_DEFAULT_FLAGS | O_NOFOLLOW, S_IRUSR | S_IRGRP | S_IROTH, err);
216216
if (UNLIKELY (fd < 0))
217217
return fd;
218218

0 commit comments

Comments
 (0)