UBUNTU-CVE-2025-68358: Medium severity ubuntu/linux-azure vulnerability

Published Dec 24, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix racy bitfield write in btrfsclearspaceinfofull() From the memory-barriers.txt document regarding memory barrier ordering guarantees: () These guarantees do not apply to bitfields, because compilers often generate code to modify these using non-atomic read-modify-write sequences. Do not attempt to use bitfields to synchronize parallel algorithms. () Even in cases where bitfields are protected by locks, all fields in a given bitfield must be protected by one lock. If two fields in a given bitfield are protected by different locks, the compiler's non-atomic read-modify-write sequences can cause an update to one field to corrupt the value of an adjacent field. btrfsspaceinfo has a bitfield sharing an underlying word consisting of the fields full, chunkalloc, and flush: struct btrfsspaceinfo { struct btrfsfsinfo fsinfo; / 0 8 / struct btrfsspaceinfo parent; / 8 8 / ... int clamp; / 172 4 / unsigned int full:1; / 176: 0 4 / unsigned int chunkalloc:1; / 176: 1 4 / unsigned int flush:1; / 176: 2 4 / ... Therefore, to be safe from parallel read-modify-writes losing a write to one of the bitfield members protected by a lock, all writes to all the bitfields must use the lock. They almost universally do, except for btrfsclearspaceinfofull() which iterates over the spaceinfos and writes out found->full = 0 without a lock. Imagine that we have one thread completing a transaction in which we finished deleting a blockgroup and are thus calling btrfsclearspaceinfofull() while simultaneously the data reclaim ticket infrastructure is running doasyncreclaimdataspace(): T1 T2 btrfscommittransaction btrfsclearspaceinfofull datasinfo->full = 0 READ: full:0, chunkalloc:0, flush:1 doasyncreclaimdataspace(datasinfo) spinlock(&spaceinfo->lock); if(listempty(tickets)) spaceinfo->flush = 0; READ: full: 0, chunkalloc:0, flush:1 MOD/WRITE: full: 0, chunkalloc:0, flush:0 spinunlock(&spaceinfo->lock); return; MOD/WRITE: full:0, chunkalloc:0, flush:1 and now datasinfo->flush is 1 but the reclaim worker has exited. This breaks the invariant that flush is 0 iff there is no work queued or running. Once this invariant is violated, future allocations that go into reservebytes() will add tickets to spaceinfo->tickets but will see spaceinfo->flush is set to 1 and not queue the work. After this, they will block forever on the resulting ticket, as it is now impossible to kick the worker again. I also confirmed by looking at the assembly of the affected kernel that it is doing RMW operations. For example, to set the flush (3rd) bit to 0, the assembly is: andb $0xfb,0x60(%rbx) and similarly for setting the full (1st) bit to 0: andb $0xfe,-0x20(%rax) So I think this is really a bug on practical systems. I have observed a number of systems in this exact state, but am currently unable to reproduce it. Rather than leaving this footgun lying around for the future, take advantage of the fact that there is room in the struct anyway, and that it is already quite large and simply change the three bitfield members to bools. This avoids writes to spaceinfo->full having any effect on ---truncated---

Affected Software

234 affected componentsFixes available
ubuntu/linux-azure*
ubuntu/linux-aws-hwe*
ubuntu/linux-azure*
ubuntu/linux-gcp*
ubuntu/linux-hwe*
ubuntu/linux-hwe-edge*
ubuntu/linux-oracle*
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-aws-5.4*
ubuntu/linux-azure*
ubuntu/linux-azure-4.15*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-5.4*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-4.15*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gcp-5.4*
ubuntu/linux-gke-4.15*
ubuntu/linux-gke-5.4*
ubuntu/linux-gkeop-5.4*
ubuntu/linux-hwe*
ubuntu/linux-hwe-5.4*
ubuntu/linux-hwe-edge*
ubuntu/linux-ibm-5.4*
ubuntu/linux-kvm*
ubuntu/linux-oem*
ubuntu/linux-oracle*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-oracle-5.4*
ubuntu/linux-raspi-5.4*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-aws-5.11*
ubuntu/linux-aws-5.13*
ubuntu/linux-aws-5.15<5.15.0-1112.119~20.04.1
5.15.0-1112.119~20.04.1
ubuntu/linux-aws-5.8*
ubuntu/linux-azure*
ubuntu/linux-azure-5.11*
ubuntu/linux-azure-5.13*
ubuntu/linux-azure-5.15<5.15.0-1117.126~20.04.1
5.15.0-1117.126~20.04.1
ubuntu/linux-azure-5.8*
ubuntu/linux-azure-fde*
ubuntu/linux-azure-fde-5.15<5.15.0-1117.126~20.04.2
5.15.0-1117.126~20.04.2
ubuntu/linux-bluefield*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.11*
ubuntu/linux-gcp-5.13*
ubuntu/linux-gcp-5.15<5.15.0-1112.122~20.04.1
5.15.0-1112.122~20.04.1
ubuntu/linux-gcp-5.8*
ubuntu/linux-gke*
ubuntu/linux-gke-5.15*
ubuntu/linux-gkeop*
ubuntu/linux-gkeop-5.15*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.13*
ubuntu/linux-hwe-5.15<5.15.0-186.196~20.04.1
5.15.0-186.196~20.04.1
ubuntu/linux-hwe-5.8*
ubuntu/linux-ibm*
ubuntu/linux-ibm-5.15<5.15.0-1106.110~20.04.1
5.15.0-1106.110~20.04.1
ubuntu/linux-intel-5.13*
ubuntu/linux-intel-iotg-5.15<5.15.0-1107.113~20.04.1
5.15.0-1107.113~20.04.1
ubuntu/linux-iot*
ubuntu/linux-kvm*
ubuntu/linux-lowlatency-hwe-5.15<5.15.0-184.194~20.04.1
5.15.0-184.194~20.04.1
ubuntu/linux-nvidia-tegra-5.15<5.15.0-1064.66~20.04.1
5.15.0-1064.66~20.04.1
ubuntu/linux-oem-5.10*
ubuntu/linux-oem-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle*
ubuntu/linux-oracle-5.11*
ubuntu/linux-oracle-5.13*
ubuntu/linux-oracle-5.15<5.15.0-1109.115~20.04.1
5.15.0-1109.115~20.04.1
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.11*
ubuntu/linux-riscv-5.15<5.15.0-1106.110~20.04.1
5.15.0-1106.110~20.04.1
ubuntu/linux-riscv-5.8*
ubuntu/linux-xilinx-zynqmp*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.15.0-186.196
5.15.0-186.196
ubuntu/linux-allwinner-5.19*
ubuntu/linux-aws<5.15.0-1112.119
5.15.0-1112.119
ubuntu/linux-aws-5.19*
ubuntu/linux-aws-6.2*
ubuntu/linux-aws-6.5*
ubuntu/linux-aws-6.8<6.8.0-1057.60~22.04.1
6.8.0-1057.60~22.04.1
ubuntu/linux-azure<5.15.0-1117.126
5.15.0-1117.126
ubuntu/linux-azure-5.19*
ubuntu/linux-azure-6.2*
ubuntu/linux-azure-6.5*
ubuntu/linux-azure-6.8<6.8.0-1059.65~22.04.1
6.8.0-1059.65~22.04.1
ubuntu/linux-azure-fde<5.15.0-1117.126
5.15.0-1117.126
ubuntu/linux-azure-fde-5.19*
ubuntu/linux-azure-fde-6.2*
ubuntu/linux-azure-fde-6.8<6.8.0-1058.65~22.04.1
6.8.0-1058.65~22.04.1
ubuntu/linux-gcp<5.15.0-1112.122
5.15.0-1112.122
ubuntu/linux-gcp-5.19*
ubuntu/linux-gcp-6.2*
ubuntu/linux-gcp-6.5*
ubuntu/linux-gcp-6.8<6.8.0-1060.63~22.04.1
6.8.0-1060.63~22.04.1
ubuntu/linux-gke<5.15.0-1108.114
5.15.0-1108.114
ubuntu/linux-gkeop<5.15.0-1095.103
5.15.0-1095.103
ubuntu/linux-hwe-5.19*
ubuntu/linux-hwe-6.2*
ubuntu/linux-hwe-6.5*
ubuntu/linux-hwe-6.8<6.8.0-124.124~22.04.1
6.8.0-124.124~22.04.1
ubuntu/linux-ibm<5.15.0-1106.110
5.15.0-1106.110
ubuntu/linux-ibm-6.8<6.8.0-1055.56~22.04.1
6.8.0-1055.56~22.04.1
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-intel-iotg<5.15.0-1107.113
5.15.0-1107.113
ubuntu/linux-kvm<5.15.0-1104.109
5.15.0-1104.109
ubuntu/linux-lowlatency<5.15.0-184.194
5.15.0-184.194
ubuntu/linux-lowlatency-hwe-5.19*
ubuntu/linux-lowlatency-hwe-6.2*
ubuntu/linux-lowlatency-hwe-6.5*
ubuntu/linux-lowlatency-hwe-6.8<6.8.0-117.117.1~22.04.1
6.8.0-117.117.1~22.04.1
ubuntu/linux-nvidia<5.15.0-1107.108
5.15.0-1107.108
ubuntu/linux-nvidia-6.2*
ubuntu/linux-nvidia-6.5*
ubuntu/linux-nvidia-6.8<6.8.0-1054.57~22.04.1
6.8.0-1054.57~22.04.1
ubuntu/linux-nvidia-tegra<5.15.0-1064.66
5.15.0-1064.66
ubuntu/linux-nvidia-tegra-igx<5.15.0-1053.53
5.15.0-1053.53
ubuntu/linux-oem-5.17*
ubuntu/linux-oem-6.0*
ubuntu/linux-oem-6.1*
ubuntu/linux-oem-6.5*
ubuntu/linux-oracle<5.15.0-1109.115
5.15.0-1109.115
ubuntu/linux-oracle-6.5*
ubuntu/linux-oracle-6.8<6.8.0-1054.55~22.04.1
6.8.0-1054.55~22.04.1
ubuntu/linux-raspi<5.15.0-1106.109
5.15.0-1106.109
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.19*
ubuntu/linux-riscv-6.5*
ubuntu/linux-riscv-6.8<6.8.0-117.117~22.04.1
6.8.0-117.117~22.04.1
ubuntu/linux-starfive-5.19*
ubuntu/linux-starfive-6.2*
ubuntu/linux-starfive-6.5*
ubuntu/linux-xilinx-zynqmp<5.15.0-1075.79
5.15.0-1075.79
ubuntu/linux-bluefield<5.15.0-1096.98
5.15.0-1096.98
ubuntu/linux-intel-iot-realtime<5.15.0-1104.106
5.15.0-1104.106
ubuntu/linux-realtime<5.15.0-1111.120
5.15.0-1111.120
ubuntu/linux-realtime-6.8<6.8.1-1051.52~22.04.1
6.8.1-1051.52~22.04.1
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips<5.15.0-1112.119+fips1
5.15.0-1112.119+fips1
ubuntu/linux-azure-fips<5.15.0-1117.126+fips1
5.15.0-1117.126+fips1
ubuntu/linux-fips<5.15.0-186.196+fips1
5.15.0-186.196+fips1
ubuntu/linux-gcp-fips<5.15.0-1112.122+fips1
5.15.0-1112.122+fips1
ubuntu/linux<6.8.0-117.117
6.8.0-117.117
ubuntu/linux-aws<6.8.0-1055.58
6.8.0-1055.58
ubuntu/linux-aws-6.14*
ubuntu/linux-aws-6.17<6.17.0-1009.9~24.04.2
6.17.0-1009.9~24.04.2
ubuntu/linux-azure<6.8.0-1056.62
6.8.0-1056.62
ubuntu/linux-azure-6.11*
ubuntu/linux-azure-6.14*
ubuntu/linux-azure-6.17<6.17.0-1010.10~24.04.1
6.17.0-1010.10~24.04.1
ubuntu/linux-azure-fde<6.8.0-1058.65
6.8.0-1058.65
ubuntu/linux-azure-fde-6.14*
ubuntu/linux-azure-nvidia*
ubuntu/linux-azure-nvidia-6.14*
ubuntu/linux-gcp<6.8.0-1058.61
6.8.0-1058.61
ubuntu/linux-gcp-6.11*
ubuntu/linux-gcp-6.14*
ubuntu/linux-gcp-6.17<6.17.0-1009.9~24.04.3
6.17.0-1009.9~24.04.3
ubuntu/linux-gke<6.8.0-1054.60
6.8.0-1054.60
ubuntu/linux-gkeop<6.8.0-1041.44
6.8.0-1041.44
ubuntu/linux-hwe-6.11*
ubuntu/linux-hwe-6.14*
ubuntu/linux-hwe-6.17<6.17.0-19.19~24.04.2
6.17.0-19.19~24.04.2
ubuntu/linux-ibm<6.8.0-1055.56
6.8.0-1055.56
ubuntu/linux-lowlatency<6.8.0-117.117.1
6.8.0-117.117.1
ubuntu/linux-lowlatency-hwe-6.11*
ubuntu/linux-nvidia<6.8.0-1054.57
6.8.0-1054.57
ubuntu/linux-nvidia-6.11*
ubuntu/linux-nvidia-6.17<6.17.0-1018.18
6.17.0-1018.18
ubuntu/linux-nvidia-lowlatency<6.8.0-1054.57.1
6.8.0-1054.57.1
ubuntu/linux-nvidia-tegra<6.8.0-1024.24
6.8.0-1024.24
ubuntu/linux-oem-6.11*
ubuntu/linux-oem-6.14*
ubuntu/linux-oem-6.17<6.17.0-1017.17
6.17.0-1017.17
ubuntu/linux-oem-6.8*
ubuntu/linux-oracle<6.8.0-1054.55
6.8.0-1054.55
ubuntu/linux-oracle-6.14*
ubuntu/linux-oracle-6.17<6.17.0-1009.9~24.04.1
6.17.0-1009.9~24.04.1
ubuntu/linux-raspi<6.8.0-1056.60
6.8.0-1056.60
ubuntu/linux-raspi-realtime*
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-riscv-6.14*
ubuntu/linux-riscv-6.17<6.17.0-19.19.1~24.04.1
6.17.0-19.19.1~24.04.1
ubuntu/linux-xilinx<6.8.0-1032.33
6.8.0-1032.33
ubuntu/linux-bluefield<6.8.0-1022.26
6.8.0-1022.26
ubuntu/linux-raspi-realtime<6.8.0-2045.46
6.8.0-2045.46
ubuntu/linux-realtime<6.8.1-1051.52
6.8.1-1051.52
ubuntu/linux-realtime-6.14*
ubuntu/linux-realtime-6.17<6.17.0-1008.9~24.04.1
6.17.0-1008.9~24.04.1
ubuntu/linux-aws-fips<6.8.0-1055.58+fips1
6.8.0-1055.58+fips1
ubuntu/linux-azure-fips<6.8.0-1059.65+fips1
6.8.0-1059.65+fips1
ubuntu/linux-fips<6.8.0-116.116+fips1
6.8.0-116.116+fips1
ubuntu/linux-gcp-fips<6.8.0-1058.61+fips1
6.8.0-1058.61+fips1
ubuntu/linux<6.17.0-19.19
6.17.0-19.19
ubuntu/linux-aws<6.17.0-1009.9
6.17.0-1009.9
ubuntu/linux-azure<6.17.0-1010.10
6.17.0-1010.10
ubuntu/linux-azure-fde*
ubuntu/linux-gcp<6.17.0-1009.9
6.17.0-1009.9
ubuntu/linux-oracle<6.17.0-1009.9
6.17.0-1009.9
ubuntu/linux-raspi<6.17.0-1010.10
6.17.0-1010.10
ubuntu/linux-realtime<6.17.0-1008.9
6.17.0-1008.9
ubuntu/linux-riscv<6.17.0-19.19.1
6.17.0-19.19.1

Event History

Dec 24, 2025
CVE Published
via OSV·11:15 AM
Data Sourced
via OSV·11:15 AM
DescriptionSeverityAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203