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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-38628— vdpa/mlx5: Fix release of uninitialized resources on error path

EPSS 0.02% · P6
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2025-38628

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
vdpa/mlx5: Fix release of uninitialized resources on error path
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: vdpa/mlx5: Fix release of uninitialized resources on error path The commit in the fixes tag made sure that mlx5_vdpa_free() is the single entrypoint for removing the vdpa device resources added in mlx5_vdpa_dev_add(), even in the cleanup path of mlx5_vdpa_dev_add(). This means that all functions from mlx5_vdpa_free() should be able to handle uninitialized resources. This was not the case though: mlx5_vdpa_destroy_mr_resources() and mlx5_cmd_cleanup_async_ctx() were not able to do so. This caused the splat below when adding a vdpa device without a MAC address. This patch fixes these remaining issues: - Makes mlx5_vdpa_destroy_mr_resources() return early if called on uninitialized resources. - Moves mlx5_cmd_init_async_ctx() early on during device addition because it can't fail. This means that mlx5_cmd_cleanup_async_ctx() also can't fail. To mirror this, move the call site of mlx5_cmd_cleanup_async_ctx() in mlx5_vdpa_free(). An additional comment was added in mlx5_vdpa_free() to document the expectations of functions called from this context. Splat: mlx5_core 0000:b5:03.2: mlx5_vdpa_dev_add:3950:(pid 2306) warning: No mac address provisioned? ------------[ cut here ]------------ WARNING: CPU: 13 PID: 2306 at kernel/workqueue.c:4207 __flush_work+0x9a/0xb0 [...] Call Trace: <TASK> ? __try_to_del_timer_sync+0x61/0x90 ? __timer_delete_sync+0x2b/0x40 mlx5_vdpa_destroy_mr_resources+0x1c/0x40 [mlx5_vdpa] mlx5_vdpa_free+0x45/0x160 [mlx5_vdpa] vdpa_release_dev+0x1e/0x50 [vdpa] device_release+0x31/0x90 kobject_cleanup+0x37/0x130 mlx5_vdpa_dev_add+0x327/0x890 [mlx5_vdpa] vdpa_nl_cmd_dev_add_set_doit+0x2c1/0x4d0 [vdpa] genl_family_rcv_msg_doit+0xd8/0x130 genl_family_rcv_msg+0x14b/0x220 ? __pfx_vdpa_nl_cmd_dev_add_set_doit+0x10/0x10 [vdpa] genl_rcv_msg+0x47/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x53/0x100 genl_rcv+0x24/0x40 netlink_unicast+0x27b/0x3b0 netlink_sendmsg+0x1f7/0x430 __sys_sendto+0x1fa/0x210 ? ___pte_offset_map+0x17/0x160 ? next_uptodate_folio+0x85/0x2b0 ? percpu_counter_add_batch+0x51/0x90 ? filemap_map_pages+0x515/0x660 __x64_sys_sendto+0x20/0x30 do_syscall_64+0x7b/0x2c0 ? do_read_fault+0x108/0x220 ? do_pte_missing+0x14a/0x3e0 ? __handle_mm_fault+0x321/0x730 ? count_memcg_events+0x13f/0x180 ? handle_mm_fault+0x1fb/0x2d0 ? do_user_addr_fault+0x20c/0x700 ? syscall_exit_work+0x104/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f0c25b0feca [...] ---[ end trace 0000000000000000 ]---
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存在安全漏洞,该漏洞源于vdpa/mlx5释放未初始化的资源时未正确处理错误路径。
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 83e445e64f48bdae3f25013e788fcf592f142576 ~ 37f26b9013b46457b0a96633fc3a7dc977d8beb1 -
LinuxLinux 6.12 -

II. Public POCs for CVE-2025-38628

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-38628

登录查看更多情报信息。

Same Patch Batch · Linux · 2025-08-22 · 60 CVEs total

CVE-2025-38635clk: davinci: Add NULL check in davinci_lpsc_clk_register()
CVE-2025-38616tls: handle data disappearing from under the TLS ULP
CVE-2025-38620zloop: fix KASAN use-after-free of tag set
CVE-2025-38619media: ti: j721e-csi2rx: fix list_del corruption
CVE-2025-38621md: make rdev_addable usable for rcu mode
CVE-2025-38618vsock: Do not allow binding to VMADDR_PORT_ANY
CVE-2025-38632pinmux: fix race causing mux_owner NULL with active mux_usecount
CVE-2025-38631clk: imx95-blk-ctl: Fix synchronous abort
CVE-2025-38633clk: spacemit: mark K1 pll1_d8 as critical
CVE-2025-38634power: supply: cpcap-charger: Fix null check for power_supply_get_by_name
CVE-2025-38630fbdev: imxfb: Check fb_add_videomode to prevent null-ptr-deref
CVE-2025-38636rv: Use strings in da monitors tracepoints
CVE-2025-38638ipv6: add a retry logic in net6_rt_notify()
CVE-2025-38639netfilter: xt_nfacct: don't assume acct name is null-terminated
CVE-2025-38640bpf: Disable migration in nf_hook_run_bpf().
CVE-2025-38641Bluetooth: btusb: Fix potential NULL dereference on kmalloc failure
CVE-2025-38642wifi: mac80211: fix WARN_ON for monitor mode on some devices
CVE-2025-38643wifi: cfg80211: Add missing lock in cfg80211_check_and_end_cac()
CVE-2025-38644wifi: mac80211: reject TDLS operations when station is not associated
CVE-2025-38645net/mlx5: Check device memory pointer before usage

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

IV. Related Vulnerabilities

V. Comments for CVE-2025-38628

No comments yet


Leave a comment