<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-06T21:13:00.506857+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/cve-2024-53193</id>
    <title>CVE-2024-53193 — clk: clk-loongson2: Fix memory corruption bug in struct loongson2_clk_provider</title>
    <updated>2026-10-06T21:13:00.715947+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Linux</p>
<p>In the Linux kernel, the following vulnerability has been resolved:</p>
<p>clk: clk-loongson2: Fix memory corruption bug in struct loongson2_clk_provider</p>
<p>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:</p>
<p>289         struct loongson2_clk_provider *clp;
	...
296         for (p = data; p-&gt;name; p++)
297                 clks_num++;
298
299         clp = devm_kzalloc(dev, struct_size(clp, clk_data.hws, clks_num),
300                            GFP_KERNEL);</p>
<p>Then some data is written into the flexible array:</p>
<p>350                 clp-&gt;clk_data.hws[p-&gt;id] = hw;</p>
<p>This corrupts `clk_lock`, which is the spinlock variable immediately
following the `clk_data` member in `struct loongson2_clk_provider`:</p>
<p>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 */
};</p>
<p>The problem is that the flexible structure is currently placed in the
middle of `struct loongson2_clk_provider` instead of at the end.</p>
<p>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.</p>
<p>This change also fixes the following -Wflex-array-member-not-at-end
w…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2024-53193"/>
  </entry>
</feed>
