[PATCH v2 1/2] ext4: wipe filename upon file deletion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Zero out filename and file type fields when file is deleted.

Signed-off-by: Leah Rumancik <leah.rumancik@xxxxxxxxx>
---
 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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux