All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-cve-announce@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@kernel.org>
Subject: CVE-2026-138892: USB: gadgetfs: do not WARN about excessively large memory allocations
Date: Mon, 30 Nov 2026 14:26:37 +0100	[thread overview]
Message-ID: <2026113033-CVE-2026-138892-e13e@gregkh> (raw)

From: Greg Kroah-Hartman <gregkh@kernel.org>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

USB: gadgetfs: do not WARN about excessively large memory allocations

GadgetFS passes an excessively large user input len to kmalloc and kmalloc
gives a WARN (see below for details).  Suppress it by passing __GFP_NOWARN
to kmalloc used by both ep_write_iter() and ep_read_iter().  Follow the
same method as commit 4f2629ea67e72 ("USB: usbfs: Don't WARN about
excessively large memory allocations").

kmalloc is used to allocate physically contiguous memory for kernel
allocations.  For requests larger than KMALLOC_MAX_CACHE_SIZE, kmalloc
uses the page allocator and can only support up to KMALLOC_MAX_SIZE.  For
request sizes bigger than KMALLOC_MAX_SIZE, the page allocator can emit a
WARN because kmalloc allocates an order greater than MAX_PAGE_ORDER.

The Linux kernel CVE team has assigned CVE-2026-138892 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 2.6.31 with commit b3c466ce512923298ae8c0121d3e9f397a3f1210 and fixed in 5.10.275 with commit 7e1b42e973d50f22211ceb3fea29a57709f9ce55
	Issue introduced in 2.6.31 with commit b3c466ce512923298ae8c0121d3e9f397a3f1210 and fixed in 5.15.226 with commit 891f0110c4673802cf5b2923dfe252f53e60adeb
	Issue introduced in 2.6.31 with commit b3c466ce512923298ae8c0121d3e9f397a3f1210 and fixed in 6.1.193 with commit abdcc0419e9d1f8d448095f685c82e49b6712fe6
	Issue introduced in 2.6.31 with commit b3c466ce512923298ae8c0121d3e9f397a3f1210 and fixed in 6.6.163 with commit 50e5ee542ce5af4887d9a02ea5a2725b2f56985a
	Issue introduced in 2.6.31 with commit b3c466ce512923298ae8c0121d3e9f397a3f1210 and fixed in 6.12.117 with commit 04b4bf0d8fe3431ac64629e35f6bfe294bb37160
	Issue introduced in 2.6.31 with commit b3c466ce512923298ae8c0121d3e9f397a3f1210 and fixed in 6.18.63 with commit afc4b63805254c0c1ae515e69383567c8b57d6ac
	Issue introduced in 2.6.31 with commit b3c466ce512923298ae8c0121d3e9f397a3f1210 and fixed in 7.3.4 with commit 1e482527aeb0cb45c923248961b82513801b64d4
	Issue introduced in 2.6.31 with commit b3c466ce512923298ae8c0121d3e9f397a3f1210 and fixed in 7.4-rc1 with commit a156148976eac47bee7210097afbb609cafe88b6

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-138892
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	drivers/usb/gadget/legacy/inode.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/7e1b42e973d50f22211ceb3fea29a57709f9ce55
	https://git.kernel.org/stable/c/891f0110c4673802cf5b2923dfe252f53e60adeb
	https://git.kernel.org/stable/c/abdcc0419e9d1f8d448095f685c82e49b6712fe6
	https://git.kernel.org/stable/c/50e5ee542ce5af4887d9a02ea5a2725b2f56985a
	https://git.kernel.org/stable/c/04b4bf0d8fe3431ac64629e35f6bfe294bb37160
	https://git.kernel.org/stable/c/afc4b63805254c0c1ae515e69383567c8b57d6ac
	https://git.kernel.org/stable/c/1e482527aeb0cb45c923248961b82513801b64d4
	https://git.kernel.org/stable/c/a156148976eac47bee7210097afbb609cafe88b6

                 reply	other threads:[~2026-11-30 13:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026113033-CVE-2026-138892-e13e@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=cve@kernel.org \
    --cc=gregkh@kernel.org \
    --cc=linux-cve-announce@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.