{"id":6971,"date":"2026-09-04T18:49:22","date_gmt":"2026-09-04T10:49:22","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-72343"},"modified":"2026-09-04T18:49:22","modified_gmt":"2026-09-04T10:49:22","slug":"cve-2026-72343","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-72343","title":{"rendered":"CVE-2026-72343 [HIGH] &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nnet\/mlx5e: Fix HV VHC"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>net\/mlx5e: Fix HV VHCA stats zero-sized buffer allocation<\/p>\n<p>mlx5e_hv_vhca_stats_create() is called from mlx5e_nic_enable(),<br \/>\nbefore mlx5e_open(). At that point priv-&gt;stats_nch is still zero,<br \/>\nbecause it is only ever incremented in mlx5e_channel_stats_alloc(),<br \/>\nwhich is reached only from mlx5e_open_channel().<\/p>\n<p>mlx5e_hv_vhca_stats_buf_size() therefore returns 0, and<br \/>\nkvzalloc(0, GFP_KERNEL) returns ZERO_SIZE_PTR ((void *)16) rather<br \/>\nthan NULL. The &#8220;if (!buf)&#8221; guard does not catch this, and<br \/>\nmlx5e_hv_vhca_stats_create() completes &#8220;successfully&#8221; with<br \/>\npriv-&gt;stats_agent.buf set to ZERO_SIZE_PTR.<\/p>\n<p>Once channels are opened (priv-&gt;stats_nch &gt; 0) and the hypervisor<br \/>\nenables stats reporting, mlx5e_hv_vhca_stats_work() recomputes<br \/>\nbuf_len using the new non-zero stats_nch and calls<br \/>\nmemset(buf, 0, buf_len) on ZERO_SIZE_PTR, faulting at address 0x10.<\/p>\n<p>Allocate the buffer based on priv-&gt;max_nch, which is set in<br \/>\nmlx5e_priv_init() and is the upper bound on stats_nch:<\/p>\n<p>  &#8211; Add a separate helper mlx5e_hv_vhca_stats_buf_max_size() that<br \/>\n    returns sizeof(per_ring_stats) * max(max_nch, stats_nch), and<br \/>\n    use it for the kvzalloc() in mlx5e_hv_vhca_stats_create().<br \/>\n  &#8211; Keep mlx5e_hv_vhca_stats_buf_size() (which returns based on<br \/>\n    stats_nch) for the worker&#8217;s active payload size, so the wire<br \/>\n    format (block-&gt;rings = stats_nch) and the amount of data filled<br \/>\n    by mlx5e_hv_vhca_fill_stats() are unchanged.<\/p>\n<p>The max(max_nch, stats_nch) guard handles the rare case where<br \/>\nmlx5e_attach_netdev() recomputes max_nch downward across a<br \/>\ndetach\/resume cycle while priv-&gt;stats_nch persists (mlx5e_detach_netdev<br \/>\ndoes not call mlx5e_priv_cleanup, so stats_nch is only reset when<br \/>\nthe netdev is destroyed). Without the guard, the worker could compute<br \/>\nbuf_len from stats_nch and overrun the smaller buffer allocated based<br \/>\non the reduced max_nch.<\/p>\n<p>Allocating a non-zero buffer also makes the kvzalloc() failure path in<br \/>\nmlx5e_hv_vhca_stats_create() reachable for the first time: it returns<br \/>\nearly without (re)creating the agent. Clear<br \/>\npriv-&gt;stats_agent.{agent,buf} in mlx5e_hv_vhca_stats_destroy() after<br \/>\nfreeing them, so that if a later create() bails out on this path, a<br \/>\nsubsequent teardown does not double-free the stale agent\/buffer left<br \/>\nfrom a previous enable\/disable cycle.<\/p>\n<p>This mirrors the existing mlx5e pattern of preallocating arrays of<br \/>\nsize max_nch (e.g. priv-&gt;channel_stats) and lazily populating<br \/>\nentries up to stats_nch on demand.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>net\/mlx5e: Fix HV VHCA stats zero-sized buffer allocation<\/p>\n<p>mlx5e_hv_vhca_stats_create() is called from mlx5e_nic_enable(),<br \/>\nbefore m<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-6971","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/6971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}