CVE-2026-139796

Not scored yetLast modified Nov 30, 2026

Description

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

ocfs2/heartbeat: serialize concurrent writes to a region's dev attribute

o2hb_region_dev_store() checks reg->hr_bdev_file to see if the region is already started, but nothing stops two writers from doing that at the same time. configfs only serializes writes through the same open file, so two processes that each open the dev attribute can both get past the check:

A: hr_bdev_file is NULL, opens file A, sets hr_bdev_file = A B: hr_bdev_file is NULL, opens file B, sets hr_bdev_file = B A: start fails, fput(hr_bdev_file) drops B, sets it to NULL B: start fails, fput(NULL)

Both calls also use the same hr_slots, hr_slot_data and hr_tmp_block, so the error paths can free the slot data twice.

syzbot hit the fput(NULL) with an unbound loop device, where every start fails with -EIO. With four threads doing the same thing on a KASAN kernel I get both crashes within a second:

BUG: KASAN: double-free in o2hb_unmap_slot_data+0x14d/0x2f0 BUG: kernel NULL pointer dereference, address: 0000000000000158

Add a mutex to the region and hold it in dev_store(), in the block_bytes, start_block and blocks stores, and in dev_show(), since they all look at hr_bdev_file. dev_store() cleans up with goto, so it takes the mutex in a small wrapper rather than with guard(). The mutex is dropped while dev_store() waits for the heartbeat to become steady, which takes seconds, so a read of dev doesn't stall behind a start. hr_bdev_file is already set at that point, so other writers still get -EINVAL, and the cleanup after the wait retakes the mutex.

With the patch the same test ran for 10 minutes with lockdep on and nothing was reported. So did a second one, with a working loop device, that interrupts starts during the wait while other threads read and write the attributes.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

VendorProductVersions
LinuxLinux>= a7f6a5fb4bde142b622706e2006ba33f793e13ed, < f46a0fa16ba2d27f8ef4af817006803b86fc948d; >= a7f6a5fb4bde142b622706e2006ba33f793e13ed, < 9b153aeca9b4cdc0d220db0871ea2f6d3b82ea81; >= a7f6a5fb4bde142b622706e2006ba33f793e13ed, < 7e21341daa3f032901a026adfb5195c6e93d6db3; >= a7f6a5fb4bde142b622706e2006ba33f793e13ed, < 6479a6201fab97c5a4414f68d8a60deba747101f; >= a7f6a5fb4bde142b622706e2006ba33f793e13ed, < 34d005f236ec2fe6e3aea80c7070f28261b63fd3; >= a7f6a5fb4bde142b622706e2006ba33f793e13ed, < 2f90a8c3433854ab065d82326aa6e186a70b5b0d; >= a7f6a5fb4bde142b622706e2006ba33f793e13ed, < 0edd3a7cd5185cbb616316731c3c5dd0e0442b4e; >= a7f6a5fb4bde142b622706e2006ba33f793e13ed, < 0a8f258c0f012314c36b9e4818cdc0178c68f891
LinuxLinux2.6.16

References

Timeline

Published
Nov 30, 2026
Last modified
Nov 30, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-139797In the Linux kernel, the following vulnerability has been resolved: ocfs2/cluster: hold a reference on the heartbeat thread Since commit 6CVE-2026-139798In the Linux kernel, the following vulnerability has been resolved: mm: do not unintentionally overwrite atomic VMA flags Patch series "mmCVE-2026-1397997.0In the Linux kernel, the following vulnerability has been resolved: mm/shmem: hold off eviction in shmem_writeout() Once shmem_writeout() CVE-2026-13984.3The Change WP URL plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 1.0. This is due toCVE-2026-139804.3Inappropriate implementation in Chrome for iOS in Google Chrome on iOS prior to 150.0.7871.47 allowed a remote attacker to perform UI spoofiCVE-2026-139800In the Linux kernel, the following vulnerability has been resolved: 9p/xen: drain response work after unbinding IRQ commit ea4f1009408e ("CVE-2026-1398017.3In the Linux kernel, the following vulnerability has been resolved: KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM CVE-2026-139802In the Linux kernel, the following vulnerability has been resolved: HID: roccat: savu: reject short special reports The raw event callbackCVE-2026-139803In the Linux kernel, the following vulnerability has been resolved: HID: roccat: ryos: reject short special reports The raw event callbackCVE-2026-139804In the Linux kernel, the following vulnerability has been resolved: HID: roccat: pyra: reject short button reports The raw event callback CVE-2026-139805In the Linux kernel, the following vulnerability has been resolved: HID: roccat: konepure: reject short button reports The raw event callbCVE-2026-139806In the Linux kernel, the following vulnerability has been resolved: HID: roccat: koneplus: reject short button reports The raw event callb
CVE-2026-139796: Unscored | Vulnix