<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://vulnerability.circl.lu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Fri, 02 Oct 2026 12:29:21 +0000</lastBuildDate>
    <item>
      <title>CVE-2022-48744 — net/mlx5e: Avoid field-overflowing memcpy()</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2022-48744</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;net/mlx5e: Avoid field-overflowing memcpy()&lt;/p&gt;
&lt;p&gt;In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
intentionally writing across neighboring fields.&lt;/p&gt;
&lt;p&gt;Use flexible arrays instead of zero-element arrays (which look like they
are always overflowing) and split the cross-field memcpy() into two halves
that can be appropriately bounds-checked by the compiler.&lt;/p&gt;
&lt;p&gt;We were doing:&lt;/p&gt;
&lt;p&gt;#define ETH_HLEN  14
	#define VLAN_HLEN  4
	...
	#define MLX5E_XDP_MIN_INLINE (ETH_HLEN + VLAN_HLEN)
	...
        struct mlx5e_tx_wqe      *wqe  = mlx5_wq_cyc_get_wqe(wq, pi);
	...
        struct mlx5_wqe_eth_seg  *eseg = &amp;amp;wqe-&amp;gt;eth;
        struct mlx5_wqe_data_seg *dseg = wqe-&amp;gt;data;
	...
	memcpy(eseg-&amp;gt;inline_hdr.start, xdptxd-&amp;gt;data, MLX5E_XDP_MIN_INLINE);&lt;/p&gt;
&lt;p&gt;target is wqe-&amp;gt;eth.inline_hdr.start (which the compiler sees as being
2 bytes in size), but copying 18, intending to write across start
(really vlan_tci, 2 bytes). The remaining 16 bytes get written into
wqe-&amp;gt;data[0], covering byte_count (4 bytes), lkey (4 bytes), and addr
(8 bytes).&lt;/p&gt;
&lt;p&gt;struct mlx5e_tx_wqe {
        struct mlx5_wqe_ctrl_seg   ctrl;                 /*     0    16 */
        struct mlx5_wqe_eth_seg    eth;                  /*    16    16 */
        struct mlx5_wqe_data_seg   data[];               /*    32     0 */&lt;/p&gt;
&lt;p&gt;/* size: 32, cachelines: 1, members: 3 */
        /* last cacheline: 32…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;net/mlx5e: Avoid field-overflowing memcpy()&lt;/p&gt;
&lt;p&gt;In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
intentionally writing across neighboring fields.&lt;/p&gt;
&lt;p&gt;Use flexible arrays instead of zero-element arrays (which look like they
are always overflowing) and split the cross-field memcpy() into two halves
that can be appropriately bounds-checked by the compiler.&lt;/p&gt;
&lt;p&gt;We were doing:&lt;/p&gt;
&lt;p&gt;#define ETH_HLEN  14
	#define VLAN_HLEN  4
	...
	#define MLX5E_XDP_MIN_INLINE (ETH_HLEN + VLAN_HLEN)
	...
        struct mlx5e_tx_wqe      *wqe  = mlx5_wq_cyc_get_wqe(wq, pi);
	...
        struct mlx5_wqe_eth_seg  *eseg = &amp;amp;wqe-&amp;gt;eth;
        struct mlx5_wqe_data_seg *dseg = wqe-&amp;gt;data;
	...
	memcpy(eseg-&amp;gt;inline_hdr.start, xdptxd-&amp;gt;data, MLX5E_XDP_MIN_INLINE);&lt;/p&gt;
&lt;p&gt;target is wqe-&amp;gt;eth.inline_hdr.start (which the compiler sees as being
2 bytes in size), but copying 18, intending to write across start
(really vlan_tci, 2 bytes). The remaining 16 bytes get written into
wqe-&amp;gt;data[0], covering byte_count (4 bytes), lkey (4 bytes), and addr
(8 bytes).&lt;/p&gt;
&lt;p&gt;struct mlx5e_tx_wqe {
        struct mlx5_wqe_ctrl_seg   ctrl;                 /*     0    16 */
        struct mlx5_wqe_eth_seg    eth;                  /*    16    16 */
        struct mlx5_wqe_data_seg   data[];               /*    32     0 */&lt;/p&gt;
&lt;p&gt;/* size: 32, cachelines: 1, members: 3 */
        /* last cacheline: 32…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2022-48744</guid>
    </item>
  </channel>
</rss>
