<?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://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-30T07:54:30.987042+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" 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://db.gcve.eu/vuln/cve-2022-48975</id>
    <title>CVE-2022-48975 — gpiolib: fix memory leak in gpiochip_setup_dev()</title>
    <updated>2026-09-30T07:54:30.988205+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>gpiolib: fix memory leak in gpiochip_setup_dev()</p>
<p>Here is a backtrace report about memory leak detected in
gpiochip_setup_dev():</p>
<p>unreferenced object 0xffff88810b406400 (size 512):
  comm "python3", pid 1682, jiffies 4295346908 (age 24.090s)
  backtrace:
    kmalloc_trace
    device_add		device_private_init at drivers/base/core.c:3361
			(inlined by) device_add at drivers/base/core.c:3411
    cdev_device_add
    gpiolib_cdev_register
    gpiochip_setup_dev
    gpiochip_add_data_with_key</p>
<p>gcdev_register() &amp; gcdev_unregister() would call device_add() &amp;
device_del() (no matter CONFIG_GPIO_CDEV is enabled or not) to
register/unregister device.</p>
<p>However, if device_add() succeeds, some resource (like
struct device_private allocated by device_private_init())
is not released by device_del().</p>
<p>Therefore, after device_add() succeeds by gcdev_register(), it
needs to call put_device() to release resource in the error handle
path.</p>
<p>Here we move forward the register of release function, and let it
release every piece of resource by put_device() instead of kfree().</p>
<p>While at it, fix another subtle issue, i.e. when gc-&gt;ngpio is equal
to 0, we still call kcalloc() and, in case of further error, kfree()
on the ZERO_PTR pointer, which is not NULL. It's not a bug per se,
but rather waste of the resources and potentially wrong expectation
about contents of the gdev-&gt;descs variable.</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/cve-2022-48975"/>
  </entry>
</feed>
