lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025122456-CVE-2022-50766-0964@gregkh>
Date: Wed, 24 Dec 2025 14:06:17 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-50766: btrfs: set generation before calling btrfs_clean_tree_block in btrfs_init_new_buffer

From: Greg Kroah-Hartman <gregkh@...nel.org>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

btrfs: set generation before calling btrfs_clean_tree_block in btrfs_init_new_buffer

syzbot is reporting uninit-value in btrfs_clean_tree_block() [1], for
commit bc877d285ca3dba2 ("btrfs: Deduplicate extent_buffer init code")
missed that btrfs_set_header_generation() in btrfs_init_new_buffer() must
not be moved to after clean_tree_block() because clean_tree_block() is
calling btrfs_header_generation() since commit 55c69072d6bd5be1 ("Btrfs:
Fix extent_buffer usage when nodesize != leafsize").

Since memzero_extent_buffer() will reset "struct btrfs_header" part, we
can't move btrfs_set_header_generation() to before memzero_extent_buffer().
Just re-add btrfs_set_header_generation() before btrfs_clean_tree_block().

The Linux kernel CVE team has assigned CVE-2022-50766 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 4.19 with commit bc877d285ca3dba24c52406946a4a69847cc7422 and fixed in 5.15.75 with commit 0a408c6212c16b9a2a1141d3c531247582ef8101
	Issue introduced in 4.19 with commit bc877d285ca3dba24c52406946a4a69847cc7422 and fixed in 5.19.17 with commit a687c2890fe4a2acaac6941fa4097a1264d8f3eb
	Issue introduced in 4.19 with commit bc877d285ca3dba24c52406946a4a69847cc7422 and fixed in 6.0.3 with commit 89bc41c92d10b905c60f6ec13c9ef664a3555c54
	Issue introduced in 4.19 with commit bc877d285ca3dba24c52406946a4a69847cc7422 and fixed in 6.1 with commit cbddcc4fa3443fe8cfb2ff8e210deb1f6a0eea38

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2022-50766
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	fs/btrfs/extent-tree.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/0a408c6212c16b9a2a1141d3c531247582ef8101
	https://git.kernel.org/stable/c/a687c2890fe4a2acaac6941fa4097a1264d8f3eb
	https://git.kernel.org/stable/c/89bc41c92d10b905c60f6ec13c9ef664a3555c54
	https://git.kernel.org/stable/c/cbddcc4fa3443fe8cfb2ff8e210deb1f6a0eea38

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ