android_kernel_motorola_sm6375/fs/btrfs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Sterba 98e626c115 btrfs: send: limit number of clones and allocated memory size
[ Upstream commit 33e17b3f5ab74af12aca58c515bc8424ff69a343 ]

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:41:48 +01:00
..
tests btrfs: remove pointless and double ulist frees in error paths of qgroup tests 2022-11-25 17:42:13 +01:00
acl.c
async-thread.c
async-thread.h
backref.c btrfs: fix resolving backrefs for inline extent followed by prealloc 2023-01-18 11:41:46 +01:00
backref.h
block-group.c btrfs: reset block group chunk force if we have to wait 2022-08-25 11:18:11 +02:00
block-group.h
block-rsv.c
block-rsv.h
btrfs_inode.h
check-integrity.c
check-integrity.h
compression.c
compression.h
ctree.c
ctree.h btrfs: unify lookup return value when dir entry is missing 2022-09-05 10:27:46 +02:00
delalloc-space.c
delalloc-space.h
delayed-inode.c
delayed-inode.h
delayed-ref.c
delayed-ref.h
dev-replace.c btrfs: add info when mount fails due to stale replace target 2022-09-05 10:27:43 +02:00
dev-replace.h
dir-item.c btrfs: unify lookup return value when dir entry is missing 2022-09-05 10:27:46 +02:00
disk-io.c btrfs: reject log replay if there is unsupported RO compat flag 2022-08-25 11:18:16 +02:00
disk-io.h
export.c btrfs: fix type of parameter generation in btrfs_get_dentry 2022-11-10 17:57:55 +01:00
export.h btrfs: fix type of parameter generation in btrfs_get_dentry 2022-11-10 17:57:55 +01:00
extent-tree.c
extent_io.c
extent_io.h btrfs: fix qgroup reserve overflow the qgroup limit 2022-04-15 14:18:39 +02:00
extent_map.c
extent_map.h
file-item.c
file.c
free-space-cache.c
free-space-cache.h
free-space-tree.c
free-space-tree.h
inode-item.c
inode-map.c
inode-map.h
inode.c btrfs: do not pin logs too early during renames 2022-09-05 10:27:46 +02:00
ioctl.c btrfs: replace strncpy() with strscpy() 2023-01-18 11:41:52 +01:00
Kconfig
locking.c
locking.h
lzo.c
Makefile
misc.h
ordered-data.c
ordered-data.h
orphan.c
print-tree.c
print-tree.h
props.c
props.h
qgroup.c btrfs: fix race between quota rescan and disable leading to NULL pointer deref 2023-01-24 07:18:00 +01:00
qgroup.h
raid56.c btrfs: raid56: don't trust any cached sector in __raid56_parity_recover() 2022-08-25 11:18:40 +02:00
raid56.h
rcu-string.h btrfs: replace strncpy() with strscpy() 2023-01-18 11:41:52 +01:00
reada.c
ref-verify.c
ref-verify.h
relocation.c
root-tree.c btrfs: fix silent failure when deleting root reference 2022-09-05 10:27:43 +02:00
scrub.c btrfs: scrub: try to fix super block errors 2022-10-26 13:22:55 +02:00
send.c btrfs: send: limit number of clones and allocated memory size 2023-03-03 11:41:48 +01:00
send.h
space-info.c
space-info.h
struct-funcs.c
super.c
sysfs.c btrfs: sysfs: normalize the error handling branch in btrfs_init_sysfs() 2022-12-08 11:23:01 +01:00
sysfs.h
transaction.c
transaction.h
tree-checker.c btrfs: tree-checker: check for overlapping extent items 2022-09-05 10:27:47 +02:00
tree-checker.h
tree-defrag.c
tree-log.c btrfs: unify lookup return value when dir entry is missing 2022-09-05 10:27:46 +02:00
tree-log.h
ulist.c
ulist.h
uuid-tree.c
volumes.c btrfs: free device in btrfs_close_devices for a single device filesystem 2023-02-22 12:50:35 +01:00
volumes.h
xattr.c btrfs: check if root is readonly while setting security xattr 2022-09-05 10:27:43 +02:00
xattr.h
zlib.c btrfs: zlib: zero-initialize zlib workspace 2023-02-22 12:50:30 +01:00
zstd.c