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 B410013D28C for ; Fri, 5 Jul 2024 06:55:57 +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=1720162557; cv=none; b=CRnn7XH3u4wgi9ZKCiySqkEICUtQW828Qgcjfb6GKEvDKcOra61RGHRZB7TYO9AiazWfYv6k1MmrafC4Y9Noj2CthAyojR3t1XpOfS6a+BKXaT/ayQJFb5pRAOxQLYFjo+6QgFwmBo8/uJPc4bFTCa0nljPgLnjPaO+tP3wxu00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720162557; c=relaxed/simple; bh=fzkMCZqRxxq9mJVEys4X9xPiF5wkUtp7dC1fGzv3FzY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HDajRqIYqahfQuqV4HeWiTZNGC26S6QKS9/WZkJ4tfh2Zs6oHJUxecpAmjC6SClHwec/3SYTwq3svVPDBAChrYOPwip4Rx2vxmFV7+wQy4zZeObiqkIqLJn4aeFN9ke4bIm8IiDy67KQn7AvVRwRRrNIfh41XAJlLuBDaS/MRYc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vqQ89z/v; 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="vqQ89z/v" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED800C116B1; Fri, 5 Jul 2024 06:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720162557; bh=fzkMCZqRxxq9mJVEys4X9xPiF5wkUtp7dC1fGzv3FzY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=vqQ89z/viL6Ul+J61E4uuNVcfkdHXWbhU9677CaH9VgPSV5kFO6GbqWh0/urYke71 4QFozJgZqwMbK68vErrb4bBeXVu3+FFPM3wRwnYMeyXx5tXd34AaMf8QDNtzNzuP7Y RdGYmeVBIT5aicK3fpVcBA0RQHpTM3VGYzC27VU4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-39484: mmc: davinci: Don't strip remove function when driver is builtin Date: Fri, 5 Jul 2024 08:55:28 +0200 Message-ID: <2024070521-CVE-2024-39484-afbf@gregkh> X-Mailer: git-send-email 2.45.2 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=2569; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fzkMCZqRxxq9mJVEys4X9xPiF5wkUtp7dC1fGzv3FzY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGntM26un7vtVD5jTOW3na1rnjru/3s9+GiIpO1DwcUs5 a67WpXZO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAixgsZ5gru81NReb7q0qVb omcY23Yf0n1RuYhhwabsXp1ZO08e18ncv/NgM6Pvr+qsCwA= 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: mmc: davinci: Don't strip remove function when driver is builtin Using __exit for the remove function results in the remove callback being discarded with CONFIG_MMC_DAVINCI=y. When such a device gets unbound (e.g. using sysfs or hotplug), the driver is just removed without the cleanup being performed. This results in resource leaks. Fix it by compiling in the remove callback unconditionally. This also fixes a W=1 modpost warning: WARNING: modpost: drivers/mmc/host/davinci_mmc: section mismatch in reference: davinci_mmcsd_driver+0x10 (section: .data) -> davinci_mmcsd_remove (section: .exit.text) The Linux kernel CVE team has assigned CVE-2024-39484 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.33 with commit b4cff4549b7a and fixed in 6.1.95 with commit 5ee241f72edc Issue introduced in 2.6.33 with commit b4cff4549b7a and fixed in 6.6.34 with commit 7590da4c04dd Issue introduced in 2.6.33 with commit b4cff4549b7a and fixed in 6.9.5 with commit 1d5ed0efe51d Issue introduced in 2.6.33 with commit b4cff4549b7a and fixed in 6.10-rc1 with commit 55c421b36448 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-39484 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/host/davinci_mmc.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/5ee241f72edc6dce5051a5f100eab6cc019d873e https://git.kernel.org/stable/c/7590da4c04dd4aa9c262da0231e978263861c6eb https://git.kernel.org/stable/c/1d5ed0efe51d36b9ae9b64f133bf41cdbf56f584 https://git.kernel.org/stable/c/55c421b364482b61c4c45313a535e61ed5ae4ea3