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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2022-48901— btrfs: do not start relocation until in progress drops are done

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于如果在生产环境中同时运行快照删除和平衡操作,可能会导致在挂载时出现恢复中的重定位错误。

AI Predicted 5.5 Difficulty: Moderate EPSS 0.21% · P11

Possible ATT&CK Techniques 1 AI

T1499 · Endpoint Denial of Service

Affected Version Matrix 8

VendorProduct Version RangeStatus
Linux Linux 9d1a2a3ad59f7ae810bf04a5a05995bf2d79300c< 6599d5e8bd758d897fd2ef4dc388ae50278b1f7e affected
9d1a2a3ad59f7ae810bf04a5a05995bf2d79300c< 5e70bc827b563caf22e1203428cc3719643de5aa affected
9d1a2a3ad59f7ae810bf04a5a05995bf2d79300c< b4be6aefa73c9a6899ef3ba9c5faaa8a66e333ef affected
3.10 affected
< 3.10 unaffected
5.15.27≤ 5.15.* unaffected
5.16.13≤ 5.16.* unaffected
5.17≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2022-48901

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: do not start relocation until in progress drops are done
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: do not start relocation until in progress drops are done We hit a bug with a recovering relocation on mount for one of our file systems in production. I reproduced this locally by injecting errors into snapshot delete with balance running at the same time. This presented as an error while looking up an extent item WARNING: CPU: 5 PID: 1501 at fs/btrfs/extent-tree.c:866 lookup_inline_extent_backref+0x647/0x680 CPU: 5 PID: 1501 Comm: btrfs-balance Not tainted 5.16.0-rc8+ #8 RIP: 0010:lookup_inline_extent_backref+0x647/0x680 RSP: 0018:ffffae0a023ab960 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 000000000000000c RDI: 0000000000000000 RBP: ffff943fd2a39b60 R08: 0000000000000000 R09: 0000000000000001 R10: 0001434088152de0 R11: 0000000000000000 R12: 0000000001d05000 R13: ffff943fd2a39b60 R14: ffff943fdb96f2a0 R15: ffff9442fc923000 FS: 0000000000000000(0000) GS:ffff944e9eb40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1157b1fca8 CR3: 000000010f092000 CR4: 0000000000350ee0 Call Trace: <TASK> insert_inline_extent_backref+0x46/0xd0 __btrfs_inc_extent_ref.isra.0+0x5f/0x200 ? btrfs_merge_delayed_refs+0x164/0x190 __btrfs_run_delayed_refs+0x561/0xfa0 ? btrfs_search_slot+0x7b4/0xb30 ? btrfs_update_root+0x1a9/0x2c0 btrfs_run_delayed_refs+0x73/0x1f0 ? btrfs_update_root+0x1a9/0x2c0 btrfs_commit_transaction+0x50/0xa50 ? btrfs_update_reloc_root+0x122/0x220 prepare_to_merge+0x29f/0x320 relocate_block_group+0x2b8/0x550 btrfs_relocate_block_group+0x1a6/0x350 btrfs_relocate_chunk+0x27/0xe0 btrfs_balance+0x777/0xe60 balance_kthread+0x35/0x50 ? btrfs_balance+0xe60/0xe60 kthread+0x16b/0x190 ? set_kthread_struct+0x40/0x40 ret_from_fork+0x22/0x30 </TASK> Normally snapshot deletion and relocation are excluded from running at the same time by the fs_info->cleaner_mutex. However if we had a pending balance waiting to get the ->cleaner_mutex, and a snapshot deletion was running, and then the box crashed, we would come up in a state where we have a half deleted snapshot. Again, in the normal case the snapshot deletion needs to complete before relocation can start, but in this case relocation could very well start before the snapshot deletion completes, as we simply add the root to the dead roots list and wait for the next time the cleaner runs to clean up the snapshot. Fix this by setting a bit on the fs_info if we have any DEAD_ROOT's that had a pending drop_progress key. If they do then we know we were in the middle of the drop operation and set a flag on the fs_info. Then balance can wait until this flag is cleared to start up again. If there are DEAD_ROOT's that don't have a drop_progress set then we're safe to start balance right away as we'll be properly protected by the cleaner_mutex.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
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

Vendor Product Affected Versions CPE Subscribe
Linux Linux 9d1a2a3ad59f7ae810bf04a5a05995bf2d79300c ~ 6599d5e8bd758d897fd2ef4dc388ae50278b1f7e -
Linux Linux 3.10 -

II. Public POCs for CVE-2022-48901

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2022-48901

请登录查看更多情报信息。

Patches & Fixes for CVE-2022-48901 (1)

Other References for CVE-2022-48901 (2)

Same Patch Batch · Linux · 2024-08-22 · 42 CVEs total

CVE-2022-48941 8.8 HIGH ice: fix concurrent reset and removal of VFs
CVE-2022-48919 8.8 HIGH cifs: fix double free race when mount fails in cifs_get_root()
CVE-2022-48925 7.8 HIGH RDMA/cma: Do not change route.addr.src_addr outside state checks
CVE-2022-48923 7.8 HIGH btrfs: prevent copying too big compressed lzo segment
CVE-2022-48927 7.8 HIGH iio: adc: tsc2046: fix memory corruption by preventing array overflow
CVE-2022-48913 7.8 HIGH blktrace: fix use after free for struct blk_trace
CVE-2022-48912 7.8 HIGH netfilter: fix use-after-free in __nf_register_net_hook()
CVE-2022-48911 7.8 HIGH netfilter: nf_queue: fix possible use-after-free
CVE-2022-48932 7.8 HIGH net/mlx5: DR, Fix slab-out-of-bounds in mlx5_cmd_dr_create_fte
CVE-2022-48935 7.8 HIGH netfilter: nf_tables: unregister flowtable hooks on netns exit
CVE-2022-48940 7.8 HIGH bpf: Fix crash due to incorrect copy_map_value
CVE-2022-48943 7.1 HIGH KVM: x86/mmu: make apf token non-zero to fix bug
CVE-2022-48933 netfilter: nf_tables: fix memory leak during stateful obj update
CVE-2022-48934 nfp: flower: Fix a potential leak in nfp_tunnel_add_shared_mac()
CVE-2022-48937 io_uring: add a schedule point in io_add_buffers()
CVE-2022-48931 configfs: fix a race in configfs_{,un}register_subsystem()
CVE-2022-48930 RDMA/ib_srp: Fix a deadlock
CVE-2022-48929 bpf: Fix crash due to out of bounds access into reg2btf_ids.
CVE-2022-48928 iio: adc: men_z188_adc: Fix a resource leak in an error handling path
CVE-2022-48938 CDC-NCM: avoid overflow in sanity checking

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

IV. Related Vulnerabilities

V. Comments for CVE-2022-48901

No comments yet


Leave a comment