CVE-2021-47493

ocfs2: fix race between searching chunks and release journal_head from buffer_head

MEDIUM
4.7
CVSS Score
Published: May 22, 2024 at 08:19 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.7
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix race between searching chunks and release journal_head from buffer_head Encountered a race between ocfs2_test_bg_bit_allocatable() and jbd2_journal_put_journal_head() resulting in the below vmcore. PID: 106879 TASK: ffff880244ba9c00 CPU: 2 COMMAND: "loop3" Call trace: panic oops_end no_context __bad_area_nosemaphore bad_area_nosemaphore __do_page_fault do_page_fault page_fault [exception RIP: ocfs2_block_group_find_clear_bits+316] ocfs2_block_group_find_clear_bits [ocfs2] ocfs2_cluster_group_search [ocfs2] ocfs2_search_chain [ocfs2] ocfs2_claim_suballoc_bits [ocfs2] __ocfs2_claim_clusters [ocfs2] ocfs2_claim_clusters [ocfs2] ocfs2_local_alloc_slide_window [ocfs2] ocfs2_reserve_local_alloc_bits [ocfs2] ocfs2_reserve_clusters_with_limit [ocfs2] ocfs2_reserve_clusters [ocfs2] ocfs2_lock_refcount_allocators [ocfs2] ocfs2_make_clusters_writable [ocfs2] ocfs2_replace_cow [ocfs2] ocfs2_refcount_cow [ocfs2] ocfs2_file_write_iter [ocfs2] lo_rw_aio loop_queue_work kthread_worker_fn kthread ret_from_fork When ocfs2_test_bg_bit_allocatable() called bh2jh(bg_bh), the bg_bh->b_private NULL as jbd2_journal_put_journal_head() raced and released the jounal head from the buffer head. Needed to take bit lock for the bit 'BH_JournalHead' to fix this race.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 5.10.772.6.16 ≤ v < 5.10.772.6.16 ≤ v < 5.14.162.6.16 ≤ v < 5.155.11 ≤ v < 5.14.165.15 rc15.15 rc25.15 rc35.15 rc45.15 rc55.15 rc65.15 rc7ccd979bdbce9fba8412beb3f1de68a9d0171b12c
Vendor states this is fixed in 2e382600e8856ea654677b5134ee66e03ea72bc2 (fixed)
Vendor states this is fixed in 5043fbd294f5909a080ade0f04b70a4da9e122b7 (fixed)
Vendor states this is fixed in 6f1b228529ae49b0f85ab89bcdb6c365df401558 (fixed)
Vendor states this is fixed in 2.6.16 (unaffected)
Vendor states this is fixed in 5.10.77 (unaffected)
Vendor states this is fixed in 5.14.16 (unaffected)
Vendor states this is fixed in 5.15 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2e382600e8856ea654677b5134ee66e03ea72bc2
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5043fbd294f5909a080ade0f04b70a4da9e122b7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6f1b228529ae49b0f85ab89bcdb6c365df401558

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
HIGH
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-362

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card