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 6AACE37E31A for ; Thu, 23 Apr 2026 11:12:53 +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=1776942773; cv=none; b=G3fYi12ibYv3Oe217tY4NrEBifHv++yVngDZIaoq6dQduyg60s8BGeAJQIiH7iAATQogyCZKUwv5tYm/AZmkPjRtC4W2LHjVMT0fBDPWvhRzNH40sUTdpJooDWCdQXHm5d6TOj+TnWlmcNIfbDQcUGx36Du/J/bhWyBlWWbbCEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776942773; c=relaxed/simple; bh=v3ZTiwu5EaEHqYzaTeKcXCvv/t8tE4kOxbzLtBIiAzQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p/Hj448sZzVTfUdiJ0XvdPXqQaRuBnJXtstlnN6LwlyKYoOtxw+uK0Bk89H4GTsRJe/dj1R/A5R+XhB9TD224NqsREpXcVAfuBlWkd9/lBcE87s16KbAVsPHlNVYaoPx61WHefQCvt+p6+SXCE3K8KaQjmghukWyYbgVY3iAnLo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Wkq6qQ7N; 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="Wkq6qQ7N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2006C2BCB2; Thu, 23 Apr 2026 11:12:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776942773; bh=v3ZTiwu5EaEHqYzaTeKcXCvv/t8tE4kOxbzLtBIiAzQ=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Wkq6qQ7N6gXAdGbK2Ks9/wvF8zeM3EglRVEWOBxceYH9TZeQElTrtPV4Y+6ameQG7 IOxVADuFT1u6Cz298vIIkiuGXZXuOSMHWH3+S31/GW4WsaGjzkkxPZ3+LkDFYRLslV ekkeIVh8oTkkxMH31NiGwUEdcggHgCl3JOcskTtY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31532: can: raw: fix ro->uniq use-after-free in raw_rcv() Date: Thu, 23 Apr 2026 13:12:49 +0200 Message-ID: <2026042349-CVE-2026-31532-a820@gregkh> X-Mailer: git-send-email 2.54.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=2611; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BDrVvLCbkXORDWUgqpypIOWGMMJFIKzUAKHVv++C+0A=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkv/21Mu9Jf/PBeX/yLuU2CLcKrNGJe6lxv+7hm6X/nE yFKB/33d8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE1vMyzA+UbT1y5XGdTYnt tCdRUs1BQf8NnRjm6aZNOGv14mh2vUyGf53zjNUh159eAQA= 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: can: raw: fix ro->uniq use-after-free in raw_rcv() raw_release() unregisters raw CAN receive filters via can_rx_unregister(), but receiver deletion is deferred with call_rcu(). This leaves a window where raw_rcv() may still be running in an RCU read-side critical section after raw_release() frees ro->uniq, leading to a use-after-free of the percpu uniq storage. Move free_percpu(ro->uniq) out of raw_release() and into a raw-specific socket destructor. can_rx_unregister() takes an extra reference to the socket and only drops it from the RCU callback, so freeing uniq from sk_destruct ensures the percpu area is not released until the relevant callbacks have drained. [mkl: applied manually] The Linux kernel CVE team has assigned CVE-2026-31532 to this issue. Affected and fixed versions =========================== Fixed in 6.12.83 with commit 572f0bf536ebc14f6e7da3d21a85cf076de8358e Fixed in 6.18.24 with commit 1a0f2de81f7fbdc538fc72d7d74609b79bc83cc0 Fixed in 6.19.14 with commit 7201a531b9a5ed892bfda5ded9194ef622de8ffa Fixed in 7.0.1 with commit 34c1741254ff972e8375faf176678a248826fe3a 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-2026-31532 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/can/raw.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/572f0bf536ebc14f6e7da3d21a85cf076de8358e https://git.kernel.org/stable/c/1a0f2de81f7fbdc538fc72d7d74609b79bc83cc0 https://git.kernel.org/stable/c/7201a531b9a5ed892bfda5ded9194ef622de8ffa https://git.kernel.org/stable/c/34c1741254ff972e8375faf176678a248826fe3a https://git.kernel.org/stable/c/a535a9217ca3f2fccedaafb2fddb4c48f27d36dc