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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2022-50751— configfs: fix possible memory leak in configfs_create_dir()

EPSS 0.05% · P15
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2022-50751

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
configfs: fix possible memory leak in configfs_create_dir()
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: configfs: fix possible memory leak in configfs_create_dir() kmemleak reported memory leaks in configfs_create_dir(): unreferenced object 0xffff888009f6af00 (size 192): comm "modprobe", pid 3777, jiffies 4295537735 (age 233.784s) backtrace: kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273) new_fragment (./include/linux/slab.h:600 fs/configfs/dir.c:163) configfs_register_subsystem (fs/configfs/dir.c:1857) basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic do_one_initcall (init/main.c:1296) do_init_module (kernel/module/main.c:2455) ... unreferenced object 0xffff888003ba7180 (size 96): comm "modprobe", pid 3777, jiffies 4295537735 (age 233.784s) backtrace: kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273) configfs_new_dirent (./include/linux/slab.h:723 fs/configfs/dir.c:194) configfs_make_dirent (fs/configfs/dir.c:248) configfs_create_dir (fs/configfs/dir.c:296) configfs_attach_group.isra.28 (fs/configfs/dir.c:816 fs/configfs/dir.c:852) configfs_register_subsystem (fs/configfs/dir.c:1881) basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic do_one_initcall (init/main.c:1296) do_init_module (kernel/module/main.c:2455) ... This is because the refcount is not correct in configfs_make_dirent(). For normal stage, the refcount is changing as: configfs_register_subsystem() configfs_create_dir() configfs_make_dirent() configfs_new_dirent() # set s_count = 1 dentry->d_fsdata = configfs_get(sd); # s_count = 2 ... configfs_unregister_subsystem() configfs_remove_dir() remove_dir() configfs_remove_dirent() # s_count = 1 dput() ... *dentry_unlink_inode()* configfs_d_iput() # s_count = 0, release However, if we failed in configfs_create(): configfs_register_subsystem() configfs_create_dir() configfs_make_dirent() # s_count = 2 ... configfs_create() # fail ->out_remove: configfs_remove_dirent(dentry) configfs_put(sd) # s_count = 1 return PTR_ERR(inode); There is no inode in the error path, so the configfs_d_iput() is lost and makes sd and fragment memory leaked. To fix this, when we failed in configfs_create(), manually call configfs_put(sd) to keep the refcount correct.
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存在安全漏洞,该漏洞源于configfs_create_dir失败后未释放内存,可能导致内存泄漏。
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 7063fbf2261194f72ee75afca67b3b38b554b5fa ~ 90c38f57a821499391526b15cc944c265bd24e48 -
LinuxLinux 2.6.16 -

II. Public POCs for CVE-2022-50751

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2022-50751

Please Login to view more intelligence information

Same Patch Batch · Linux · 2025-12-24 · 322 CVEs total

CVE-2022-50755udf: Avoid double brelse() in udf_rename()
CVE-2022-50765RISC-V: kexec: Fix memory leak of elf header buffer
CVE-2022-50764ipv6/sit: use DEV_STATS_INC() to avoid data-races
CVE-2022-50763crypto: marvell/octeontx - prevent integer overflows
CVE-2022-50762fs/ntfs3: Avoid UBSAN error on true_sectors_per_clst()
CVE-2022-50760drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()
CVE-2022-50761x86/xen: Fix memory leak in xen_init_lock_cpu()
CVE-2022-50759media: i2c: ov5648: Free V4L2 fwnode data on unbind
CVE-2022-50758staging: vt6655: fix potential memory leak
CVE-2022-50756nvme-pci: fix mempool alloc size
CVE-2022-50757media: camss: Clean up received buffers on failed start of streaming
CVE-2022-50750drm/panel/panel-sitronix-st7701: Remove panel on DSI attach failure
CVE-2022-50745staging: media: tegra-video: fix device_node use after free
CVE-2022-50746erofs: validate the extent length for uncompressed pclusters
CVE-2022-50747hfs: Fix OOB Write in hfs_asc2mac
CVE-2022-50748ipc: mqueue: fix possible memory leak in init_mqueue_fs()
CVE-2022-50752md/raid5: Remove unnecessary bio_put() in raid5_read_one_chunk()
CVE-2022-50753f2fs: fix to do sanity check on summary info
CVE-2022-50754apparmor: fix a memleak in multi_transaction_new()
CVE-2022-50766btrfs: set generation before calling btrfs_clean_tree_block in btrfs_init_new_buffer

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

IV. Related Vulnerabilities

V. Comments for CVE-2022-50751

No comments yet


Leave a comment