CVE-2022-50766
btrfs: set generation before calling btrfs_clean_tree_block in btrfs_init_new_buffer
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= bc877d285ca3dba24c52406946a4a69847cc7422, < 0a408c6212c16b9a2a1141d3c531247582ef8101; >= bc877d285ca3dba24c52406946a4a69847cc7422, < a687c2890fe4a2acaac6941fa4097a1264d8f3eb; >= bc877d285ca3dba24c52406946a4a69847cc7422, < 89bc41c92d10b905c60f6ec13c9ef664a3555c54; >= bc877d285ca3dba24c52406946a4a69847cc7422, < cbddcc4fa3443fe8cfb2ff8e210deb1f6a0eea38
- Anyone running Linux 4.19
Vulnerability facts
- Affected
- Linux >= bc877d285ca3dba24c52406946a4a69847cc7422, < 0a408c6212c16b9a2a1141d3c531247582ef8101; >= bc877d285ca3dba24c52406946a4a69847cc7422, < a687c2890fe4a2acaac6941fa4097a1264d8f3eb; >= bc877d285ca3dba24c52406946a4a69847cc7422, < 89bc41c92d10b905c60f6ec13c9ef664a3555c54; >= bc877d285ca3dba24c52406946a4a69847cc7422, < cbddcc4fa3443fe8cfb2ff8e210deb1f6a0eea38; Linux 4.19
- Fixed in
- Linux 0a408c6212c16b9a2a1141d3c531247582ef8101, Linux 89bc41c92d10b905c60f6ec13c9ef664a3555c54
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- EPSS
- 0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
- Modified
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().
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= bc877d285ca3dba24c52406946a4a69847cc7422, < 0a408c6212c16b9a2a1141d3c531247582ef8101; >= bc877d285ca3dba24c52406946a4a69847cc7422, < a687c2890fe4a2acaac6941fa4097a1264d8f3eb; >= bc877d285ca3dba24c52406946a4a69847cc7422, < 89bc41c92d10b905c60f6ec13c9ef664a3555c54; >= bc877d285ca3dba24c52406946a4a69847cc7422, < cbddcc4fa3443fe8cfb2ff8e210deb1f6a0eea38 | — | cvelist |
| Linux | 4.19 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-50766. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-50766.md Affected: Linux >= bc877d285ca3dba24c52406946a4a69847cc7422, < 0a408c6212c16b9a2a1141d3c531247582ef8101; >= bc877d285ca3dba24c52406946a4a69847cc7422, < a687c2890fe4a2acaac6941fa4097a1264d8f3eb; >= bc877d285ca3dba24c52406946a4a69847cc7422, < 89bc41c92d10b905c60f6ec13c9ef664a3555c54; >= bc877d285ca3dba24c52406… Fixed in: Linux 0a408c6212c16b9a2a1141d3c531247582ef8101, Linux 89bc41c92d10b905c60f6ec13c9ef664a3555c54 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2022-50766 being exploited?
There is no confirmed exploitation: CVE-2022-50766 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-50766?
It has no CVSS score yet. Unknown.
Which versions are affected by CVE-2022-50766?
Linux >= bc877d285ca3dba24c52406946a4a69847cc7422, < 0a408c6212c16b9a2a1141d3c531247582ef8101; >= bc877d285ca3dba24c52406946a4a69847cc7422, < a687c2890fe4a2acaac6941fa4097a1264d8f3eb; >= bc877d285ca3dba24c52406946a4a69847cc7422, < 89bc41c92d10b905c60f6ec13c9ef664a3555c54; >= bc877d285ca3dba24c52406946a4a69847cc7422, < cbddcc4fa3443fe8cfb2ff8e210deb1f6a0eea38; Linux 4.19.
Is there a fix for CVE-2022-50766?
Yes. Fixed in Linux 0a408c6212c16b9a2a1141d3c531247582ef8101, Linux 89bc41c92d10b905c60f6ec13c9ef664a3555c54. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2022-50766?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.