summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-16 18:41:03 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:42 +0000
commit8e2921f1ced3d27dce017bf1a5f427d3b1bb6db6 (patch)
tree38cfe08c761b1b0013a4180772d3bcddae35a2d8
parent4871f4fda7b1cdb2b7ab74909e47f1c027e75767 (diff)
nvmutil: harden against hardlink attacks
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index d0c1d042..2182348a 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -991,8 +991,8 @@ open_gbe_file(void)
gbe_ino = gbe_st.st_ino;
if (gbe_st.st_nlink > 1)
- fprintf(stderr,
- "%s: warning: file has %lu hard links\n",
+ err(EINVAL,
+ "%s: warning: file has multiple (%lu) hard links\n",
fname, (unsigned long)gbe_st.st_nlink);
if (gbe_st.st_nlink == 0)