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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2023-53247— btrfs: set_page_extent_mapped after read_folio in btrfs_cont_expand

EPSS 0.01% · P0
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2023-53247

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: set_page_extent_mapped after read_folio in btrfs_cont_expand
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: set_page_extent_mapped after read_folio in btrfs_cont_expand While trying to get the subpage blocksize tests running, I hit the following panic on generic/476 assertion failed: PagePrivate(page) && page->private, in fs/btrfs/subpage.c:229 kernel BUG at fs/btrfs/subpage.c:229! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP CPU: 1 PID: 1453 Comm: fsstress Not tainted 6.4.0-rc7+ #12 Hardware name: QEMU KVM Virtual Machine, BIOS edk2-20230301gitf80f052277c8-26.fc38 03/01/2023 pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : btrfs_subpage_assert+0xbc/0xf0 lr : btrfs_subpage_assert+0xbc/0xf0 Call trace: btrfs_subpage_assert+0xbc/0xf0 btrfs_subpage_clear_checked+0x38/0xc0 btrfs_page_clear_checked+0x48/0x98 btrfs_truncate_block+0x5d0/0x6a8 btrfs_cont_expand+0x5c/0x528 btrfs_write_check.isra.0+0xf8/0x150 btrfs_buffered_write+0xb4/0x760 btrfs_do_write_iter+0x2f8/0x4b0 btrfs_file_write_iter+0x1c/0x30 do_iter_readv_writev+0xc8/0x158 do_iter_write+0x9c/0x210 vfs_iter_write+0x24/0x40 iter_file_splice_write+0x224/0x390 direct_splice_actor+0x38/0x68 splice_direct_to_actor+0x12c/0x260 do_splice_direct+0x90/0xe8 generic_copy_file_range+0x50/0x90 vfs_copy_file_range+0x29c/0x470 __arm64_sys_copy_file_range+0xcc/0x498 invoke_syscall.constprop.0+0x80/0xd8 do_el0_svc+0x6c/0x168 el0_svc+0x50/0x1b0 el0t_64_sync_handler+0x114/0x120 el0t_64_sync+0x194/0x198 This happens because during btrfs_cont_expand we'll get a page, set it as mapped, and if it's not Uptodate we'll read it. However between the read and re-locking the page we could have called release_folio() on the page, but left the page in the file mapping. release_folio() can clear the page private, and thus further down we blow up when we go to modify the subpage bits. Fix this by putting the set_page_extent_mapped() after the read. This is safe because read_folio() will call set_page_extent_mapped() before it does the read, and then if we clear page private but leave it on the mapping we're completely safe re-setting set_page_extent_mapped(). With this patch I can now run generic/476 without panicing.
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存在安全漏洞,该漏洞源于btrfs_cont_expand函数中未正确设置页面扩展映射,可能导致断言失败和系统崩溃。
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 32443de3382be98c0a8b8f6f50d23da2e10c4117 ~ 0a5e0bc8e8618e32a6ca64450867628eb0a627bf -
LinuxLinux 5.12 -

II. Public POCs for CVE-2023-53247

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2023-53247

登录查看更多情报信息。

Same Patch Batch · Linux · 2025-09-15 · 210 CVEs total

CVE-2022-50292drm/msm/dp: fix bridge lifetime
CVE-2023-53231erofs: Fix detection of atomic context
CVE-2023-53232mt76: mt7921: fix kernel panic by accessing unallocated eeprom.data
CVE-2023-53233net/smc: fix deadlock triggered by cancel_delayed_work_syn()
CVE-2023-53234watchdog: Fix kmemleak in watchdog_cdev_register
CVE-2023-53235drm/tests: helpers: Avoid a driver uaf
CVE-2023-53236iommufd: Do not corrupt the pfn list when doing batch carry
CVE-2023-53237drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v11_0_hw_fini
CVE-2023-53238phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
CVE-2023-53239drm/msm/mdp5: Add check for kzalloc
CVE-2023-53240xsk: check IFF_UP earlier in Tx path
CVE-2023-53241nfsd: call op_release, even when op_func returns an error
CVE-2023-53242thermal/drivers/hisi: Drop second sensor hi3660
CVE-2022-50291kcm: annotate data-races around kcm->rx_psock
CVE-2022-50302lockd: set other missing fields when unlocking files
CVE-2022-50299md: Replace snprintf with scnprintf
CVE-2022-50300btrfs: fix extent map use-after-free when handling missing device in read_one_chunk
CVE-2022-50301iommu/omap: Fix buffer overflow in debugfs
CVE-2022-50298slimbus: qcom-ngd: cleanup in probe error path
CVE-2022-50303drm/amdkfd: Fix double release compute pasid

Showing top 20 of 210 CVEs. View all on vendor page → →

IV. Related Vulnerabilities

V. Comments for CVE-2023-53247

No comments yet


Leave a comment