Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C31B8817 for ; Wed, 17 Apr 2024 10:30:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713349838; cv=none; b=Aa04Q70KnxXP/RvrdViDejFnXFQlw0jr2Svx2+q23mxTadHy98K1l72rUDxnH449HszcIvIoiBklcgPfDHmTXvH+DgG5NQOniKmWYyacCPYAM26TkdjXo/y1Wie5D4UEZfSmE3OQ7rkiZLCCeVDtqK5e7fzdpnjM3JWSNzF5q/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713349838; c=relaxed/simple; bh=Z5ZDOt/tgUzjE4quR2QwcyBuNxYyNDEYwNxznn5EUZ0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=l2pia1naDz8BFmuQmJi1paeC6BR7AANjimbgyVmUstwqDCNZbm6QZFV4Y2b+sN8Op/QM05f6MXFc23BKPfWZD2OwDGmm9EFcn2Ry/3qvYMrGvkP0wnnDz7AaleexZN8IHBQa8LmvHQoJNatiYX1rIIBJ2OU/yftPMck1mjbpmTY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hNz7hPz+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hNz7hPz+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46E13C072AA; Wed, 17 Apr 2024 10:30:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713349838; bh=Z5ZDOt/tgUzjE4quR2QwcyBuNxYyNDEYwNxznn5EUZ0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hNz7hPz+163Lbx8gD6j+/4FrnlMtoxbo8nqhOY4zs6EldwV826Cv9n4EVYQH/l2MO fRmukW9Lv7X4NAsPuUcV74hsIlShai50rUVUxSoKD/JHJ+RiDnGPF1GmcXt1vR1eP0 G/Bufz9Sbq1R/UpujIZHI0/wCO9lg5bljs7sf7V4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26900: md: fix kmemleak of rdev->serial Date: Wed, 17 Apr 2024 12:29:15 +0200 Message-ID: <2024041745-CVE-2024-26900-70a3@gregkh> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2966; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Z5ZDOt/tgUzjE4quR2QwcyBuNxYyNDEYwNxznn5EUZ0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnyS2LTX4sxp/fkLtU6kpGrq+4qsu/LoWmFappqHZsP3 C94ua29I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbyLJJhwSSbDT53src03r73 U+ts4exVs2V8/zLMz+W8rrgmSYfvQV1IImOH/dLTL6onAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: md: fix kmemleak of rdev->serial If kobject_add() is fail in bind_rdev_to_array(), 'rdev->serial' will be alloc not be freed, and kmemleak occurs. unreferenced object 0xffff88815a350000 (size 49152): comm "mdadm", pid 789, jiffies 4294716910 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc f773277a): [<0000000058b0a453>] kmemleak_alloc+0x61/0xe0 [<00000000366adf14>] __kmalloc_large_node+0x15e/0x270 [<000000002e82961b>] __kmalloc_node.cold+0x11/0x7f [<00000000f206d60a>] kvmalloc_node+0x74/0x150 [<0000000034bf3363>] rdev_init_serial+0x67/0x170 [<0000000010e08fe9>] mddev_create_serial_pool+0x62/0x220 [<00000000c3837bf0>] bind_rdev_to_array+0x2af/0x630 [<0000000073c28560>] md_add_new_disk+0x400/0x9f0 [<00000000770e30ff>] md_ioctl+0x15bf/0x1c10 [<000000006cfab718>] blkdev_ioctl+0x191/0x3f0 [<0000000085086a11>] vfs_ioctl+0x22/0x60 [<0000000018b656fe>] __x64_sys_ioctl+0xba/0xe0 [<00000000e54e675e>] do_syscall_64+0x71/0x150 [<000000008b0ad622>] entry_SYSCALL_64_after_hwframe+0x6c/0x74 The Linux kernel CVE team has assigned CVE-2024-26900 to this issue. Affected and fixed versions =========================== Issue introduced in 5.3 with commit 963c555e75b0 and fixed in 6.7.11 with commit 6d32c832a885 Issue introduced in 5.3 with commit 963c555e75b0 and fixed in 6.8.2 with commit 4c1021ce46fc Issue introduced in 5.3 with commit 963c555e75b0 and fixed in 6.9-rc1 with commit 6cf350658736 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-2024-26900 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/md/md.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/6d32c832a88513f65c2c2c9c75954ee8b387adea https://git.kernel.org/stable/c/4c1021ce46fc2fb6115f7e79d353941e6dcad366 https://git.kernel.org/stable/c/6cf350658736681b9d6b0b6e58c5c76b235bb4c4