linux-stable/fs/btrfs
Alexander Potapenko 7e43bb69bc btrfs: zlib: zero-initialize zlib workspace
commit eadd7deca0 upstream.

KMSAN reports uses of uninitialized memory in zlib's longest_match()
called on memory originating from zlib_alloc_workspace().
This issue is known by zlib maintainers and is claimed to be harmless,
but to be on the safe side we'd better initialize the memory.

Link: https://zlib.net/zlib_faq.html#faq36
Reported-by: syzbot+14d9e7602ebdf7ec0a60@syzkaller.appspotmail.com
CC: stable@vger.kernel.org # 5.4+
Signed-off-by: Alexander Potapenko <glider@google.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:50:30 +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 btrfs: fix memory ordering between normal and ordered work functions 2021-11-26 10:47:21 +01:00
async-thread.h Btrfs: fix crash during unmount due to race with delayed inode workers 2020-04-17 10:50:15 +02:00
backref.c btrfs: fix resolving backrefs for inline extent followed by prealloc 2023-01-18 11:41:46 +01:00
backref.h btrfs: fiemap: preallocate ulists for btrfs_check_shared 2019-07-01 13:34:53 +02:00
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 btrfs: scrub: Don't check free space before marking a block group RO 2021-03-20 10:39:46 +01:00
block-rsv.c btrfs: force chunk allocation if our global rsv is larger than metadata 2020-06-22 09:31:13 +02:00
block-rsv.h btrfs: migrate the global_block_rsv helpers to block-rsv.c 2019-07-02 12:30:55 +02:00
btrfs_inode.h btrfs: fix race between marking inode needs to be logged and log syncing 2021-09-03 10:08:15 +02:00
check-integrity.c btrfs: fix possible NULL-pointer dereference in integrity checks 2020-02-24 08:36:53 +01:00
check-integrity.h
compression.c btrfs: mark compressed range uptodate only if all bio succeed 2021-08-04 12:27:37 +02:00
compression.h btrfs: compression: replace set_level callbacks by a common helper 2019-09-09 14:59:11 +02:00
ctree.c btrfs: check the root node for uptodate before returning it 2022-01-27 09:19:50 +01:00
ctree.h btrfs: unify lookup return value when dir entry is missing 2022-09-05 10:27:46 +02:00
delalloc-space.c btrfs: make btrfs_qgroup_reserve_data take btrfs_inode 2021-08-15 13:08:04 +02:00
delalloc-space.h btrfs: migrate the delalloc space stuff to it's own home 2019-07-04 17:26:17 +02:00
delayed-inode.c btrfs: don't flush from btrfs_delayed_inode_reserve_metadata 2021-08-15 13:08:06 +02:00
delayed-inode.h
delayed-ref.c Btrfs: fix race between adding and putting tree mod seq elements and nodes 2020-02-11 04:35:34 -08:00
delayed-ref.h btrfs: migrate the delayed refs rsv code 2019-07-04 17:26:17 +02:00
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 btrfs: Make reada_tree_block_flagged private 2019-09-09 14:59:11 +02:00
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 btrfs: unlock newly allocated extent buffer after error 2021-10-20 11:40:13 +02:00
extent_io.c btrfs: clear extent buffer uptodate when we fail to write it 2021-12-14 14:49:01 +01:00
extent_io.h btrfs: fix qgroup reserve overflow the qgroup limit 2022-04-15 14:18:39 +02:00
extent_map.c Btrfs: fix race between using extent maps and merging them 2020-02-19 19:53:00 +01:00
extent_map.h
file-item.c btrfs: fix error handling in btrfs_del_csums 2021-06-10 13:37:13 +02:00
file.c btrfs: fix race between marking inode needs to be logged and log syncing 2021-09-03 10:08:15 +02:00
free-space-cache.c btrfs: delete duplicated words + other fixes in comments 2021-08-08 09:04:07 +02:00
free-space-cache.h btrfs: move struct io_ctl to free-space-cache.h 2019-09-09 14:59:15 +02:00
free-space-tree.c btrfs: fix possible free space tree corruption with online conversion 2021-02-03 23:25:57 +01:00
free-space-tree.h btrfs: move basic block_group definitions to their own header 2019-09-09 14:59:03 +02:00
inode-item.c btrfs: Make btrfs_find_name_in_ext_backref return struct btrfs_inode_extref 2019-09-09 14:59:16 +02:00
inode-map.c btrfs: qgroup: Always free PREALLOC META reserve in btrfs_delalloc_release_extents() 2019-10-15 18:50:07 +02:00
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 btrfs: disable build on platforms having page size 256K 2021-07-14 16:53:14 +02:00
locking.c btrfs: move cond_wake_up functions out of ctree 2019-09-09 14:59:15 +02:00
locking.h btrfs: Remove unused locking functions 2019-09-09 14:58:59 +02:00
lzo.c btrfs: compression: replace set_level callbacks by a common helper 2019-09-09 14:59:11 +02:00
Makefile btrfs: migrate the block group lookup code 2019-09-09 14:59:04 +02:00
misc.h btrfs: move math functions to misc.h 2019-09-09 14:59:15 +02:00
ordered-data.c Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents 2020-02-28 17:22:24 +01:00
ordered-data.h btrfs: don't assume ordered sums to be 4 bytes 2019-07-01 13:35:00 +02:00
orphan.c
print-tree.c btrfs: require only sector size alignment for parent eb bytenr 2020-09-17 13:47:51 +02:00
print-tree.h
props.c btrfs: rename the btrfs_calc_*_metadata_size helpers 2019-09-09 14:59:13 +02:00
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 btrfs: export and rename qgroup_reserve_meta 2021-08-15 13:08:06 +02:00
raid56.c btrfs: raid56: don't trust any cached sector in __raid56_parity_recover() 2022-08-25 11:18:40 +02:00
raid56.h btrfs: constify map parameter for nr_parity_stripes and nr_data_stripes 2019-07-01 13:34:58 +02:00
rcu-string.h btrfs: replace strncpy() with strscpy() 2023-01-18 11:41:52 +01:00
reada.c btrfs: fix readahead hang and use-after-free after removing a device 2020-11-05 11:43:27 +01:00
ref-verify.c btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod 2020-11-18 19:20:28 +01:00
ref-verify.h
relocation.c btrfs: convert logic BUG_ON()'s in replace_path to ASSERT()'s 2021-05-11 14:04:07 +02:00
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: avoid unaligned encoded writes when attempting to clone range 2022-12-14 11:30:41 +01:00
send.h
space-info.c btrfs: prevent __btrfs_dump_space_info() to underflow its free space 2021-09-30 10:09:22 +02:00
space-info.h btrfs: take overcommit into account in inc_block_group_ro 2020-10-17 10:11:21 +02:00
struct-funcs.c btrfs: tie extent buffer and it's token together 2019-09-09 14:59:16 +02:00
super.c btrfs: fix transaction leak and crash after RO remount caused by qgroup rescan 2021-01-19 18:26:14 +01:00
sysfs.c btrfs: sysfs: normalize the error handling branch in btrfs_init_sysfs() 2022-12-08 11:23:01 +01:00
sysfs.h btrfs: sysfs: move helper macros to sysfs.c 2019-09-09 14:59:08 +02:00
transaction.c btrfs: qgroup: remove ASYNC_COMMIT mechanism in favor of reserve retry-after-EDQUOT 2021-08-15 13:08:05 +02:00
transaction.h btrfs: fix race between marking inode needs to be logged and log syncing 2021-09-03 10:08:15 +02:00
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 btrfs: do not commit logs and transactions during link and rename operations 2021-08-08 09:04:07 +02:00
ulist.c
ulist.h
uuid-tree.c btrfs: handle ENOENT in btrfs_uuid_tree_iterate 2019-12-31 16:42:05 +01:00
volumes.c btrfs: limit device extents to the device size 2023-02-22 12:50:30 +01:00
volumes.h btrfs: fix readahead hang and use-after-free after removing a device 2020-11-05 11:43:27 +01:00
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 btrfs: move cond_wake_up functions out of ctree 2019-09-09 14:59:15 +02:00