Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-47189— btrfs: fix memory ordering between normal and ordered work functions

EPSS 0.22% · P45
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2021-47189

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
btrfs: fix memory ordering between normal and ordered work functions
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix memory ordering between normal and ordered work functions Ordered work functions aren't guaranteed to be handled by the same thread which executed the normal work functions. The only way execution between normal/ordered functions is synchronized is via the WORK_DONE_BIT, unfortunately the used bitops don't guarantee any ordering whatsoever. This manifested as seemingly inexplicable crashes on ARM64, where async_chunk::inode is seen as non-null in async_cow_submit which causes submit_compressed_extents to be called and crash occurs because async_chunk::inode suddenly became NULL. The call trace was similar to: pc : submit_compressed_extents+0x38/0x3d0 lr : async_cow_submit+0x50/0xd0 sp : ffff800015d4bc20 <registers omitted for brevity> Call trace: submit_compressed_extents+0x38/0x3d0 async_cow_submit+0x50/0xd0 run_ordered_work+0xc8/0x280 btrfs_work_helper+0x98/0x250 process_one_work+0x1f0/0x4ac worker_thread+0x188/0x504 kthread+0x110/0x114 ret_from_fork+0x10/0x18 Fix this by adding respective barrier calls which ensure that all accesses preceding setting of WORK_DONE_BIT are strictly ordered before setting the flag. At the same time add a read barrier after reading of WORK_DONE_BIT in run_ordered_work which ensures all subsequent loads would be strictly ordered after reading the bit. This in turn ensures are all accesses before WORK_DONE_BIT are going to be strictly ordered before any access that can occur in ordered_func.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于正常工作函数和有序工作函数之间的内存排序存在安全漏洞。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux 08a9ff3264181986d1d692a4e6fce3669700c9f8 ~ bd660a20fea3ec60a49709ef5360f145ec0fe779 -
LinuxLinux 3.15 -

II. Public POCs for CVE-2021-47189

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2021-47189

登录查看更多情报信息。

Same Patch Batch · Linux · 2024-04-10 · 39 CVEs total

CVE-2021-47210usb: typec: tipd: Remove WARN_ON in tps6598x_block_read
CVE-2021-47200drm/prime: Fix use after free in mmap with drm_gem_ttm_mmap
CVE-2021-47201iavf: free q_vectors before queues in iavf_disable_vf
CVE-2021-47202thermal: Fix NULL pointer dereferences in of_thermal_ functions
CVE-2021-47203scsi: lpfc: Fix list_add() corruption in lpfc_drain_txq()
CVE-2021-47204net: dpaa2-eth: fix use-after-free in dpaa2_eth_remove
CVE-2021-47205clk: sunxi-ng: Unregister clocks/resets when unbinding
CVE-2021-47206usb: host: ohci-tmio: check return value after calling platform_get_resource()
CVE-2021-47207ALSA: gus: fix null pointer dereference on pointer block
CVE-2021-47209sched/fair: Prevent dead task groups from regaining cfs_rq's
CVE-2021-47199net/mlx5e: CT, Fix multiple allocations and memleak of mod acts
CVE-2021-47211ALSA: usb-audio: fix null pointer dereference on pointer cs_desc
CVE-2021-47212net/mlx5: Update error handler for UCTX and UMEM
CVE-2021-47214hugetlb, userfaultfd: fix reservation restore on userfaultfd error
CVE-2021-47215net/mlx5e: kTLS, Fix crash in RX resync flow
CVE-2021-47216scsi: advansys: Fix kernel pointer leak
CVE-2021-47217x86/hyperv: Fix NULL deref in set_hv_tscchange_cb() if Hyper-V setup fails
CVE-2021-47218selinux: fix NULL-pointer dereference when hashtab allocation fails
CVE-2021-47219scsi: scsi_debug: Fix out-of-bound read in resp_report_tgtpgs()
CVE-2021-47190perf bpf: Avoid memory leak from perf_env__insert_btf()

Showing top 20 of 39 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2021-47189

No comments yet


Leave a comment