<?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>Thu, 01 Oct 2026 11:33:38 +0000</lastBuildDate>
    <item>
      <title>CVE-2024-26807 — spi: cadence-qspi: fix pointer reference in runtime PM hooks</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2024-26807</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;Both cadence-quadspi -&amp;gt;runtime_suspend() and -&amp;gt;runtime_resume()
implementations start with:&lt;/p&gt;
&lt;p&gt;struct cqspi_st *cqspi = dev_get_drvdata(dev);
	struct spi_controller *host = dev_get_drvdata(dev);&lt;/p&gt;
&lt;p&gt;This obviously cannot be correct, unless &amp;#34;struct cqspi_st&amp;#34; is the
first member of &amp;#34; struct spi_controller&amp;#34;, or the other way around, but
it is not the case. &amp;#34;struct spi_controller&amp;#34; is allocated by
devm_spi_alloc_host(), which allocates an extra amount of memory for
private data, used to store &amp;#34;struct cqspi_st&amp;#34;.&lt;/p&gt;
&lt;p&gt;The -&amp;gt;probe() function of the cadence-quadspi driver then sets the
device drvdata to store the address of the &amp;#34;struct cqspi_st&amp;#34;
structure. Therefore:&lt;/p&gt;
&lt;p&gt;struct cqspi_st *cqspi = dev_get_drvdata(dev);&lt;/p&gt;
&lt;p&gt;is correct, but:&lt;/p&gt;
&lt;p&gt;struct spi_controller *host = dev_get_drvdata(dev);&lt;/p&gt;
&lt;p&gt;is not, as it makes &amp;#34;host&amp;#34; point not to a &amp;#34;struct spi_controller&amp;#34; but
to the same &amp;#34;struct cqspi_st&amp;#34; structure as above.&lt;/p&gt;
&lt;p&gt;This obviously leads to bad things (memory corruption, kernel crashes)
directly during -&amp;gt;probe(), as -&amp;gt;probe() enables the device using PM
runtime, leading the -&amp;gt;runtime_resume() hook being called, which in
turns calls spi_controller_resume() with the wrong pointer.&lt;/p&gt;
&lt;p&gt;This has at least been reported [0] to cause a kernel crash, but the
exact behavior will depend on the memory contents.&lt;/p&gt;
&lt;p&gt;[0] https://lore.kernel.org/all/20240226121803.5a7r5wkpbbowcxgx@dhruva/&lt;/p&gt;
&lt;p&gt;This issue potentially affects all platforms that are currently us…&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;Both cadence-quadspi -&amp;gt;runtime_suspend() and -&amp;gt;runtime_resume()
implementations start with:&lt;/p&gt;
&lt;p&gt;struct cqspi_st *cqspi = dev_get_drvdata(dev);
	struct spi_controller *host = dev_get_drvdata(dev);&lt;/p&gt;
&lt;p&gt;This obviously cannot be correct, unless &amp;#34;struct cqspi_st&amp;#34; is the
first member of &amp;#34; struct spi_controller&amp;#34;, or the other way around, but
it is not the case. &amp;#34;struct spi_controller&amp;#34; is allocated by
devm_spi_alloc_host(), which allocates an extra amount of memory for
private data, used to store &amp;#34;struct cqspi_st&amp;#34;.&lt;/p&gt;
&lt;p&gt;The -&amp;gt;probe() function of the cadence-quadspi driver then sets the
device drvdata to store the address of the &amp;#34;struct cqspi_st&amp;#34;
structure. Therefore:&lt;/p&gt;
&lt;p&gt;struct cqspi_st *cqspi = dev_get_drvdata(dev);&lt;/p&gt;
&lt;p&gt;is correct, but:&lt;/p&gt;
&lt;p&gt;struct spi_controller *host = dev_get_drvdata(dev);&lt;/p&gt;
&lt;p&gt;is not, as it makes &amp;#34;host&amp;#34; point not to a &amp;#34;struct spi_controller&amp;#34; but
to the same &amp;#34;struct cqspi_st&amp;#34; structure as above.&lt;/p&gt;
&lt;p&gt;This obviously leads to bad things (memory corruption, kernel crashes)
directly during -&amp;gt;probe(), as -&amp;gt;probe() enables the device using PM
runtime, leading the -&amp;gt;runtime_resume() hook being called, which in
turns calls spi_controller_resume() with the wrong pointer.&lt;/p&gt;
&lt;p&gt;This has at least been reported [0] to cause a kernel crash, but the
exact behavior will depend on the memory contents.&lt;/p&gt;
&lt;p&gt;[0] https://lore.kernel.org/all/20240226121803.5a7r5wkpbbowcxgx@dhruva/&lt;/p&gt;
&lt;p&gt;This issue potentially affects all platforms that are currently us…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2024-26807</guid>
    </item>
  </channel>
</rss>
