WSL2-Linux-Kernel/fs
David Sterba e430f058d9 btrfs: send: limit number of clones and allocated memory size
[ Upstream commit 33e17b3f5a ]

The arg->clone_sources_count is u64 and can trigger a warning when a
huge value is passed from user space and a huge array is allocated.
Limit the allocated memory to 8MiB (can be increased if needed), which
in turn limits the number of clone sources to 8M / sizeof(struct
clone_root) = 8M / 40 = 209715.  Real world number of clones is from
tens to hundreds, so this is future proof.

Reported-by: syzbot+4376a9a073770c173269@syzkaller.appspotmail.com
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-03 11:45:52 +01:00
..
9p
adfs
affs affs: initialize fsdata in affs_truncate() 2023-02-01 08:27:06 +01:00
afs afs: Fix lost servers_outstanding count 2022-12-31 13:14:45 +01:00
autofs
befs
bfs
btrfs btrfs: send: limit number of clones and allocated memory size 2023-03-03 11:45:52 +01:00
cachefiles
ceph ceph: flush cap releases when the session is flushed 2023-02-14 19:18:03 +01:00
cifs cifs: Fix use-after-free in rdata->read_into_pages() 2023-02-14 19:18:02 +01:00
coda
configfs
cramfs
crypto
debugfs
devpts
dlm fs: dlm: retry accept() until -EAGAIN or error returns 2023-01-12 11:58:51 +01:00
ecryptfs
efivarfs
efs
erofs erofs/zmap.c: Fix incorrect offset calculation 2023-02-06 07:59:00 +01:00
exfat
exportfs
ext2
ext4 ext4: Fix function prototype mismatch for ext4_feat_ktype 2023-02-25 12:06:45 +01:00
f2fs f2fs: fix to do sanity check on i_extra_isize in is_alive() 2023-02-09 11:26:47 +01:00
fat
freevxfs
fscache
fuse
gfs2 gfs2: Always check inode size of inline inodes 2023-02-09 11:26:48 +01:00
hfs hfs/hfsplus: avoid WARN_ON() for sanity check, use proper error handling 2023-01-12 11:59:19 +01:00
hfsplus hfs/hfsplus: use WARN_ON for sanity check 2023-01-12 11:59:18 +01:00
hostfs
hpfs
hugetlbfs
iomap
isofs
jbd2
jffs2
jfs
kernfs
ksmbd ksmbd: limit pdu length size according to connection status 2023-02-01 08:27:24 +01:00
lockd
minix
netfs
nfs pNFS/filelayout: Fix coalescing test for single DS 2023-01-24 07:22:41 +01:00
nfs_common
nfsd NFSD: fix use-after-free in nfsd4_ssc_setup_dul() 2023-02-01 08:27:07 +01:00
nilfs2 nilfs2: fix underflow in second superblock position calculations 2023-02-22 12:57:10 +01:00
nls
notify
ntfs
ntfs3 fs/ntfs3: Validate attribute data and valid sizes 2023-02-09 11:26:47 +01:00
ocfs2
omfs
openpromfs
orangefs
overlayfs ovl: Use "buf" flexible array for memcpy() destination 2023-02-09 11:26:47 +01:00
proc mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps 2023-02-09 11:26:44 +01:00
pstore pstore/zone: Use GFP_ATOMIC to allocate zone buffer 2023-01-12 11:58:46 +01:00
qnx4
qnx6
quota ext4: fix bug_on in __es_tree_search caused by bad quota inode 2023-01-12 11:59:01 +01:00
ramfs
reiserfs fs: reiserfs: remove useless new_opts in reiserfs_remount 2023-02-01 08:27:19 +01:00
romfs
smbfs_common
squashfs revert "squashfs: harden sanity check in squashfs_read_xattr_id_table" 2023-02-22 12:57:07 +01:00
sysfs
sysv
tracefs
ubifs
udf udf: Fix extension of the last extent in the file 2023-01-12 11:59:16 +01:00
ufs
unicode
vboxsf
verity
xfs xfs: don't leak btree cursor when insrec fails after a split 2023-02-22 12:57:04 +01:00
zonefs zonefs: Detect append writes at invalid locations 2023-01-24 07:22:42 +01:00
Kconfig
Kconfig.binfmt
Makefile
aio.c aio: fix mremap after fork null-deref 2023-02-22 12:57:05 +01:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c binfmt: Fix error return code in load_elf_fdpic_binary() 2023-01-12 11:58:46 +01:00
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
buffer.c
char_dev.c
compat_binfmt_elf.c
coredump.c
d_path.c
dax.c
dcache.c
direct-io.c
drop_caches.c
eventfd.c eventfd: provide a eventfd_signal_mask() helper 2023-01-24 07:22:43 +01:00
eventpoll.c eventpoll: add EPOLL_URING_WAKE poll wakeup flag 2023-01-24 07:22:43 +01:00
exec.c
fcntl.c
fhandle.c
file.c
file_table.c
filesystems.c
fs-writeback.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c
inode.c
internal.h
ioctl.c
kernel_read_file.c
libfs.c
locks.c filelock: new helper: vfs_inode_has_locks 2023-01-12 11:59:14 +01:00
mbcache.c mbcache: Avoid nesting of cache->c_list_lock under bit locks 2023-01-12 11:59:20 +01:00
mount.h
mpage.c
namei.c
namespace.c
no-block.c
nsfs.c
open.c
pipe.c
pnode.c pnode: terminate at peers of source 2023-01-12 11:58:47 +01:00
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
remap_range.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c
userfaultfd.c
utimes.c
xattr.c