1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-19 15:33:56 +00:00

ext2fs: check for eh_depth in ext4_ext_check_header()

PR:			259112
Reported by:		Robert Morris <rtm@lcs.mit.edu>
Reviewed by:		fsu
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D33030
This commit is contained in:
Neel Chauhan 2021-11-16 16:25:04 -08:00
parent 9dae2d03bc
commit be60d8f276

View File

@ -297,6 +297,10 @@ ext4_ext_check_header(struct inode *ip, struct ext4_extent_header *eh)
error_msg = "header: invalid eh_entries";
goto corrupted;
}
if (eh->eh_depth > 5) {
error_msg = "header: invalid eh_depth";
goto corrupted;
}
return (0);