[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210407154202.1527941-2-leah.rumancik@gmail.com>
Date: Wed, 7 Apr 2021 15:42:01 +0000
From: Leah Rumancik <leah.rumancik@...il.com>
To: linux-ext4@...r.kernel.org
Cc: Leah Rumancik <leah.rumancik@...il.com>
Subject: [PATCH v2 1/2] ext4: wipe filename upon file deletion
Zero out filename and file type fields when file is deleted.
Signed-off-by: Leah Rumancik <leah.rumancik@...il.com>
---
fs/ext4/namei.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 883e2a7cd4ab..0147c86de99e 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2492,6 +2492,10 @@ int ext4_generic_delete_entry(struct inode *dir,
else
de->inode = 0;
inode_inc_iversion(dir);
+
+ memset(de_del->name, 0, de_del->name_len);
+ memset(&de_del->file_type, 0, sizeof(__u8));
+
return 0;
}
i += ext4_rec_len_from_disk(de->rec_len, blocksize);
--
2.31.0.208.g409f899ff0-goog
Powered by blists - more mailing lists