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 9CC361F759D for ; Wed, 4 Dec 2024 14:21:01 +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=1733322061; cv=none; b=JiPg3DTwDakqNVxVygc3kuG5Urfy11B9gRXIpveDZfoEeiuRNvyAFtxmivm9OC6GLoy99u1ZXPA1Px7Ig02402Vd6ebTTcTAsaAVwtOUUq9+iHdPuAQl5Qlzxbiq8GDPpwTf/SoY472kPbMO/EyLFPAE2VA371PlFnNi0Izm4j0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733322061; c=relaxed/simple; bh=5lKk3och3PAvNRQAhUerVUR8ojlCCK6o3EINZhUYWCE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sKit7C4RsKTALLVj7uk5/ZGNgBnQ4bPaRg9HrAV2/cO45/Yc+WW/pesX3PPk00htEDk3H11lNRdlDDAZ+q4ueHgCBBZzueVoyyYA6UFkhth1IpwQe4Tw2Hs/sfxbIJJssj8YK3SzvqA3z8cKXhdoVbC9EcxoIoItFhAzPjhFqpw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=opJxq3BT; 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="opJxq3BT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD2FDC4CECD; Wed, 4 Dec 2024 14:21:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733322061; bh=5lKk3och3PAvNRQAhUerVUR8ojlCCK6o3EINZhUYWCE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=opJxq3BTFu6DqNPuXLy2gzP5aqRb1lE72yL3U24XDClN3+Bu6J4rc6VwXfKY+h0uy N5MrCoBT0vFfM2jZa7nM4rsp0YtGXmV9+J/oan7W/uYNnXm1IsvdD/jIT7BGd4WE5W 7Exv9ewrRgTcxNBpPDYzIXoXr0Jeody7kDA++r2Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53126: vdpa: solidrun: Fix UB bug with devres Date: Wed, 4 Dec 2024 15:20:49 +0100 Message-ID: <2024120448-CVE-2024-53126-0282@gregkh> X-Mailer: git-send-email 2.47.1 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=2225; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5lKk3och3PAvNRQAhUerVUR8ojlCCK6o3EINZhUYWCE=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkBqQ6/3B2bnY3XvM1K/jjf85PgipoYti2Gzk7OKSbMK zYtstPsiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIk80WWYnz/lw4amUKZp2zeq dqW8bbc6/dvUnWF+fInBUu+tmfz2OrLH+Xn+XuP16lECAA== 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: vdpa: solidrun: Fix UB bug with devres In psnet_open_pf_bar() and snet_open_vf_bar() a string later passed to pcim_iomap_regions() is placed on the stack. Neither pcim_iomap_regions() nor the functions it calls copy that string. Should the string later ever be used, this, consequently, causes undefined behavior since the stack frame will by then have disappeared. Fix the bug by allocating the strings on the heap through devm_kasprintf(). The Linux kernel CVE team has assigned CVE-2024-53126 to this issue. Affected and fixed versions =========================== Issue introduced in 6.3 with commit 51a8f9d7f587 and fixed in 6.6.63 with commit d372dd09cfbf Issue introduced in 6.3 with commit 51a8f9d7f587 and fixed in 6.11.10 with commit 5bb287da2d2d Issue introduced in 6.3 with commit 51a8f9d7f587 and fixed in 6.12 with commit 0b364cf53b20 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-53126 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/vdpa/solidrun/snet_main.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/d372dd09cfbf1324f54cbffd81fcaf6cdf3e608e https://git.kernel.org/stable/c/5bb287da2d2d5bb8f7376e223b02edb16998982e https://git.kernel.org/stable/c/0b364cf53b20204e92bac7c6ebd1ee7d3ec62931