* [PATCH] e2fsck: Make sure quota files are not referenced from dirs
@ 2021-08-12 13:32 Jan Kara
2021-08-13 16:52 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2021-08-12 13:32 UTC (permalink / raw)
To: Ted Tso; +Cc: linux-ext4, Jan Kara
Quota files must not be referenced from directory entries. Otherwise
they can get corrupted under the hands of the kernel.
Signed-off-by: Jan Kara <jack@suse.cz>
---
e2fsck/pass2.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index bd974c551b74..cb80d33311bc 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -1441,7 +1441,10 @@ skip_checksum:
name_len = ext2fs_dirent_name_len(dirent);
if (((dirent->inode != EXT2_ROOT_INO) &&
(dirent->inode < EXT2_FIRST_INODE(fs->super))) ||
- (dirent->inode > fs->super->s_inodes_count)) {
+ (dirent->inode > fs->super->s_inodes_count) ||
+ (dirent->inode == fs->super->s_usr_quota_inum) ||
+ (dirent->inode == fs->super->s_grp_quota_inum) ||
+ (dirent->inode == fs->super->s_prj_quota_inum)) {
problem = PR_2_BAD_INO;
} else if (ctx->inode_bb_map &&
(ext2fs_test_inode_bitmap2(ctx->inode_bb_map,
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] e2fsck: Make sure quota files are not referenced from dirs
2021-08-12 13:32 [PATCH] e2fsck: Make sure quota files are not referenced from dirs Jan Kara
@ 2021-08-13 16:52 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2021-08-13 16:52 UTC (permalink / raw)
To: Jan Kara; +Cc: Theodore Ts'o, linux-ext4
On Thu, 12 Aug 2021 15:32:16 +0200, Jan Kara wrote:
> Quota files must not be referenced from directory entries. Otherwise
> they can get corrupted under the hands of the kernel.
>
>
>
>
Applied, thanks!
[1/1] e2fsck: Make sure quota files are not referenced from dirs
(no commit info)
Best regards,
--
Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-13 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 13:32 [PATCH] e2fsck: Make sure quota files are not referenced from dirs Jan Kara
2021-08-13 16:52 ` Theodore Ts'o
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.