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 53B7CF516 for ; Wed, 17 Apr 2024 09:44:52 +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=1713347092; cv=none; b=GUbIVLCujWote8/1UlzYdxtgoi904IKBhLte1T/81rGpSMzP2HvUBceszXFLsiyfMEbFHznm8eYVAc5nCR8Hkfseef24IhFLWRVfG1XGF/hi4FSEjTjBKnYvUlYfguaWGepOwBuXe1MTFmtu5rrxleUiJ92VUj9E/BSkYRumScA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713347092; c=relaxed/simple; bh=9Ay+kEDDDAMBOs4hXERFNU4nrnT59GUb+4Z+Ax7sod4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ribO4yYpNVblzDsh503roPsywMjEDIsL/HwBL4bdzcW6dCw5IFQtAs5kJ3vmOYXfeldyE8iX/PhJC/9mR1yJfbktX2w3Zoq9FCCTrwdVPyaHDoyNpd2nsLGC9guYADxI85HVl+9LXa+cgIiTEWH5QMJOiHsvMY1Tuflx5GjZfYo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ao3a0Swc; 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="Ao3a0Swc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82939C072AA; Wed, 17 Apr 2024 09:44:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713347091; bh=9Ay+kEDDDAMBOs4hXERFNU4nrnT59GUb+4Z+Ax7sod4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Ao3a0Swc/4rG1EdEj9DkBXKgHxg7HNiFqVSbsUE7+K6kQa4hp5IEYB8deKzDVvTxp nQuQ7kyZiyOrkykbELsEJMW699hNynIpK0YBSm8HnbNCnYaUmytSFRaN8zGvBr5fDv NpFoUhAVEX/ODHMZKOMuNOhTnksZ7k0Tr6p/2iUw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26825: nfc: nci: free rx_data_reassembly skb on NCI device cleanup Date: Wed, 17 Apr 2024 11:44:08 +0200 Message-ID: <2024041702-CVE-2024-26825-408e@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=3258; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9Ay+kEDDDAMBOs4hXERFNU4nrnT59GUb+4Z+Ax7sod4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnyMx93N7pwzk1boFj6KGXRl7qFiW1/A2b+u8bQFPW7L vTtoeMRHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRdXYMc/jrmW/ppVVWXnzS t/au5cdW1mWRLgxz5RoYmDkz7+QG867LX8LxkPdEXMc1AA== 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: nfc: nci: free rx_data_reassembly skb on NCI device cleanup rx_data_reassembly skb is stored during NCI data exchange for processing fragmented packets. It is dropped only when the last fragment is processed or when an NTF packet with NCI_OP_RF_DEACTIVATE_NTF opcode is received. However, the NCI device may be deallocated before that which leads to skb leak. As by design the rx_data_reassembly skb is bound to the NCI device and nothing prevents the device to be freed before the skb is processed in some way and cleaned, free it on the NCI device cleanup. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. The Linux kernel CVE team has assigned CVE-2024-26825 to this issue. Affected and fixed versions =========================== Issue introduced in 3.2 with commit 6a2968aaf50c and fixed in 4.19.307 with commit 7e9a8498658b Issue introduced in 3.2 with commit 6a2968aaf50c and fixed in 5.4.269 with commit 71349abe3aba Issue introduced in 3.2 with commit 6a2968aaf50c and fixed in 5.10.210 with commit 2f6d16f0520d Issue introduced in 3.2 with commit 6a2968aaf50c and fixed in 5.15.149 with commit 471c9ede8061 Issue introduced in 3.2 with commit 6a2968aaf50c and fixed in 6.1.79 with commit 5c0c5ffaed73 Issue introduced in 3.2 with commit 6a2968aaf50c and fixed in 6.6.18 with commit 16d3f507b0fa Issue introduced in 3.2 with commit 6a2968aaf50c and fixed in 6.7.6 with commit a3d90fb5c23f Issue introduced in 3.2 with commit 6a2968aaf50c and fixed in 6.8 with commit bfb007aebe6b 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-26825 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: net/nfc/nci/core.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/7e9a8498658b398bf11b8e388005fa54e40aed81 https://git.kernel.org/stable/c/71349abe3aba7fedcab5b3fcd7aa82371fb5ccbf https://git.kernel.org/stable/c/2f6d16f0520d6505241629ee2f5c131b547d5f9d https://git.kernel.org/stable/c/471c9ede8061357b43a116fa692e70d91941ac23 https://git.kernel.org/stable/c/5c0c5ffaed73cbae6c317374dc32ba6cacc60895 https://git.kernel.org/stable/c/16d3f507b0fa70453dc54550df093d6e9ac630c1 https://git.kernel.org/stable/c/a3d90fb5c23f29ba59c04005ae76c5228cef2be9 https://git.kernel.org/stable/c/bfb007aebe6bff451f7f3a4be19f4f286d0d5d9c