Skip to content

Commit 5e24ec4

Browse files
authored
Merge pull request #145 from gkurz/cve-2025-58354-for-1.10
CVE 2025 58354 for 1.10
2 parents 4560d2b + 712987e commit 5e24ec4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/agent/src/main.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use nix::unistd::{self, dup, sync, Pid};
3131
use std::env;
3232
use std::ffi::OsStr;
3333
use std::fs::{self, File};
34+
use std::io::ErrorKind;
3435
use std::os::unix::fs::{self as unixfs, FileTypeExt};
3536
use std::os::unix::io::AsRawFd;
3637
use std::path::Path;
@@ -482,8 +483,17 @@ fn attestation_binaries_available(logger: &Logger, procs: &GuestComponentsProcs)
482483
_ => vec![],
483484
};
484485
for binary in binaries.iter() {
485-
if !Path::new(binary).exists() {
486-
warn!(logger, "{} not found", binary);
486+
let exists = Path::new(binary)
487+
.try_exists()
488+
.unwrap_or_else(|error| match error.kind() {
489+
ErrorKind::NotFound => {
490+
warn!(logger, "{} not found", binary);
491+
false
492+
}
493+
_ => panic!("Path existence check failed for '{}': {}", binary, error),
494+
});
495+
496+
if !exists {
487497
return false;
488498
}
489499
}

0 commit comments

Comments
 (0)