<?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>Sun, 04 Oct 2026 02:17:59 +0000</lastBuildDate>
    <item>
      <title>CVE-2026-63895 — usb: gadget: f_fs: copy only received bytes on short ep0 read</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2026-63895</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;usb: gadget: f_fs: copy only received bytes on short ep0 read&lt;/p&gt;
&lt;p&gt;ffs_ep0_read() allocates its control-OUT data buffer with
kmalloc() (not kzalloc) at the Length value from the Setup
packet, then copies that full len to userspace regardless of
how many bytes were actually received:&lt;/p&gt;
&lt;p&gt;data = kmalloc(len, GFP_KERNEL);
    ...
    ret = __ffs_ep0_queue_wait(ffs, data, len);
    if ((ret &amp;gt; 0) &amp;amp;&amp;amp; (copy_to_user(buf, data, len)))
            ret = -EFAULT;&lt;/p&gt;
&lt;p&gt;__ffs_ep0_queue_wait() returns req-&amp;gt;actual, which on a short
control OUT transfer is strictly less than len.  The
copy_to_user() call still copies len bytes, so on a short OUT
the last (len - ret) bytes of the kmalloc() buffer --
uninitialised slab residue -- are delivered to the FunctionFS
daemon.&lt;/p&gt;
&lt;p&gt;Short ep0 OUT completions are specified USB control-transfer
behavior and are produced by in-tree UDCs:&lt;/p&gt;
&lt;p&gt;* dwc2 continues on req-&amp;gt;actual &amp;lt; req-&amp;gt;length for ep0 DATA OUT
    (short-not-ok is the only ep0-OUT stall path).
  * aspeed_udc ends ep0 OUT on rx_len &amp;lt; ep-&amp;gt;ep.maxpacket.
  * renesas_usbf logs &amp;#34;ep0 short packet&amp;#34; and completes the
    request.
  * dwc3 stalls on short IN but not on short OUT.&lt;/p&gt;
&lt;p&gt;A short ep0 OUT is therefore not evidence of a broken UDC; it is
a normal condition f_fs has to cope with.  The sibling gadgetfs
implementation in drivers/usb/gadget/legacy/inode.c already does
this correctly via min(len, dev-&amp;gt;req-&amp;gt;actual) before
copy_to_user().  This pat…&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;usb: gadget: f_fs: copy only received bytes on short ep0 read&lt;/p&gt;
&lt;p&gt;ffs_ep0_read() allocates its control-OUT data buffer with
kmalloc() (not kzalloc) at the Length value from the Setup
packet, then copies that full len to userspace regardless of
how many bytes were actually received:&lt;/p&gt;
&lt;p&gt;data = kmalloc(len, GFP_KERNEL);
    ...
    ret = __ffs_ep0_queue_wait(ffs, data, len);
    if ((ret &amp;gt; 0) &amp;amp;&amp;amp; (copy_to_user(buf, data, len)))
            ret = -EFAULT;&lt;/p&gt;
&lt;p&gt;__ffs_ep0_queue_wait() returns req-&amp;gt;actual, which on a short
control OUT transfer is strictly less than len.  The
copy_to_user() call still copies len bytes, so on a short OUT
the last (len - ret) bytes of the kmalloc() buffer --
uninitialised slab residue -- are delivered to the FunctionFS
daemon.&lt;/p&gt;
&lt;p&gt;Short ep0 OUT completions are specified USB control-transfer
behavior and are produced by in-tree UDCs:&lt;/p&gt;
&lt;p&gt;* dwc2 continues on req-&amp;gt;actual &amp;lt; req-&amp;gt;length for ep0 DATA OUT
    (short-not-ok is the only ep0-OUT stall path).
  * aspeed_udc ends ep0 OUT on rx_len &amp;lt; ep-&amp;gt;ep.maxpacket.
  * renesas_usbf logs &amp;#34;ep0 short packet&amp;#34; and completes the
    request.
  * dwc3 stalls on short IN but not on short OUT.&lt;/p&gt;
&lt;p&gt;A short ep0 OUT is therefore not evidence of a broken UDC; it is
a normal condition f_fs has to cope with.  The sibling gadgetfs
implementation in drivers/usb/gadget/legacy/inode.c already does
this correctly via min(len, dev-&amp;gt;req-&amp;gt;actual) before
copy_to_user().  This pat…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2026-63895</guid>
    </item>
  </channel>
</rss>
