From mboxrd@z Thu Jan 1 00:00:00 1970 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 5B14E7405A for ; Tue, 9 Dec 2025 00:04:43 +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=1765238683; cv=none; b=F16iNBxGdN11Akrv9jRvuI53Zhla5GRCEa0a5odnvd9ooO3EKlmCfQoadXw8x4gu31XTi3zlhjh6eezUcf4GO5iw/iaefEdXephjAVGdIVoK5wTCFNcLwTo1CH4ki+baKPn5Cokgz/4Bhy1MtWtXhCxEhWx6LMi/tlS2cuRjeqs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765238683; c=relaxed/simple; bh=VErs7FRkWytRu00fF68OxR/W/CHU0x4pmRSSA5zJlek=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RphgPh+FybMXQXY4VlIJJ5GvUT/XurA4gArU7Urr1iWqUq2WcqEbAw7bVZHooYF6DLJPmDGSL/1U/bjDxws8hdg7/soW+0+Ofik1K6wRUgocB1CXILs9trjJxg13imlmrJOVzMZQqNesag4+4+NgywGOLAiuSiLD9qVozS+Q36Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YFKnvv1L; 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="YFKnvv1L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAAB1C4CEF1; Tue, 9 Dec 2025 00:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765238683; bh=VErs7FRkWytRu00fF68OxR/W/CHU0x4pmRSSA5zJlek=; h=From:To:Cc:Subject:Date:Reply-To:From; b=YFKnvv1LBpiOQco1HXHnKg0N9mEm7Ug73ZDBF+bYDodUshKqhkviuRBkq6up7X0g4 aMYoHjoszc+tHd/YEWrwD6GMBGJrCWsNtB5qlg2x3UdR2E5LwkQPmaH7fjCyw7H6aS PwU2Z0G1tyYrrbdDJwl/m4e2B5G5EO2oOBBjQdHc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53814: PCI: Fix dropping valid root bus resources with .end = zero Date: Tue, 9 Dec 2025 09:02:35 +0900 Message-ID: <2025120945-CVE-2023-53814-eccb@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3823; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8u0D/DOme/zQarsP3qIOSt34Dc4VDcGE8Ucq9x4ZPCc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnmaS+v1/oekJUvXyy98+LpnMeHLRU61n7/xRuzP/Hgh Durw1ZEdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEbBcyzGJ2MmH+473T8lDV 1q0P7r5d6/j68WaGeVqtq0/zJ5Q+Dbsdc/2r7xTdF/kS9wA= 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: PCI: Fix dropping valid root bus resources with .end = zero On r8a7791/koelsch: kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak) # cat /sys/kernel/debug/kmemleak unreferenced object 0xc3a34e00 (size 64): comm "swapper/0", pid 1, jiffies 4294937460 (age 199.080s) hex dump (first 32 bytes): b4 5d 81 f0 b4 5d 81 f0 c0 b0 a2 c3 00 00 00 00 .]...].......... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] __kmalloc+0xf0/0x140 [<34bd6bc0>] resource_list_create_entry+0x18/0x38 [<767046bc>] pci_add_resource_offset+0x20/0x68 [] devm_of_pci_get_host_bridge_resources.constprop.0+0xb0/0x390 When coalescing two resources for a contiguous aperture, the second resource is enlarged to cover the full contiguous range, while the first resource is marked invalid. This invalidation is done by clearing the flags, start, and end members. When adding the initial resources to the bus later, invalid resources are skipped. Unfortunately, the check for an invalid resource considers only the end member, causing false positives. E.g. on r8a7791/koelsch, root bus resource 0 ("bus 00") is skipped, and no longer registered with pci_bus_insert_busn_res() (causing the memory leak), nor printed: pci-rcar-gen2 ee090000.pci: host bridge /soc/pci@ee090000 ranges: pci-rcar-gen2 ee090000.pci: MEM 0x00ee080000..0x00ee08ffff -> 0x00ee080000 pci-rcar-gen2 ee090000.pci: PCI: revision 11 pci-rcar-gen2 ee090000.pci: PCI host bridge to bus 0000:00 -pci_bus 0000:00: root bus resource [bus 00] pci_bus 0000:00: root bus resource [mem 0xee080000-0xee08ffff] Fix this by only skipping resources where all of the flags, start, and end members are zero. The Linux kernel CVE team has assigned CVE-2023-53814 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit 7c3855c423b17f6ca211858afb0cef20569914c7 and fixed in 6.1.16 with commit fe6a1fbe83f5b23d7db93596b793561230f06b40 Issue introduced in 5.16 with commit 7c3855c423b17f6ca211858afb0cef20569914c7 and fixed in 6.2.3 with commit 7e6f2714d93cdf977b6124a80af2cf0e14e2d407 Issue introduced in 5.16 with commit 7c3855c423b17f6ca211858afb0cef20569914c7 and fixed in 6.3 with commit 9d8ba74a181b1c81def21168795ed96cbe6f05ed 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-2023-53814 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/pci/probe.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/e4af080f3ef6a65b0d702988c2471a47c9ae2cc0 https://git.kernel.org/stable/c/fe6a1fbe83f5b23d7db93596b793561230f06b40 https://git.kernel.org/stable/c/7e6f2714d93cdf977b6124a80af2cf0e14e2d407 https://git.kernel.org/stable/c/9d8ba74a181b1c81def21168795ed96cbe6f05ed