<?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>Tue, 06 Oct 2026 21:13:00 +0000</lastBuildDate>
    <item>
      <title>CVE-2024-53193 — clk: clk-loongson2: Fix memory corruption bug in struct loongson2_clk_provider</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2024-53193</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;clk: clk-loongson2: Fix memory corruption bug in struct loongson2_clk_provider&lt;/p&gt;
&lt;p&gt;Some heap space is allocated for the flexible structure `struct
clk_hw_onecell_data` and its flexible-array member `hws` through
the composite structure `struct loongson2_clk_provider` in function
`loongson2_clk_probe()`, as shown below:&lt;/p&gt;
&lt;p&gt;289         struct loongson2_clk_provider *clp;
	...
296         for (p = data; p-&amp;gt;name; p++)
297                 clks_num++;
298
299         clp = devm_kzalloc(dev, struct_size(clp, clk_data.hws, clks_num),
300                            GFP_KERNEL);&lt;/p&gt;
&lt;p&gt;Then some data is written into the flexible array:&lt;/p&gt;
&lt;p&gt;350                 clp-&amp;gt;clk_data.hws[p-&amp;gt;id] = hw;&lt;/p&gt;
&lt;p&gt;This corrupts `clk_lock`, which is the spinlock variable immediately
following the `clk_data` member in `struct loongson2_clk_provider`:&lt;/p&gt;
&lt;p&gt;struct loongson2_clk_provider {
	void __iomem *base;
	struct device *dev;
	struct clk_hw_onecell_data clk_data;
	spinlock_t clk_lock;	/* protect access to DIV registers */
};&lt;/p&gt;
&lt;p&gt;The problem is that the flexible structure is currently placed in the
middle of `struct loongson2_clk_provider` instead of at the end.&lt;/p&gt;
&lt;p&gt;Fix this by moving `struct clk_hw_onecell_data clk_data;` to the end of
`struct loongson2_clk_provider`. Also, add a code comment to help
prevent this from happening again in case new members are added to the
structure in the future.&lt;/p&gt;
&lt;p&gt;This change also fixes the following -Wflex-array-member-not-at-end
w…&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;clk: clk-loongson2: Fix memory corruption bug in struct loongson2_clk_provider&lt;/p&gt;
&lt;p&gt;Some heap space is allocated for the flexible structure `struct
clk_hw_onecell_data` and its flexible-array member `hws` through
the composite structure `struct loongson2_clk_provider` in function
`loongson2_clk_probe()`, as shown below:&lt;/p&gt;
&lt;p&gt;289         struct loongson2_clk_provider *clp;
	...
296         for (p = data; p-&amp;gt;name; p++)
297                 clks_num++;
298
299         clp = devm_kzalloc(dev, struct_size(clp, clk_data.hws, clks_num),
300                            GFP_KERNEL);&lt;/p&gt;
&lt;p&gt;Then some data is written into the flexible array:&lt;/p&gt;
&lt;p&gt;350                 clp-&amp;gt;clk_data.hws[p-&amp;gt;id] = hw;&lt;/p&gt;
&lt;p&gt;This corrupts `clk_lock`, which is the spinlock variable immediately
following the `clk_data` member in `struct loongson2_clk_provider`:&lt;/p&gt;
&lt;p&gt;struct loongson2_clk_provider {
	void __iomem *base;
	struct device *dev;
	struct clk_hw_onecell_data clk_data;
	spinlock_t clk_lock;	/* protect access to DIV registers */
};&lt;/p&gt;
&lt;p&gt;The problem is that the flexible structure is currently placed in the
middle of `struct loongson2_clk_provider` instead of at the end.&lt;/p&gt;
&lt;p&gt;Fix this by moving `struct clk_hw_onecell_data clk_data;` to the end of
`struct loongson2_clk_provider`. Also, add a code comment to help
prevent this from happening again in case new members are added to the
structure in the future.&lt;/p&gt;
&lt;p&gt;This change also fixes the following -Wflex-array-member-not-at-end
w…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2024-53193</guid>
    </item>
  </channel>
</rss>
