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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2022-50432— kernfs: fix use-after-free in __kernfs_remove

CVSS 7.8 · High EPSS 0.15% · P5

Possible ATT&CK Techniques 1AI

T1496 · Resource Hijacking

Affected Version Matrix 18

VendorProductVersion RangeStatus
LinuxLinux45a140e587f3d32d8d424ed940dffb61e1739047< 4dfd6a477a1525773469feaf3c514b2c0fef76b5affected
45a140e587f3d32d8d424ed940dffb61e1739047< 02eb35131050735332658029082f61515b7dfe38affected
45a140e587f3d32d8d424ed940dffb61e1739047< 028cf780743eea79abffa7206b9dcfc080ad3546affected
45a140e587f3d32d8d424ed940dffb61e1739047< c78b0dc6fb7fb389d674e491fd376388cdfb1d53affected
45a140e587f3d32d8d424ed940dffb61e1739047< 6f72a3977ba9d0e5491a5c01315204272e7f9c44affected
45a140e587f3d32d8d424ed940dffb61e1739047< 94d2643df1e70a4c310ebb5e2c493eec33df1a06affected
45a140e587f3d32d8d424ed940dffb61e1739047< af1b57cc39beca203559576b3046094fc9e5eb32affected
45a140e587f3d32d8d424ed940dffb61e1739047< 4abc99652812a2ddf932f137515d5c5a04723538affected
… +10 more rows
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2022-50432

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
kernfs: fix use-after-free in __kernfs_remove
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: kernfs: fix use-after-free in __kernfs_remove Syzkaller managed to trigger concurrent calls to kernfs_remove_by_name_ns() for the same file resulting in a KASAN detected use-after-free. The race occurs when the root node is freed during kernfs_drain(). To prevent this acquire an additional reference for the root of the tree that is removed before calling __kernfs_remove(). Found by syzkaller with the following reproducer (slab_nomerge is required): syz_mount_image$ext4(0x0, &(0x7f0000000100)='./file0\x00', 0x100000, 0x0, 0x0, 0x0, 0x0) r0 = openat(0xffffffffffffff9c, &(0x7f0000000080)='/proc/self/exe\x00', 0x0, 0x0) close(r0) pipe2(&(0x7f0000000140)={0xffffffffffffffff, <r1=>0xffffffffffffffff}, 0x800) mount$9p_fd(0x0, &(0x7f0000000040)='./file0\x00', &(0x7f00000000c0), 0x408, &(0x7f0000000280)={'trans=fd,', {'rfdno', 0x3d, r0}, 0x2c, {'wfdno', 0x3d, r1}, 0x2c, {[{@cache_loose}, {@mmap}, {@loose}, {@loose}, {@mmap}], [{@mask={'mask', 0x3d, '^MAY_EXEC'}}, {@fsmagic={'fsmagic', 0x3d, 0x10001}}, {@dont_hash}]}}) Sample report: ================================================================== BUG: KASAN: use-after-free in kernfs_type include/linux/kernfs.h:335 [inline] BUG: KASAN: use-after-free in kernfs_leftmost_descendant fs/kernfs/dir.c:1261 [inline] BUG: KASAN: use-after-free in __kernfs_remove.part.0+0x843/0x960 fs/kernfs/dir.c:1369 Read of size 2 at addr ffff8880088807f0 by task syz-executor.2/857 CPU: 0 PID: 857 Comm: syz-executor.2 Not tainted 6.0.0-rc3-00363-g7726d4c3e60b #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x6e/0x91 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x5e/0x5e5 mm/kasan/report.c:433 kasan_report+0xa3/0x130 mm/kasan/report.c:495 kernfs_type include/linux/kernfs.h:335 [inline] kernfs_leftmost_descendant fs/kernfs/dir.c:1261 [inline] __kernfs_remove.part.0+0x843/0x960 fs/kernfs/dir.c:1369 __kernfs_remove fs/kernfs/dir.c:1356 [inline] kernfs_remove_by_name_ns+0x108/0x190 fs/kernfs/dir.c:1589 sysfs_slab_add+0x133/0x1e0 mm/slub.c:5943 __kmem_cache_create+0x3e0/0x550 mm/slub.c:4899 create_cache mm/slab_common.c:229 [inline] kmem_cache_create_usercopy+0x167/0x2a0 mm/slab_common.c:335 p9_client_create+0xd4d/0x1190 net/9p/client.c:993 v9fs_session_init+0x1e6/0x13c0 fs/9p/v9fs.c:408 v9fs_mount+0xb9/0xbd0 fs/9p/vfs_super.c:126 legacy_get_tree+0xf1/0x200 fs/fs_context.c:610 vfs_get_tree+0x85/0x2e0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x675/0x1d00 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x282/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f725f983aed Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f725f0f7028 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f725faa3f80 RCX: 00007f725f983aed RDX: 00000000200000c0 RSI: 0000000020000040 RDI: 0000000000000000 RBP: 00007f725f9f419c R08: 0000000020000280 R09: 0000000000000000 R10: 0000000000000408 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f725faa3f80 R15: 00007f725f0d7000 </TASK> Allocated by task 855: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:470 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:7 ---truncated---
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
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存在安全漏洞,该漏洞源于根节点在kernfs_drain期间被释放,可能导致释放后重用。
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 45a140e587f3d32d8d424ed940dffb61e1739047 ~ 4dfd6a477a1525773469feaf3c514b2c0fef76b5 -
LinuxLinux 3.14 -

II. Public POCs for CVE-2022-50432

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2022-50432

登录查看更多情报信息。

Same Patch Batch · Linux · 2025-10-01 · 169 CVEs total

CVE-2023-535179.8 CRITICALtipc: do not update mtu if msg_max is too small in mtu negotiation
CVE-2023-534548.8 HIGHHID: multitouch: Correct devm device reference for hidinput input_dev name
CVE-2025-399188.8 HIGHwifi: mt76: fix linked list corruption
CVE-2025-399198.8 HIGHwifi: mt76: mt7996: add missing check for rx wcid entries
CVE-2022-504428.4 HIGHfs/ntfs3: Validate buffer length while parsing index
CVE-2023-534938.4 HIGHaccel/qaic: tighten bounds checking in decode_message()
CVE-2022-504217.8 HIGHrpmsg: char: Avoid double destroy of default endpoint
CVE-2023-534847.8 HIGHlib: cpu_rmap: Avoid use after free on rmap->obj array entries
CVE-2022-504407.8 HIGHdrm/vmwgfx: Validate the box size for the snooped cursor
CVE-2022-504547.8 HIGHdrm/nouveau: fix a use-after-free in nouveau_gem_prime_import_sg_table()
CVE-2025-399247.8 HIGHerofs: fix invalid algorithm for encoded extents
CVE-2023-535107.8 HIGHscsi: ufs: core: Fix handling of lrbp->cmd
CVE-2023-534657.8 HIGHsoundwire: qcom: fix storing port config out-of-bounds
CVE-2025-399277.8 HIGHceph: fix race condition validating r_parent before applying state
CVE-2022-504597.8 HIGHscsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()
CVE-2023-534927.8 HIGHnetfilter: nf_tables: do not ignore genmask when looking up chain by id
CVE-2022-504377.8 HIGHdrm/msm/hdmi: fix memory corruption with too many bridges
CVE-2023-534947.8 HIGHcrypto: xts - Handle EBUSY correctly
CVE-2023-534957.8 HIGHnet: ethernet: mvpp2_main: fix possible OOB write in mvpp2_ethtool_get_rxnfc()
CVE-2022-504237.8 HIGHACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage()

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

IV. Related Vulnerabilities

V. Comments for CVE-2022-50432

No comments yet


Leave a comment