kernel_samsung_a53x/fs/jfs
Jeongjun Park 0ccef97f0c jfs: fix out-of-bounds in dbNextAG() and diAlloc()
[ Upstream commit e63866a475562810500ea7f784099bfe341e761a ]

In dbNextAG() , there is no check for the case where bmp->db_numag is
greater or same than MAXAG due to a polluted image, which causes an
out-of-bounds. Therefore, a bounds check should be added in dbMount().

And in dbNextAG(), a check for the case where agpref is greater than
bmp->db_numag should be added, so an out-of-bounds exception should be
prevented.

Additionally, a check for the case where agno is greater or same than
MAXAG should be added in diAlloc() to prevent out-of-bounds.

Reported-by: Jeongjun Park <aha310510@gmail.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Jeongjun Park <aha310510@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:21 +01:00
..
acl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_acl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_btree.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_dinode.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_discard.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_discard.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_dmap.c jfs: fix out-of-bounds in dbNextAG() and diAlloc() 2024-11-23 23:21:21 +01:00
jfs_dmap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_dtree.c jfs: fix slab-out-of-bounds Read in dtSearch 2024-11-18 12:13:09 +01:00
jfs_dtree.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_extent.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_extent.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_filsys.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_imap.c jfs: fix out-of-bounds in dbNextAG() and diAlloc() 2024-11-23 23:21:21 +01:00
jfs_imap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_incore.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_inode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_inode.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_lock.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_logmgr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_logmgr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_metapage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_metapage.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_mount.c jfs: fix uaf in jfs_evict_inode 2024-11-18 12:13:09 +01:00
jfs_superblock.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_txnmgr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_txnmgr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_umount.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_unicode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_unicode.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_uniupr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_xattr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_xtree.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs_xtree.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
namei.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
resize.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
super.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
symlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xattr.c jfs: don't walk off the end of ealist 2024-11-19 14:19:51 +01:00