kernel_samsung_a53x/fs
Kemeng Shi 919de34d5e ext4: avoid potential buffer_head leak in __ext4_new_inode()
[ Upstream commit 227d31b9214d1b9513383cf6c7180628d4b3b61f ]

If a group is marked EXT4_GROUP_INFO_IBITMAP_CORRUPT after it's inode
bitmap buffer_head was successfully verified, then __ext4_new_inode()
will get a valid inode_bitmap_bh of a corrupted group from
ext4_read_inode_bitmap() in which case inode_bitmap_bh misses a release.
Hnadle "IS_ERR(inode_bitmap_bh)" and group corruption separately like
how ext4_free_inode() does to avoid buffer_head leak.

Fixes: 9008a58e5dce ("ext4: make the bitmap read routines return real error codes")
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Link: https://patch.msgid.link/20240820132234.2759926-3-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:23 +01:00
..
9p fs/9p: drop inodes immediately on non-.L too 2024-11-19 11:32:45 +01:00
adfs
affs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
afs afs: Don't cross .backup mountpoint from backup volume 2024-11-19 12:27:12 +01:00
autofs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
befs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bfs
btrfs btrfs: update target inode's ctime on unlink 2024-11-23 23:21:10 +01:00
cachefiles Revert "namei: introduce struct renamedata" 2024-11-19 13:45:08 +01:00
ceph ceph: fix incorrect kmalloc size of pagevec mempool 2024-11-23 23:20:18 +01:00
cifs smb: client: fix deadlock in smb2_find_smb_tcon() 2024-11-19 14:19:30 +01:00
coda
configfs
cramfs
crypto Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs
devpts
dlm
ecryptfs Revert "namei: introduce struct renamedata" 2024-11-19 13:45:08 +01:00
efivarfs
efs
erofs
exfat exfat: support handle zero-size directory 2024-11-18 11:43:14 +01:00
exportfs exportfs: use pr_debug for unreachable debug statements 2024-11-19 12:28:26 +01:00
ext2 ext2: Verify bitmap and itable block numbers before using them 2024-11-23 23:20:12 +01:00
ext4 ext4: avoid potential buffer_head leak in __ext4_new_inode() 2024-11-23 23:21:23 +01:00
f2fs f2fs: fix to do sanity check in update_sit_entry 2024-11-23 23:20:46 +01:00
fat fat: fix uninitialized field in nostale filehandles 2024-11-19 09:22:16 +01:00
freevxfs
fscache
fuse fuse: use unsigned type for getxattr/listxattr size truncation 2024-11-23 23:21:00 +01:00
gfs2 gfs2: setattr_chown: Add missing initialization 2024-11-23 23:20:45 +01:00
hfs hfs: fix to initialize fields of hfs_inode_info after hfs_alloc_inode() 2024-11-23 23:20:12 +01:00
hfsplus hfsplus: fix to avoid false alarm of circular locking 2024-11-23 23:19:56 +01:00
hostfs
hpfs
hugetlbfs fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super 2024-11-18 23:18:30 +01:00
incfs
iomap
isofs isofs: handle CDs with bad root inode but good Joliet root directory 2024-11-19 09:23:14 +01:00
jbd2 jbd2: avoid memleak in jbd2_journal_write_metadata_buffer 2024-11-23 23:20:24 +01:00
jffs2 jffs2: Fix potential illegal address access in jffs2_free_inode 2024-11-19 14:19:41 +01:00
jfs jfs: fix out-of-bounds in dbNextAG() and diAlloc() 2024-11-23 23:21:21 +01:00
kernfs fs/kernfs/dir: obey S_ISGID 2024-11-18 12:13:20 +01:00
lockd nfsd: stop setting ->pg_stats for unused stats 2024-11-23 23:21:02 +01:00
minix
nfs NFS: Avoid unnecessary rescanning of the per-server delegation list 2024-11-23 23:21:11 +01:00
nfs_common NFSD: Add an xdr_stream-based encoder for NFSv2/3 ACLs 2024-11-19 12:27:35 +01:00
nfsd nfsd: make svc_stat per-network namespace instead of global 2024-11-23 23:21:02 +01:00
nilfs2 nilfs2: protect references to superblock parameters exposed in sysfs 2024-11-23 23:21:08 +01:00
nls Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
notify fsnotify: clear PARENT_WATCHED flags lazily 2024-11-23 23:20:58 +01:00
ntfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ocfs2 ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry() 2024-11-23 23:21:15 +01:00
omfs
openpromfs openpromfs: finish conversion to the new mount API 2024-11-19 12:26:52 +01:00
orangefs orangefs: fix out-of-bounds fsid access 2024-11-19 14:19:41 +01:00
overlayfs ima: detect changes to the backing overlay file 2024-11-18 11:43:25 +01:00
proc sysctl: always initialize i_uid/i_gid 2024-11-23 23:20:19 +01:00
pstore pstore/zone: Add a null pointer check to the psz_kmsg_read 2024-11-19 09:23:13 +01:00
qnx4
qnx6 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
quota quota: Remove BUG_ON from dqget() 2024-11-23 23:20:45 +01:00
ramfs
reiserfs
romfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sdfat
squashfs Squashfs: sanity check symbolic link size 2024-11-23 23:21:06 +01:00
sysfs fs: sysfs: Fix reference leak in sysfs_break_active_protection() 2024-11-19 11:32:23 +01:00
sysv sysv: don't call sb_bread() with pointers_lock held 2024-11-19 09:23:14 +01:00
tracefs
ubifs ubifs: Set page uptodate in the correct place 2024-11-19 09:22:16 +01:00
udf udf: Avoid excessive partition lengths 2024-11-23 23:21:03 +01:00
ufs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unicode
vboxsf vboxsf: Avoid an spurious warning if load_nls_xxx() fails 2024-11-19 09:22:46 +01:00
verity Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zonefs zonefs: Improve error handling 2024-11-18 22:25:32 +01:00
aio.c fs/aio: Check IOCB_AIO_RW before the struct aio_kiocb conversion 2024-11-19 09:22:39 +01:00
anon_inodes.c
attr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bad_inode.c
binfmt_aout.c
binfmt_elf.c binfmt_misc: pass binfmt_misc flags to the interpreter 2024-11-23 23:20:49 +01:00
binfmt_elf_fdpic.c binfmt_misc: pass binfmt_misc flags to the interpreter 2024-11-23 23:20:49 +01:00
binfmt_em86.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
binfmt_flat.c
binfmt_misc.c binfmt_misc: pass binfmt_misc flags to the interpreter 2024-11-23 23:20:49 +01:00
binfmt_script.c
block_dev.c block: Don't invalidate pagecache for invalid falloc modes 2024-11-18 12:12:06 +01:00
buffer.c
char_dev.c
compat_binfmt_elf.c
coredump.c exec: Simplify unshare_files 2024-11-19 12:27:27 +01:00
d_path.c
dax.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dcache.c fs: better handle deep ancestor chains in is_subdir() 2024-11-19 14:19:50 +01:00
dcookies.c
direct-io.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dlog_hook.c
drop_caches.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eventfd.c
eventpoll.c
exec.c exec: Fix ToCToU between perm check and set-uid/gid usage 2024-11-23 23:20:31 +01:00
fcntl.c
fhandle.c do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak 2024-11-19 08:44:37 +01:00
file.c fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE 2024-11-23 23:20:42 +01:00
file_table.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
filesystems.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs-writeback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs_context.c
fs_parser.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c Revert "fs: add file and path permissions helpers" 2024-11-19 13:30:21 +01:00
inode.c vfs: Don't evict inode under the inode lru traversing context 2024-11-23 23:20:42 +01:00
internal.h
ioctl.c
Kconfig NFSD: Remove CONFIG_NFSD_V3 2024-11-19 12:27:54 +01:00
Kconfig.binfmt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kernel_read_file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libfs.c
locks.c filelock: Fix fcntl/close race recovery compat path 2024-11-19 14:19:53 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mbcache.c mbcache: Speed up cache entry creation 2024-11-19 17:58:19 +01:00
mount.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpage.c
namei.c Revert "namei: introduce struct renamedata" 2024-11-19 13:45:08 +01:00
namespace.c mount: handle OOM on mnt_warn_timestamp_expiry 2024-11-23 23:21:17 +01:00
no-block.c
nsfs.c
open.c ftruncate: pass a signed offset 2024-11-19 14:19:34 +01:00
pipe.c pipe: wakeup wr_wait after setting max_usage 2024-11-18 12:13:04 +01:00
pnode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pnode.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
posix_acl.c
proc_namespace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
read_write.c
readdir.c
remap_range.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
select.c fs/select: rework stack allocation hack for clang 2024-11-19 08:44:37 +01:00
seq_file.c
signalfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
splice.c splice: don't generate zero-len segement bvecs 2024-11-19 17:42:24 +01:00
stack.c
stat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
statfs.c
super.c fs: explicitly unregister per-superblock BDIs 2024-11-23 23:21:17 +01:00
sync.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timerfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
userfaultfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
utimes.c
xattr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00