Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792755553; b=Eqhm6yxHNveDgA35MZp32qMR2LKsRD92TSR4rSDBWZo1brSoCWngfOeZqlxHnY9e+kgs rURrA0pPZg7B+aFeuL32CWi+uujqfGmd/0JJFItIQACSXyMOXaa9PtaOtTIQKc2LbFRQ8 kXNmqUjmPWPUknWevFSxHvctnX3dEwOMmbe9f+wx46o6wm636GVuENm7tsrkRlLXGkad5 3fydgLZLA060u44a1Ojsy6UzOpbL7sS2fYYPmAZWr39vIRmA4DMbSf5JJ7M69fobklFQ/ MffC+ddpJ1TZ6Yy9PAnjOqvd10ImoUD+NAj/1q7YtXOfycbMLWWJsuweysb59ZKh5Rw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792755553; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=hK3fH06u5LS88lqaiZxF+RlYN14wkJ6BY1VxaTSFCF4=; b=zT17ZLBN/VP/DrnbiPY0Ib46d+gmbIoCdxOVTTERR+qCwWPYx83o1LrJqLMIq064FWl+ uGhwH1dGkV8iLCquCIc+QmUyAEZAAVCEIPic2J/uSKMc/U+j/5VudvLEc4EDTmi8flr7D OOZWMIq+9CGrBgjmivUbePHs3qhgt6QLhBfDC0xTFCYBrVYdV0GOSEadQBbUyT2yWL/Vz Mzis6KH94jqGB4BNnV+tEOjcD8xyiuj+Q/r3Dt50IY1cuE7ACRP1Ab59GzlUszM4pUqN8 CoDUo9DtzF9l/mCc7usjfXU8AV4HrRjVW3KWKj/2+vC9pEbFyShjbTVuLjXGytOR1yA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=vZM1JoJ0; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 372BE606A31D for ; Fri, 23 Oct 2026 11:39:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=vZM1JoJ0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E7541F01825; Fri, 23 Oct 2026 11:39:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792755552; bh=hK3fH06u5LS88lqaiZxF+RlYN14wkJ6BY1VxaTSFCF4=; h=From:To:Cc:Subject:Date:Reply-To; b=vZM1JoJ0wuF/lveOfzAgeSsL4p02D330UOVbkz3r3TIBGlgm/tJlGgt/KJaj0cpzQ hPDfpoKzTGFvVAhtZrqDQGpuct86zKnI1k/lIoctTcSv5dd5k9rE11+L9jxfU84HdE iFw8zuUFZNpwpo4MX5dsRUYUDkguUWxhOtq6ccgo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98884: mmc: core: Add validation for host-provided max_segs Date: Fri, 23 Oct 2026 13:37:32 +0200 Message-ID: <2026102323-CVE-2026-98884-5dcc@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5082; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0+a8Dyg6lzHhIDOkrDkT//YTe+T2DFfA4aaIqcsmhBw=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm33b5sqV5xUN14jquUtIpm/CKbtKq3J7dIGxud1zIRe 3DqkXJeRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykrIdhftwkgZzPq5Kim5I+ BCqGnNzBuqhBhGEOj4Msf5Vs5Ea5fTkcjQZTTqlvWRgGAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: mmc: core: Add validation for host-provided max_segs The max_segs field is of type unsigned short, and if a host driver sets an excessively large value, it may be truncated to zero. This can cause mmc_alloc_sg() to call kmalloc_objs() with a zero size allocation request, which leads to undefined behavior. Under the SLUB allocator, kmalloc(0) returns a special pointer (ZERO_SIZE_PTR). The subsequent 'if (sg)' check will evaluate to true, and sg_init_table() will then attempt to access invalid memory, resulting in a crash: dwmmc_rockchip 2a310000.mmc: Successfully tuned phase to 133 mmc1: new UHS-I speed SDR104 SDHC card at address aaaa Unable to handle kernel paging request at virtual address 0000001ffffffff0 Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=0000000102c88000 [0000001ffffffff0] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] SMP Modules linked in: CPU: 2 UID: 0 PID: 102 Comm: kworker/2:1 Not tainted 7.0.0-rc6-next-20260331-00013-g4d93c25963c5-dirty #80 PREEMPT Hardware name: Rockchip RK3576 EVB V10 Board (DT) Workqueue: events_freezable mmc_rescan pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : sg_init_table+0x2c/0x50 lr : sg_init_table+0x24/0x50 sp : ffff8000837db710 x29: ffff8000837db710 x28: 000000000000c000 x27: 0000000000000300 x26: 0000000000000000 x25: 0000000000000040 x24: ffff0000c46a0000 x23: 0000000000000000 x22: ffff0000c0c73c00 x21: 0000000000000010 x20: 0000000000000010 x19: 0000000000000000 x18: 000000000000002c x17: 0000000000000000 x16: 0000000000000001 x15: 0000000000000000 x14: 0000000000000400 x13: ffff8000837dc000 x12: 0000000000000000 x11: ffff0000c0c73ca0 x10: 0000000000000040 x9 : 459ec1f0abbdbb00 x8 : 0000001fffffffe0 x7 : 0000000000000000 x6 : 000000000000003f x5 : 0000000000035579 x4 : 0000000000000901 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000010 Call trace: sg_init_table+0x2c/0x50 (P) mmc_mq_init_request+0x64/0x90 blk_mq_alloc_map_and_rqs+0x3ac/0x480 blk_mq_alloc_set_map_and_rqs+0x98/0x1e0 blk_mq_alloc_tag_set+0x1c0/0x290 mmc_init_queue+0x120/0x370 mmc_blk_alloc_req+0x150/0x420 To prevent this, add a validation check in mmc_mq_init_request() to detect when sg_len (derived from max_segs) is zero. If sg_len is zero, we return an error and print an error message, allowing host driver developers to identify and fix incorrect max_segs configuration. This is a defensive measure that ensures the MMC core fails gracefully when host drivers provide invalid max_segs values, rather than crashing with a page fault. The Linux kernel CVE team has assigned CVE-2026-98884 to this issue. Affected and fixed versions =========================== Fixed in 5.15.222 with commit 03f5a16ec85beebabd5ab5e67ac1527f87908ded Fixed in 6.1.189 with commit c465608bd25d7f8565be7817a6a36a5d69f8aa14 Fixed in 6.6.158 with commit a8283f7d93f0d9336b15618b9665279ff6944319 Fixed in 6.12.111 with commit 9cca3c0c1472d6204ef8a78a6e7b3afe9610b22e Fixed in 6.18.53 with commit b037c2f7794aa01ee2a00e43c29645fd2dd2dfb9 Fixed in 7.2 with commit 3e0483e93a8be320f70a1ff68d835f7f015af311 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-98884 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/mmc/core/queue.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/03f5a16ec85beebabd5ab5e67ac1527f87908ded https://git.kernel.org/stable/c/c465608bd25d7f8565be7817a6a36a5d69f8aa14 https://git.kernel.org/stable/c/a8283f7d93f0d9336b15618b9665279ff6944319 https://git.kernel.org/stable/c/9cca3c0c1472d6204ef8a78a6e7b3afe9610b22e https://git.kernel.org/stable/c/b037c2f7794aa01ee2a00e43c29645fd2dd2dfb9 https://git.kernel.org/stable/c/3e0483e93a8be320f70a1ff68d835f7f015af311